diff options
-rw-r--r-- | bashrc | 39 |
1 files changed, 36 insertions, 3 deletions
@@ -119,13 +119,46 @@ title() { echo -ne "\033]0;$@\007" } vg() { - valgrind \ + launcher=/tmp/$$.sh + cat << EOF > $launcher +valgrind \ --show-leak-kinds=all \ --suppressions=$HOME/dev/valgrind.suppressions \ --leak-check=full \ - --log-file=/var/tmp/vg.log \ - $@ + --log-file=/var/tmp/vg-\$(basename \$1).log \ + \$@ +EOF + chmod +x $launcher + build testing.launcher=$launcher $@ + rm -f $launcher +} + +vgc() { + launcher=/tmp/$$.sh + cat << EOF > $launcher +valgrind \ + --tool=callgrind \ + --trace-children=no \ + --callgrind-out-file=/var/tmp/callgrind-\$(basename \$1).out \ + \$@ +EOF + chmod +x $launcher + build testing.launcher=$launcher variant=release debug-symbols=on $@ + rm -f $launcher } + +str() { + launcher=/tmp/$$.sh + cat << EOF > $launcher +strace -s400 \ + -o /var/tmp/str-\$(basename \$1).out \ + \$@ +EOF + chmod +x $launcher + build testing.launcher=$launcher $@ + rm -f $launcher +} + build() { title "Build in progress" CCACHE_BASEDIR=$(git root) nice -n5 b2 -j$TASKS $@ |