Created
March 22, 2013 17:57
-
-
Save beaugunderson/5223393 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Gathering 60s of data for process ID $1" | |
| dtrace -n "profile-997/pid == $1 && arg1/{ | |
| @[jstack(50, 2048)] = count(); } tick-30s { exit(0); }" > $1.out | |
| echo "Filtering..." | |
| c++filt < $1.out > $1-demangled.out | |
| echo "Generating flamegraph..." | |
| stackvis dtrace flamegraph-svg < $1-demangled.out > $1-demangled.svg | |
| echo "Generating collapsed flamegraph..." | |
| stackvis dtrace collapsed < $1-demangled.out > $1-collapsed.out | |
| stackvis collapsed flamegraph-svg < $1-collapsed.out > $1-collapsed.svg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment