This is an automated email from the ASF dual-hosted git repository.

lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 11e41d21f6a [fix](docs) Opt jemalloc heap profile (#777)
11e41d21f6a is described below

commit 11e41d21f6ab70aac367058b3ff87445e8dfcc94
Author: Xinyi Zou <[email protected]>
AuthorDate: Mon Jun 24 13:17:31 2024 +0800

    [fix](docs) Opt jemalloc heap profile (#777)
    
    Co-authored-by: 李一凡 <[email protected]>
---
 community/developer-guide/debug-tool.md            | 41 ++++++++++------------
 .../current/developer-guide/debug-tool.md          | 35 ++++++++----------
 2 files changed, 33 insertions(+), 43 deletions(-)

diff --git a/community/developer-guide/debug-tool.md 
b/community/developer-guide/debug-tool.md
index 0be55373365..5d1041d7eca 100644
--- a/community/developer-guide/debug-tool.md
+++ b/community/developer-guide/debug-tool.md
@@ -255,36 +255,31 @@ The directory where the heap dump file is located is 
`${DORIS_HOME}/log` by defa
 ##### 3. jemalloc heap dump profiling
 
 ```
-Requires addr2line 2.35.2, see below QA 1.
+Addr2line version 2.35.2 or above is required, see QA 1 below.
 ```
 
-1. A single heap dump file generates plain text analysis results
-    ```shell
-    jeprof lib/doris_be heap_dump_file_1
-    ```
+1. Analyze a single heap dump file
 
-2. Analyze the diff of two heap dumps
-    ```shell
-    jeprof lib/doris_be --base=heap_dump_file_1 heap_dump_file_2
-    ```
+```shell
+jeprof --dot lib/doris_be heap_dump_file_1
+```
 
-3. Generate a call relationship picture
+After executing the above command, a dot syntax graph will be output in the 
terminal. Paste it to the [online dot drawing 
website](http://www.webgraphviz.com/) to generate a memory allocation graph, 
and then analyze it.
 
-    Install dependencies required for plotting
-    ```shell
-    yum install ghostscript graphviz
-    ```
-    Multiple dump files can be generated by running the above command multiple 
times in a short period of time, and the first dump file can be selected as the 
baseline for diff comparison analysis
+If the server is convenient for file transfer, you can also use the following 
command to directly generate a call relationship graph result.pdf file and 
transfer it to the local computer for viewing. You need to install the 
dependencies required for drawing.
 
-    ```shell
-    jeprof --dot lib/doris_be --base=heap_dump_file_1 heap_dump_file_2
-    ```
-    After executing the above command, the terminal will output the graph of 
dot syntax, and paste it to the [online dot drawing 
website](http://www.webgraphviz.com/), generate a memory allocation graph, and 
then analyze it. This method can Drawing directly through the terminal output 
results is more suitable for servers where file transfer is not very convenient.
+```shell
+yum install ghostscript graphviz
+jeprof --pdf lib/doris_be heap_dump_file_1 > result.pdf
+```
 
-    You can also use the following command to directly generate the call 
relationship result.pdf file and transfer it to the local for viewing
-    ```shell
-    jeprof --pdf lib/doris_be --base=heap_dump_file_1 heap_dump_file_2 > 
result.pdf
-    ```
+2. Analyze the diff of two heap dump files
+
+```shell
+jeprof --dot lib/doris_be --base=heap_dump_file_1 heap_dump_file_2
+```
+
+Multiple heap files can be generated by running the above command multiple 
times over a period of time. You can select an earlier heap file as a baseline 
and compare it with a later heap file to analyze their diff. The method for 
generating a call relationship graph is the same as above.
 
 ##### 4. QA
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/debug-tool.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/debug-tool.md
index 5c58077bc34..8b11d02903d 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/debug-tool.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/debug-tool.md
@@ -258,36 +258,31 @@ heap dump文件所在目录默认为 `${DORIS_HOME}/log`, 文件名前缀是 `JE
 ##### 3. heap dump profiling
 
 ```
-需要 addr2line 版本为 2.35.2, 见下面的 QA 1.
+需要 addr2line 版本为 2.35.2 及以上, 见下面的 QA 1.
 ```
 
-1.  单个heap dump文件生成纯文本分析结果
+1. 分析单个heap dump文件
+
 ```shell
-   jeprof lib/doris_be heap_dump_file_1
+   jeprof --dot lib/doris_be heap_dump_file_1
    ```
 
-2.  分析两个heap dump的diff
-   ```shell
-   jeprof lib/doris_be --base=heap_dump_file_1 heap_dump_file_2
-   ```
-   
-3. 生成调用关系图片
+   
执行完上述命令,终端中会输出dot语法的图,将其贴到[在线dot绘图网站](http://www.webgraphviz.com/),生成内存分配图,然后进行分析。
+
+   如果服务器方便传输文件,也可以通过如下命令直接生成调用关系图 result.pdf 文件传输到本地后进行查看,需要安装绘图所需的依赖项。
 
-   安装绘图所需的依赖项
-   ```shell
+```shell
    yum install ghostscript graphviz
+   jeprof --pdf lib/doris_be heap_dump_file_1 > result.pdf
    ```
-   通过在一短时间内多次运行上述命令可以生成多份dump 文件,可以选取第一份dump 文件作为baseline 进行diff对比分析
-   
-   ```shell
+
+2.  分析两个heap dump文件的diff
+
+```shell
    jeprof --dot lib/doris_be --base=heap_dump_file_1 heap_dump_file_2
    ```
-   
执行完上述命令,终端中会输出dot语法的图,将其贴到[在线dot绘图网站](http://www.webgraphviz.com/),生成内存分配图,然后进行分析,此种方式能够直接通过终端输出结果进行绘图,比较适用于传输文件不是很方便的服务器。
-   
-   也可以通过如下命令直接生成调用关系result.pdf文件传输到本地后进行查看
-   ```shell
-   jeprof --pdf lib/doris_be --base=heap_dump_file_1 heap_dump_file_2 > 
result.pdf
-   ```
+
+   通过在一段时间内多次运行上述命令可以生成多个 heap 文件,可以选取较早时间的 heap 文件作为 baseline,与较晚时间的 heap 
文件对比分析它们的diff,生成调用关系图的方法同上。
 
 ##### 4. QA
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to