]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add tc06_two_races_xml.exp output for ppc64
authorCarl Love <cel@us.ibm.com>
Wed, 14 Sep 2016 16:43:27 +0000 (16:43 +0000)
committerCarl Love <cel@us.ibm.com>
Wed, 14 Sep 2016 16:43:27 +0000 (16:43 +0000)
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  <will_schmidt@vnet.ibm.com>

Bugzilla 368416

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15956

helgrind/tests/filter_xml
helgrind/tests/tc06_two_races_xml.stderr.exp

index 6de080af460c1f9102a9671840baac63e6348091..cc0b71ea07a4105d35273d7d3cf4cee84e38b2f4 100755 (executable)
@@ -46,7 +46,13 @@ my %patterns = (
 # List of XML sections to be ignored.
 my %ignore_sections = (
     "<errorcounts>" => "</errorcounts>",
-    "<suppcounts>"  => "</suppcounts>"
+    "<suppcounts>"  => "</suppcounts>",
+    "pthread_create_WRK</fn>" => "<obj>"
+);
+
+# List of XML sections to be quietly ignored.
+my %quiet_ignore_sections = (
+    "pthread_create_WRK</fn>" => "<obj>"
 );
 
 
@@ -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 (<STDIN>) {
@@ -78,8 +84,11 @@ while (<STDIN>) {
     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 (<STDIN>) {
                 $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);
index e59809bf8ef7c518fe1015081ef9f8e364e57791..a442a285e331360d266bc49d27b06e32d62d7a84 100644 (file)
   <hthreadid>2</hthreadid>
   <stack>
     <frame>...</frame>
-    <frame>
-      <ip>0x........</ip>
-      <obj>...</obj>
-      <fn>pthread_create_WRK</fn>
-      <dir>...</dir>
-      <file>hg_intercepts.c</file>
-      <line>...</line>
-    </frame>
     <frame>
       <ip>0x........</ip>
       <obj>...</obj>