Skip to content

Instantly share code, notes, and snippets.

@justdoit0823
Created October 14, 2017 11:20
Show Gist options
  • Save justdoit0823/f0fc292aec2551fafa8345ca6997fd33 to your computer and use it in GitHub Desktop.
Save justdoit0823/f0fc292aec2551fafa8345ca6997fd33 to your computer and use it in GitHub Desktop.
Inspect hot paths in program with perf.
# -p refers to process and -t refers to thread
# record stack in process PID
perf record -F 99 -a -p PID -- sleep 30
# hot path like top
perf top -p PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment