6 $dir/..
/..
/tests
/filter_xml_frames |
7 sed "s/<tid>[0-9]*<\/tid>/<tid>...<\/tid>/" |
8 sed "s/<pid>[0-9]*<\/pid>/<pid>...<\/pid>/" |
9 sed "s/<ppid>[0-9]*<\/ppid>/<ppid>...<\/ppid>/" |
10 sed "s/<obj>.*<\/obj>/<obj>...<\/obj>/" |
11 sed "s/<line>.*<\/line>/<line>...<\/line>/" |
12 sed "s/<dir>.*<\/dir>/<dir>...<\/dir>/" |
13 sed "s/<count>.*<\/count>/<count>...<\/count>/" |
14 # Filter out @* version symbol function names
15 sed "s/<fn>\(.*\)\@\*<\/fn>/<fn>\1<\/fn>/" |
16 sed "s/of size [48]</of size N</" |
17 sed "s/unsigned int, std::align_val_t/unsigned long, std::align_val_t/" |
18 sed "s/operator new(unsigned int/operator new(unsigned long/" |
19 sed "s/operator new\[\](unsigned int/operator new[](unsigned long/" |
20 sed "s/operator delete(void\*, unsigned int/operator delete(void*, unsigned long/" |
21 sed "s/operator delete\[\](void\*, unsigned int/operator delete[](void*, unsigned long/" |
22 sed "s/4294967295/18446744073709551615/" |
23 sed "s/malloc_zone_memalign/posix_memalign/" |
24 perl
-p -e "s/(m_replacemalloc\/)?vg_replace_malloc.c/vg_replace_malloc.c/" |
25 perl
-0 -p -e "s/<suppcounts>.*<\/suppcounts>/<suppcounts>...<\/suppcounts>/s" |
26 perl
-p -e "s/<time>.*<\/time>/<time>...<\/time>/s" |
27 perl
-0 -p -e "s/<vargv>.*<\/vargv>/<vargv>...<\/vargv>/s" |
29 # Remove stack traces for Syscall param errors (see filter_stderr for more).
30 # Chops everything within <stack>...</stack>.
31 perl
-p -0 -e 's/(<what>Syscall param[^\n]*\n)([^\n]*(stack|frame|ip|obj|fn|dir|file|line)[^\n]*\n)+/$1/gs'
33 # Collected wisdom re Perl magic incantation:
37 # Two problems - one is that you need -p to force perl to loop over
38 # the input lines and apply your expression to each one and then print
41 # The other is that as somebody else said you need to change the input
42 # record separator so that it reads in the whole file as a single line
43 # (which means we can do multi-line matching in a single regexp) which you
44 # can do with the -0 switch.