Debian Codegraph @

contrib/scripts/valgrind_compare

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # compare_valgrind: diff two valgrind memory usage logs. Masks out PIDs,
4 # addresses and such that should normally be different.
5 #
6 # Usage: ./compare_valgrind file1.log file2.log | less
7 #
8 # (Requires /bin/bash due to usage of '<()' )
9
10 log1="$1"
11 log2="$2"
12
13 pipe_logscip-shell shell shell-project 0.0.0 pipe_log().() {
14 sedscip-shell system . . sed. \
15 -e 's/^--[0-9]\+-- //' -e 's/^==[0-9]\+== //' "$1" \
16 -e 's/ record [0-9]\+ of [0-9]\+$/ <snipped>/' \
17 -e 's/^ Address 0x[0-9a-f]\+/ Address 0x<snipped>/' \
18
19 }
20
21 diffscip-shell system . . diff. -u -L "$log1" <(pipe_logscip-shell shell shell-project 0.0.0 pipe_log(). "$log1") -L "$log2" <(pipe_logscip-shell shell shell-project 0.0.0 pipe_log(). "$log2")