Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: tools/valgrind/tsan_analyze.py

Issue 7201026: Print suppression hashes for TSan reports (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tools/valgrind/memcheck_analyze.py ('K') | « tools/valgrind/memcheck_analyze.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/valgrind/tsan_analyze.py
===================================================================
--- tools/valgrind/tsan_analyze.py (revision 89657)
+++ tools/valgrind/tsan_analyze.py (working copy)
@@ -10,6 +10,7 @@
import gdb_helper
import common
+import hashlib
import logging
import optparse
import os
@@ -112,11 +113,19 @@
result.append(self.stack_trace_line_)
self.ReadLine()
if re.match('-+ suppression -+', self.line_):
- result.append(self.line_)
+ # We need to calculate the suppression hash and prepend a line like
+ # "Suppression (error hash=#0123456789ABCDEF#):" so the buildbot can
+ # extract the suppression snippet.
+ supp = ""
while not re.match('-+ end suppression -+', self.line_):
self.ReadLine()
- result.append(self.line_)
+ supp += self.line_
self.ReadLine()
+ result.append("Suppression (error hash=#%016X#):\n" % \
+ (int(hashlib.md5(supp).hexdigest()[:16], 16)))
+ result.append(" For more info on using suppressions see "
+ "http://dev.chromium.org/developers/how-tos/using-valgrind/threadsanitizer#TOC-Suppressing-data-races\n")
+ result.append(supp)
else:
self.ReadLine()
« tools/valgrind/memcheck_analyze.py ('K') | « tools/valgrind/memcheck_analyze.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698