Last active
September 19, 2016 03:31
-
-
Save zhasm/164ffe73a3d8891af033a5d6d6dba9a1 to your computer and use it in GitHub Desktop.
xdebug2png
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
#!/usr/bin/env bash | |
# brew/apt-get/yum install graphviz | |
# sudo pip install gprof2dot | |
# cmd: | |
# gprof2dot -n 10 -f callgrind INPUT_FILE |dot -Tpng -o OUTPUT.png | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $0 <INPUT-FILENAME: xdebug.out.xxx> <OUT-FILENAME: xxx.png> [other gp\ | |
rof2dot options like -n 10]" | |
exit 0 | |
fi | |
input=$1 | |
shift | |
output=$1 | |
shift | |
gprof2dot -f callgrind $input $*|dot -Tpng -o $output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment