項目地址
github:https://github.com/async-profiler/async-profiler
cpu
./asprof -d 600s -f cpu.html pid
cpu-wall:表示抓取所有狀態下的線程數據,包含:Running, Sleeping or Blocked
./asprof -e wall -d 600s -f cpu-wall.html pid
wall參數通常與-t參數組合使用,表示按照線程維度展示火焰圖。如果不加默認與cpu展示的方式相同,按照堆棧維度展示
./asprof -e wall -t -d 600s -f cpu-wall-t.html pid
memory
./asprof -e alloc -d 600s -f memory.html pid