Skip to content

Instantly share code, notes, and snippets.

@smerrill
Created August 2, 2011 21:59
Show Gist options
  • Save smerrill/1121334 to your computer and use it in GitHub Desktop.
Save smerrill/1121334 to your computer and use it in GitHub Desktop.
Fix an XDebug 2.1.1 (or later) callgrind file to be usable with XDebugToolkit
#!/bin/bash
[[ $1 ]] || {
echo "Usage: fix-profile.sh [path to callgrind file]"
exit 1
}
egrep -v '^(cfl|positions|creator)' $1 | sed -e 's/^-//;1s/1/0.9.6/' > $1.fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment