async-profiler

Sampling CPU & HEAP profiler for Java using AsyncGetCallTrace

brewmacoslinux
Try with needOr install directly
Source

About

Sampling CPU & HEAP profiler for Java using AsyncGetCallTrace + perf_events

Commands

async-profiler

Examples

Profile CPU for 30 seconds and save results to flamegraph$ async-profiler -d 30 -f flamegraph.html -o jfr jps | grep MyApp
Profile heap allocations for a running Java process$ async-profiler -d 30 -e alloc -f flamegraph.html -o jfr <pid>
Profile with collapsed stack output for flamegraph visualization$ async-profiler -d 60 -e cpu -f collapsed <pid> > stacks.txt