summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbruening@google.com <bruening@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 17:10:53 +0000
committerbruening@google.com <bruening@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-04 17:10:53 +0000
commit413ff204295280c8d54b93f1eded372b07e34015 (patch)
treea936eebafa704e24ae8c3c9814f0daf533c5f67a
parente6fdd386ce9743c2d965033042d69a6acba60ad3 (diff)
downloadchromium_src-413ff204295280c8d54b93f1eded372b07e34015.zip
chromium_src-413ff204295280c8d54b93f1eded372b07e34015.tar.gz
chromium_src-413ff204295280c8d54b93f1eded372b07e34015.tar.bz2
update to use latest drmem output filtering
BUG= TEST=ran printing_unittests EmfTest w/ suppressions disabled Review URL: http://codereview.chromium.org/8002011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103928 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xtools/valgrind/drmemory_analyze.py36
-rwxr-xr-xtools/valgrind/valgrind_test.py11
2 files changed, 14 insertions, 33 deletions
diff --git a/tools/valgrind/drmemory_analyze.py b/tools/valgrind/drmemory_analyze.py
index 63dd87c..34df08b 100755
--- a/tools/valgrind/drmemory_analyze.py
+++ b/tools/valgrind/drmemory_analyze.py
@@ -1,11 +1,11 @@
#!/usr/bin/python
-# Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# drmemory_analyze.py
-''' Given a ThreadSanitizer output file, parses errors and uniques them.'''
+''' Given a Dr. Memory output file, parses errors and uniques them.'''
import logging
import optparse
@@ -45,39 +45,11 @@ class DrMemoryAnalyze:
self.stack_trace_line_ = None
def ReadSection(self):
- FILE_PREFIXES_TO_CUT = [
- "build\\src\\",
- "chromium\\src\\",
- "crt_bld\\self_x86\\",
- ]
- BORING_CALLERS = [
- "BaseThreadInitThunk",
- "testing.*Test.*Run.*",
- "testing::internal.*",
- "MessageLoop::Run",
- "RunnableMethod.*"
- ]
- CUT_STACK_BELOW = (r"\.(exe|dll|DLL)!(" + "|".join(BORING_CALLERS) +
- r")(\s+\[.*\]$|\s*$)")
- # TODO(timurrrr): whitespaces needed in "\s*$" due to
- # http://code.google.com/p/drmemory/issues/detail?id=584
-
result = [self.line_]
self.ReadLine()
- skip_following_frames = False
while len(self.line_.strip()) > 0:
- cur_line = self.line_
+ result.append(self.line_)
self.ReadLine()
- if skip_following_frames or re.search(CUT_STACK_BELOW, cur_line):
- skip_following_frames = True
- continue
- for prefix in FILE_PREFIXES_TO_CUT:
- regexp = "([^\[\]]+" + re.escape(prefix) + ").*"
- m = re.search(regexp, cur_line)
- if m:
- assert len(m.groups()) == 1
- cur_line = cur_line.replace(m.groups()[0], "")
- result.append(cur_line)
return result
def ParseReportFile(self, filename):
@@ -87,7 +59,7 @@ class DrMemoryAnalyze:
self.ReadLine()
if (self.line_ == ''):
break
- if re.search("Grouping errors that", self.line_):
+ if re.search("FINAL SUMMARY", self.line_):
# DrMemory has finished working.
break
tmp = []
diff --git a/tools/valgrind/valgrind_test.py b/tools/valgrind/valgrind_test.py
index 638aaf7..aa26c3c 100755
--- a/tools/valgrind/valgrind_test.py
+++ b/tools/valgrind/valgrind_test.py
@@ -809,10 +809,19 @@ class DrMemory(BaseTool):
proc += ["-debug"]
proc += ["-logdir", self.log_dir]
- proc += ["-batch", "-quiet"]
+ proc += ["-batch", "-quiet", "-no_results_to_stderr"]
proc += ["-callstack_max_frames", "40"]
+ # make callstacks easier to read
+ proc += ["-callstack_srcfile_prefix",
+ "build\\src,chromium\\src,crt_build\\self_x86"]
+ proc += ["-callstack_truncate_below",
+ "main,BaseThreadInitThunk,testing*Test*Run*,"+
+ "testing::internal*,MessageLoop::Run,RunnableMethod*"]
+ proc += ["-callstack_modname_hide",
+ "*.exe,chrome.dll"]
+
if not self.handle_uninits_and_leaks:
proc += ["-no_check_uninitialized", "-no_count_leaks"]