Skip to content

Commit 0646ac7

Browse files
authored
Merge pull request #1673 from espressif/docs/translate_heap_tracing_resubmit
docs: Provide CN translation for heap-tracing.rst (resubmit)
2 parents 020f066 + d4c32d8 commit 0646ac7

File tree

2 files changed

+75
-22
lines changed

2 files changed

+75
-22
lines changed
Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,47 @@
11
Heap Tracing
2-
========================
2+
============
33

4-
Heap Tracing allows tracing of code which allocates/frees memory. More information in `Heap tracing documentation <https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/system/heap_debug.html#heap-tracing>`_. Please also review `System behaviour analysis <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html#system-behavior-analysis-with-segger-systemview>`_ for systemView tracing configuration.
4+
:link_to_translation:`zh_CN:[中文]`
55

6-
Let's open a ESP-IDF project. For this tutorial we will use the ``system/sysview_tracing_heap_log`` example.
6+
Heap Tracing allows tracing of code that allocates or frees memory. More information is available in the `heap tracing documentation <https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/system/heap_debug.html#heap-tracing>`_. Please also review `System Behavior Analysis <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html#system-behavior-analysis-with-segger-systemview>`_ for SystemView tracing configuration.
77

8-
- Navigate to **View** > **Command Palette**.
8+
Let's open an ESP-IDF project. For this tutorial, we will use the ``system/sysview_tracing_heap_log`` example.
99

10-
- Type **ESP-IDF: New Project**, select the command and choose ESP-IDF version to use.
10+
1. Navigate to ``View`` > ``Command Palette``.
1111

12-
If you don't see the option, please review the setup in :ref:`Install ESP-IDF and Tools <installation>`.
12+
2. Type ``ESP-IDF: New Project``, select the command, and choose the ESP-IDF version to use.
1313

14-
- A window will be open with settings to configure the project. Later you can choose from a list a ESP-IDF examples, go the **system** section and choose the ``sysview_tracing_heap_log``. You will see a **Create Project Using Example sysview_tracing_heap_log** button in the top and a description of the project below. Click the button and the project will be opened in a new window.
14+
.. note::
1515

16-
.. image:: ../../../media/tutorials/heap_trace/sysview_tracing_heap_log.png
16+
If you don't see the option, please review the setup in :ref:`Install ESP-IDF and Tools <installation>`.
1717

18-
For this example, the project has been already configured for application tracing purposes.
18+
3. A window will open with settings to configure the project. You can later choose from a list of ESP-IDF examples. Go to the ``system`` section and choose ``sysview_tracing_heap_log``. You will see a ``Create Project Using Example sysview_tracing_heap_log`` button at the top and a description of the project below. Click the button, and the project will open in a new window.
1919

20-
.. note::
21-
* For more information please take a look at the `Application Level Tracing library documentation <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html>`_.
20+
.. image:: ../../../media/tutorials/heap_trace/sysview_tracing_heap_log.png
2221

23-
- Configure, build and flash your project as explained in the :ref:`Build the project <build the project>`.
22+
In this example, the project is already configured for application tracing.
2423

25-
.. note::
26-
* The OpenOCD server output is shown in menu **View** > **Output** > **ESP-IDF**.
27-
* Make sure that OpenOCD configuration files are properly configured with **ESP-IDF: Select OpenOCD Board Configuration** command.
24+
.. note::
2825

29-
- Click the ``ESP-IDF Explorer`` in the `Visual Studio Code Activity bar <https://code.visualstudio.com/docs/getstarted/userinterface>`_ (1). On the ``ESP-IDF APP TRACER`` section, click the ``Start Heap Trace`` (2). This will execute the extension's OpenOCD server and send the corresponding tracing commands to generate a tracing log. You can see the generated tracing log in the ``APP TRACE ARCHIVES`` named with ``Heap Trace Log #1`` (3). Each time you execute ``Start Heap Trace`` a new tracing will be generated and shown in the archives list. You can also start tracing by running the **ESP-IDF: App Trace** command.
26+
For more information, please refer to `Application Level Tracing Library <https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/app_trace.html>`_.
3027

31-
.. image:: ../../../media/tutorials/heap_trace/start_heap_tracing.png
28+
4. Configure, build, and flash your project as explained in the :ref:`Build Your Project <build the project>`.
3229

33-
- Click on ``Heap Trace Log #1`` and choose the ``Heap Tracing`` option for ``ESP-IDF Tracing`` report window. Click ``Show Report`` button to reload the visualization.
30+
.. note::
31+
32+
- The OpenOCD server output is shown in the menu ``View`` > ``Output`` > ``ESP-IDF``.
33+
- Make sure that OpenOCD configuration files are properly set with the the ``ESP-IDF: Select OpenOCD Board Configuration`` command.
3434

35-
.. image:: ../../../media/tutorials/heap_trace/heap_trace_report.png
35+
5. First, click ``ESP-IDF Explorer`` in the `Visual Studio Code Activity Bar <https://code.visualstudio.com/docs/getstarted/userinterface>`_. Second, in the ``ESP-IDF APP TRACER`` section, click ``Start Heap Trace``. This will execute the extension's OpenOCD server and send the corresponding tracing commands to generate a tracing log. Third, you can see the generated tracing log in the ``APP TRACE ARCHIVES`` named ``Heap Trace Log #1``.
3636

37-
- Click on ``Heap Trace Log #1`` and choose the ``SystemView Tracing`` option for the ``ESP-IDF System View Report`` window.
37+
Each time you execute ``Start Heap Trace``, a new trace will be generated and shown in the archives list. You can also start tracing by running the ``ESP-IDF: App Trace`` command.
3838

39-
.. image:: ../../../media/tutorials/heap_trace/sysview_report.png
39+
.. image:: ../../../media/tutorials/heap_trace/start_heap_tracing.png
4040

41+
6. Click ``Heap Trace Log #1`` and choose the ``Heap Tracing`` option for the ``ESP-IDF Tracing`` report window. Click the ``Show Report`` button to reload the visualization.
42+
43+
.. image:: ../../../media/tutorials/heap_trace/heap_trace_report.png
44+
45+
7. Click ``Heap Trace Log #1`` and choose the ``SystemView Tracing`` option for the ``ESP-IDF System View Report`` window.
46+
47+
.. image:: ../../../media/tutorials/heap_trace/sysview_report.png
Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,47 @@
1-
.. include:: ../../en/additionalfeatures/heap-tracing.rst
1+
堆跟踪
2+
======
3+
4+
:link_to_translation:`en:[English]`
5+
6+
堆跟踪允许跟踪分配或释放内存的代码。详情请参阅 `堆内存跟踪 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-reference/system/heap_debug.html#heap-tracing>`_ 。另请查阅 `系统行为分析 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-guides/app_trace.html#segger-systemview>`_,以了解 SystemView 跟踪配置。
7+
8+
让我们打开一个 ESP-IDF 项目。本教程将使用 ``system/sysview_tracing_heap_log`` 示例。
9+
10+
1. 前往菜单栏 ``查看`` > ``命令面板``。
11+
12+
2. 输入 ``ESP-IDF:新建项目`` ,选择该命令,然后选择要使用的 ESP-IDF 版本。
13+
14+
.. note::
15+
16+
如果未看到该选项,请检查当前的 ESP-IDF 设置,详见 :ref:`安装 ESP-IDF 和相关工具 <installation>`。
17+
18+
3. 系统将弹出用于配置项目的窗口。从 ESP-IDF 示例列表中选择示例,在 ``system`` 部分选择 ``sysview_tracing_heap_log``。页面顶部会出现 ``Create Project Using Example sysview_tracing_heap_log`` 按钮,页面下方会出现项目描述,点击按钮,项目会在新窗口中打开。
19+
20+
.. image:: ../../../media/tutorials/heap_trace/sysview_tracing_heap_log.png
21+
22+
在此示例中,项目已配置应用程序跟踪。
23+
24+
.. note::
25+
26+
详情请参阅 `应用层跟踪库 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-guides/app_trace.html>`_。
27+
28+
4. 按照 :ref:`构建项目 <build the project>` 中的说明来配置、构建并烧录项目。
29+
30+
.. note::
31+
32+
- OpenOCD 服务器输出会显示在菜单栏 ``查看`` > ``输出`` > ``ESP-IDF`` 中。
33+
- 请确保已使用 ``ESP-IDF:选择 OpenOCD 开发板配置`` 命令设置正确的 OpenOCD 配置文件。
34+
35+
5. 首先,点击 `Visual Studio Code 活动栏 <https://code.visualstudio.com/docs/getstarted/userinterface>`_ 中的 ``ESP-IDF Explorer``。其次, 在 ``ESP-IDF APP TRACER`` 分区中,点击 ``Start Heap Trace``。这将启动该扩展的 OpenOCD 服务器并发送相应的跟踪命令以生成跟踪日志。最后,可以在 ``APP TRACE ARCHIVES`` 中查看生成的日志,名称为 ``Heap Trace Log #1``。
36+
37+
每次执行 ``Start Heap Trace`` 时,都会生成一个新的跟踪并显示在归档列表中。也可以通过运行 ``ESP-IDF:应用程序跟踪`` 命令进行跟踪。
38+
39+
.. image:: ../../../media/tutorials/heap_trace/start_heap_tracing.png
40+
41+
6. 点击 ``Heap Trace Log #1`` ,并在 ``ESP-IDF Tracing`` 报告窗口中选择 ``Heap Tracing`` 选项。点击 ``Show Report`` 按钮,重新加载可视化界面。
42+
43+
.. image:: ../../../media/tutorials/heap_trace/heap_trace_report.png
44+
45+
7. 点击 ``Heap Trace Log #1`` ,并在 ``ESP-IDF System View Report`` 窗口中选择 ``SystemView Tracing`` 选项。
46+
47+
.. image:: ../../../media/tutorials/heap_trace/sysview_report.png

0 commit comments

Comments
 (0)