From 75cce736644ef1365b4fab472df655bcd576c572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=9B=BD=E7=91=9E?= <18235787078@163.com> Date: Fri, 27 Sep 2024 21:11:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/docs/doc/profiler.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/site/docs/doc/profiler.md b/site/docs/doc/profiler.md index 8ff56e81b4..01d5567948 100644 --- a/site/docs/doc/profiler.md +++ b/site/docs/doc/profiler.md @@ -355,11 +355,15 @@ profiler start --loop 1h -f /var/log/profile-%t.jfr ## `--wall` 选项 -通过 --wall 选项,可以同时进行 CPU 和 Wall Clock 的性能分析。这种联合分析有助于更全面地识别和理解应用程序的性能瓶颈。 ---wall 选项允许用户独立于 CPU 分析设置 Wall Clock 分析的采样间隔。比如,可以通过设置 -e cpu -i 10 --wall 200,将 CPU 采样间隔设为 10 毫秒,墙钟采样间隔设为 200 毫秒。 -联合进行 CPU 和 Wall Clock 分析时,输出格式必须设置为 jfr。这一格式支持记录线程的状态信息(如 STATE_RUNNABLE 或 STATE_SLEEPING),从而区分不同类型的采样事件。 +通过 --wall 选项,可以同时进行 CPU 和 Wall Clock 的性能分析。 +1. 这种联合分析有助于更全面地识别和理解应用程序的性能瓶颈。 +2. 允许用户独立于 CPU 分析设置 Wall Clock 分析的采样间隔。比如,可以通过设置 -e cpu -i 10 --wall 200,将 CPU 采样间隔设为 10 毫秒,墙钟采样间隔设为 200 毫秒。 +3. 联合进行 CPU 和 Wall Clock 分析时,输出格式必须设置为 jfr。这一格式支持记录线程的状态信息(如 STATE_RUNNABLE 或 STATE_SLEEPING),从而区分不同类型的采样事件。 + +可参考 [async-profiler Github pr#740](https://github.com/async-profiler/async-profiler/issues/740) 了解更多信息。 + +影响: -影响 Linux 平台: 这个新功能仅在 Linux 平台上有效。macOS 上的 CPU 分析引擎已经基于 Wall clock 模式,因此没有额外的收益。 性能开销: 启用 Wall clock 分析会增加性能开销,因此在同时分析 CPU 和 Wall clock 时,建议增加 Wall clock 的间隔。