Usage: asprof [action] [options] Actions: start start profiling and return immediately resume resume profiling without resetting collected data stop stop profiling dump dump collected data without stopping profiling session status print profiling status metrics print profiler metrics in Prometheus format list list profiling events supported by the target JVM load load agent library (jattach action) jcmd run JVM diagnostic command (jattach action) collect collect profile for the specified period of time and then stop (default action) Options: -e event profiling event: cpu|alloc|nativemem|lock|cache-misses etc. -d duration run profiling for seconds -f filename file name or http(s) URL to submit profiles to -i interval sampling interval in nanoseconds -j jstackdepth maximum Java stack depth -t, --threads profile different threads separately -s, --simple simple class names instead of FQN -n, --norm normalize names of hidden classes / lambdas -g, --sig print method signatures -a, --ann annotate Java methods -l, --lib prepend library names --dot dotted class names -o fmt output format: flat|traces|collapsed|flamegraph|tree|jfr|otlp -I include output only stack traces containing the specified pattern -X exclude exclude stack traces with the specified pattern -L level log level: debug|info|warn|error|none -F features advanced stack trace features: mixed, vtable, comptask, pcaddr -v, --version display version string --title string FlameGraph title --minwidth pct skip frames smaller than pct% --reverse generate stack-reversed FlameGraph / Call tree (defaults to icicle graph) --inverted toggles the layout for reversed stacktraces from icicle to flamegraph and for default stacktraces from flamegraph to icicle --loop time run profiler in a loop --alloc bytes allocation profiling interval in bytes --tlab use TLAB events for allocation profiling --live build allocation profile from live objects only --nativemem bytes native allocation profiling interval in bytes --nofree do not collect free calls in native allocation profiling --trace method Method to be instrumented with optional latency threshold --lock time lock profiling threshold in nanoseconds --nativelock time pthread mutex/rwlock profiling threshold in nanoseconds --wall interval wall clock profiling interval --nobatch legacy wall clock sampling without batch events --ithread pattern in wall clock mode, profile only threads matching the name pattern --xthread pattern in wall clock mode, skip threads matching the name pattern --proc interval process sampling interval (default: 30s) --all shorthand for enabling cpu, wall, alloc, live, nativemem and lock profiling simultaneously --total accumulate the total value (time, bytes, etc.) --all-user only include user-mode events --sched group threads by scheduling policy --cstack mode how to traverse C stack: fp|dwarf|vm|no --signal num use alternative signal for cpu or wall clock profiling --clock source clock source for JFR timestamps: tsc|monotonic --begin function begin profiling when function is executed --end function end profiling when function is executed --ttsp only time-to-safepoint profiling --nostop do not stop profiling outside --begin/--end window --memlimit bytes limit size of the stack trace storage --ratelimit limits limit the number of JFR events emitted per second --jfropts opts JFR recording options: mem --jfrsync config synchronize profiler with JFR recording --libpath path full path to libasyncProfiler.so in the container --fdtransfer run separate fdtransfer process to serve perf requests from the non-privileged target --target-cpu cpu sample threads on a specific CPU (perf_events only, default: -1) is a numeric process ID of the target JVM or 'jps' keyword to find running JVM automatically or the application name as it would appear in the jps tool Example: asprof -d 30 -f profile.html 3456 asprof start -i 1ms jps asprof stop -o flat jps asprof -d 5 -e alloc MyAppName asprof --all -f profile.jfr MyAppName