Skip to content

Instantly share code, notes, and snippets.

Last active January 28, 2020 17:49
What would you like to do?
# compile with -fno-omit-frame-pointer
# usermode
sudo sh -c "echo 0 > /proc/sys/kernel/kptr_restrict"
sudo sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid'
# record with callgraph
perf record -g $1
# display with inverse callgraph
perf report -g 'graph,0.5,caller'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment