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.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章