Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加新选项 --classify #2904

Closed
wants to merge 4 commits into from

Conversation

ZhaoGuorui666
Copy link
Contributor

根据 async profiler pr#719
async-profiler 引入了一个新的选项 --classify,可以自动将执行样本分类到特定类别中。这些类别包括垃圾回收、JIT 编译、类加载等。

image

@hengyunabc
Copy link
Collaborator

这个需要同步修改文档,增加使用示例。文档在 site/docs/ 目录下,中英文需要同时修改。

@ZhaoGuorui666
Copy link
Contributor Author

将示例已添加到 中英文档。

(推荐使用 --cstack dwarf 选项以提高准确性,可参考[async profiler pr#719](https://github.com/async-profiler/async-profiler/issues/719))

```bash
profiler start -e cpu -f /tmp/profile.jfr --cstack dwarf
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个示例,并没有看到 --classify 参数。

@hengyunabc
Copy link
Collaborator

从具体的 pr 来看: async-profiler/async-profiler@a8f20eb

这个 --classify 参数是在 convertor 里才起作用。

@ZhaoGuorui666
Copy link
Contributor Author

ZhaoGuorui666 commented Sep 27, 2024

从具体的 pr 来看: async-profiler/async-profiler@a8f20eb

这个 --classify 参数是在 convertor 里才起作用。


$ java -cp converter.jar jfr2flame
Usage: java jfr2flame [options] input.jfr [output.html]

options include all supported FlameGraph options, plus the following:
  --alloc       Allocation Flame Graph
  --live        Include only live objects in allocation profile
  --lock        Lock contention Flame Graph
  --threads     Split profile by threads
  --state LIST  Filter samples by thread states: RUNNABLE, SLEEPING, etc.
  --classify    Classify samples into predefined categories
  --total       Accumulate the total value (time, bytes, etc.)
  --lines       Show line numbers
  --bci         Show bytecode indices
  --simple      Simple class names instead of FQN
  --dot         Dotted class names
  --norm        Normalize names of hidden classes / lambdas
  --from TIME   Start time in ms (absolute or relative)
  --to TIME     End time in ms (absolute or relative)
  --collapsed   Use collapsed stacks output format

是的,之前没有看清楚位置,classify选项定义在converter中(在代码中的位置),我看arthas之中也没有集成convertor相关,这个pr可以关闭了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants