summaryrefslogtreecommitdiffstats
path: root/tools/valgrind/valgrind_analyze.py
diff options
context:
space:
mode:
authordkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 17:32:56 +0000
committerdkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 17:32:56 +0000
commita74c5c158304362c4da57e875917067a8ed6d48a (patch)
treeff742a097d5a256d2c628fca003a9427adcc480c /tools/valgrind/valgrind_analyze.py
parenta5202c98ef96a71be304140e0f2cc2dc81577be5 (diff)
downloadchromium_src-a74c5c158304362c4da57e875917067a8ed6d48a.zip
chromium_src-a74c5c158304362c4da57e875917067a8ed6d48a.tar.gz
chromium_src-a74c5c158304362c4da57e875917067a8ed6d48a.tar.bz2
Add --show_all_leaks option.
Add --gtest_print_time option to valgrind_test.py and use it always in chrome_test.py, since we probably want to keep an eye out for tests that are too slow for valgrind. Review URL: http://codereview.chromium.org/50055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/valgrind/valgrind_analyze.py')
-rwxr-xr-xtools/valgrind/valgrind_analyze.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/valgrind/valgrind_analyze.py b/tools/valgrind/valgrind_analyze.py
index d382bee..0a08306 100755
--- a/tools/valgrind/valgrind_analyze.py
+++ b/tools/valgrind/valgrind_analyze.py
@@ -128,23 +128,21 @@ class ValgrindAnalyze:
''' Given a set of Valgrind XML files, parse all the errors out of them,
unique them and output the results.'''
- def __init__(self, source_dir, files):
+ def __init__(self, source_dir, files, show_all_leaks=False):
'''Reads in a set of files.
Args:
source_dir: Path to top of source tree for this build
files: A list of filenames.
+ show_all_leaks: whether to show even less important leaks
'''
self._errors = set()
for file in files:
raw_errors = parse(file).getElementsByTagName("error")
for raw_error in raw_errors:
- # Ignore reachable aka "possible" leaks for now.
- # Annoyingly, Valgrind's --xml=yes option seems to
- # force --leak-check=full --show-reachable=yes
- kind = getTextOf(raw_error, "kind")
- if (kind != "Leak_PossiblyLost"):
+ # Ignore "possible" leaks for now by default.
+ if (show_all_leaks or getTextOf(raw_error, "kind") != "Leak_PossiblyLost"):
self._errors.add(ValgrindError(source_dir, raw_error))
def Report(self):