From: Carl Love Date: Wed, 14 Sep 2016 16:43:27 +0000 (+0000) Subject: Add tc06_two_races_xml.exp output for ppc64 X-Git-Tag: svn/VALGRIND_3_12_0~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f2ab6749ef92988b66d2bd51859de7a1688b344;p=thirdparty%2Fvalgrind.git Add tc06_two_races_xml.exp output for ppc64 Update xml filter to suppress pthread_create_WRK frame. Update the filter_xml filter to suppress the frame containing the pthread_create_WRK function. This allows the tc06_two_races_xml test to complete reliably on power. This change also adds the ability to suppress the printf that generates a "pthread_create_WRK...pthread_create" entry to replace the suppressed frame. This is conceptually a follow-up from r13983, which suppresses the pthread_create_WRK entry from non-xml outputs. Patch submitted by Will Schmidt Bugzilla 368416 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15956 --- diff --git a/helgrind/tests/filter_xml b/helgrind/tests/filter_xml index 6de080af46..cc0b71ea07 100755 --- a/helgrind/tests/filter_xml +++ b/helgrind/tests/filter_xml @@ -46,7 +46,13 @@ my %patterns = ( # List of XML sections to be ignored. my %ignore_sections = ( "" => "", - "" => "" + "" => "", + "pthread_create_WRK" => "" +); + +# List of XML sections to be quietly ignored. +my %quiet_ignore_sections = ( + "pthread_create_WRK" => "" ); @@ -65,9 +71,9 @@ sub file_matches ($$) { my $frame_buf = ""; -my ($file, $lineno, $in_frame, $keep_frame, $num_discarded, $ignore_line); +my ($file, $lineno, $in_frame, $keep_frame, $num_discarded, $ignore_line, $quiet_ignore_line); -$in_frame = $keep_frame = $num_discarded = $ignore_line = 0; +$in_frame = $keep_frame = $num_discarded = $ignore_line = $quiet_ignore_line = 0; line: while () { @@ -78,8 +84,11 @@ while () { if ($ignore_line) { foreach my $tag (keys %ignore_sections) { if ($line =~ $ignore_sections{$tag}) { - print "$tag...$ignore_sections{$tag}\n"; + if ($quiet_ignore_line == 0) { + print "$tag...$ignore_sections{$tag}\n"; + } $ignore_line = 0; + $quiet_ignore_line = 0; next line; } } @@ -89,6 +98,12 @@ while () { $ignore_line = 1; } } + # Determine if this section is also in the quiet list. + foreach my $tag (keys %quiet_ignore_sections) { + if ($line =~ $tag) { + $quiet_ignore_line = 1; + } + } } next if ($ignore_line); diff --git a/helgrind/tests/tc06_two_races_xml.stderr.exp b/helgrind/tests/tc06_two_races_xml.stderr.exp index e59809bf8e..a442a285e3 100644 --- a/helgrind/tests/tc06_two_races_xml.stderr.exp +++ b/helgrind/tests/tc06_two_races_xml.stderr.exp @@ -46,14 +46,6 @@ 2 ... - - 0x........ - ... - pthread_create_WRK - ... - hg_intercepts.c - ... - 0x........ ...