alibaba / arthas

Alibaba Java Diagnostic Tool Arthas/Alibaba Java诊断利器Arthas
https://arthas.aliyun.com/
Apache License 2.0
35.7k stars 7.51k forks source link

增加新选项 --classify #2904

Closed ZhaoGuorui666 closed 1 month ago

ZhaoGuorui666 commented 2 months ago

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

image

hengyunabc commented 2 months ago

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

ZhaoGuorui666 commented 2 months ago

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

hengyunabc commented 1 month ago

从具体的 pr 来看: https://github.com/async-profiler/async-profiler/commit/a8f20ebc79281c128f4691a5a739c4e7834a1af6

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

ZhaoGuorui666 commented 1 month ago

从具体的 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可以关闭了。