Inspired by https://github.com/brendangregg/FlameGraph
./flamegraph.sh <pid>
- Linux
perf
can be found in most package repositories for linux distros perl
- Optional: enable kernal profiling
sudo sysctl kernel.perf_event_paranoid=-1
andsudo sysctl kernel.kptr_restrict=0