Skip to content

Instantly share code, notes, and snippets.

@lucperkins
Created September 21, 2022 16:12
Show Gist options
  • Save lucperkins/84fad548eb6b664dca4500f2d5aa44ac to your computer and use it in GitHub Desktop.
Save lucperkins/84fad548eb6b664dca4500f2d5aa44ac to your computer and use it in GitHub Desktop.
perf script | stackcollapse-perf.pl | # taken from the flamegraph page linked above
grep ^qemu | # We're only interested in the qemu process
awk '/unknown/ { gsub("(\\[unknown];){1,}", "[unknown...];", $0) } { print }' | # Make the graph a lot less tall by collapsing multiple consecutive unknown stack frames together
flamegraph.pl > flamegraph.svg # and generate a flamegraph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment