arthas06-profiler生成火焰图

arthas profiler 生成火焰图

01-官方-arthas profiler使用

02-oschina-博客-帮助

profiler 命令支持生成应用热点的火焰图。本质上是通过使用async-profiler不断的采样,然后把收集到的采样结果生成火焰图。详细的例子可以参考上文列出来的两个链接。

profiler` 命令基本运行结构是 `profiler action [actionArg]

如下所示是profiler命令的帮助说明

[arthas@44607]$ profiler --help
###### 使用基本规则
 USAGE:
   profiler [--allkernel] [--alluser] [-e <value>] [-f <value>] [--format <value>] [-h] [-i <value>
 ] [--threads] action [actionArg]

 SUMMARY:
   Async Profiler. https://github.com/jvm-profiling-tools/async-profiler

##### 具体样例展示
 EXAMPLES:
 ##启动
   profiler start
 ##停止
   profiler stop
   profiler list                # list all supported events
   profiler actions             # list all supported actions
   profiler start --event alloc
 ##设置svg输出方式
   profiler stop --format svg   # output file format, support svg,html,jfr
 ##输出到html
   profiler stop --file /tmp/result.html
   profiler stop --threads
   profiler status
   profiler resume              # Start or resume profiling without resetting collected data.
   profiler getSamples          # Get the number of samples collected during the profiling session
   profiler dumpFlat            # Dump flat profile, i.e. the histogram of the hottest methods
   profiler dumpCollapsed       # Dump profile in 'collapsed stacktraces' format
   profiler dumpTraces          # Dump collected stack traces
   profiler execute 'start'                       # Execute an agent-compatible profiling command
   profiler execute 'stop,file=/tmp/result.svg'   # Execute an agent-compatible profiling command

 WIKI:
   https://alibaba.github.io/arthas/profiler

 OPTIONS:
     --allkernel                  include only kernel-mode events
     --alluser                    include only user-mode events
 -e, --event <value>              which event to trace (cpu, alloc, lock, cache-misses etc.), defau
                                  lt value is cpu
 -f, --file <value>               dump output to <filename>
     --format <value>             dump output file format(svg, html, jfr), default valut is svg
 -h, --help                       this help
 -i, --interval <value>           sampling interval in ns (default: 10'000'000, i.e. 10 ms)
     --threads                    profile different threads separately
 <action>                         Action to execute
 <actionArg>                      Attribute name pattern.
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值