Skip to content

Commit

Permalink
优化文档
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhaoGuorui666 committed Sep 27, 2024
1 parent 5c0b1a9 commit 75cce73
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions site/docs/doc/profiler.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 的间隔。

Expand Down

0 comments on commit 75cce73

Please sign in to comment.