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

Side by Side Diff: tools/valgrind/drmemory_analyze.py

Issue 8437089: Add name= fields to sanity suppressions, suppress a couple of new[]/delete mismatches (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # drmemory_analyze.py 6 # drmemory_analyze.py
7 7
8 ''' Given a Dr. Memory output file, parses errors and uniques them.''' 8 ''' Given a Dr. Memory output file, parses errors and uniques them.'''
9 9
10 import logging 10 import logging
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 self.reports.append(self.line_.strip()) 71 self.reports.append(self.line_.strip())
72 72
73 while True: 73 while True:
74 self.ReadLine(); 74 self.ReadLine();
75 if (self.line_ == ''): break 75 if (self.line_ == ''): break
76 76
77 if re.search("SUPPRESSIONS USED:", self.line_): 77 if re.search("SUPPRESSIONS USED:", self.line_):
78 self.ReadLine() 78 self.ReadLine()
79 while self.line_.strip() != "": 79 while self.line_.strip() != "":
80 line = self.line_.strip() 80 line = self.line_.strip()
81 (count, name) = re.match(" *([0-9]+)x: (.*)", line).groups() 81 (count, name) = re.match(" *([0-9]+)x(?: \(leaked .*\))?: (.*)",
82 line).groups()
82 self.used_suppressions.append("%7s %s" % (count, name)) 83 self.used_suppressions.append("%7s %s" % (count, name))
83 self.ReadLine() 84 self.ReadLine()
84 break 85 break
85 86
86 self.cur_fd_.close() 87 self.cur_fd_.close()
87 88
88 def Report(self, check_sanity): 89 def Report(self, check_sanity):
89 sys.stdout.flush() 90 sys.stdout.flush()
90 #TODO(timurrrr): support positive tests / check_sanity==True 91 #TODO(timurrrr): support positive tests / check_sanity==True
91 92
(...skipping 28 matching lines...) Expand all
120 121
121 (options, args) = parser.parse_args() 122 (options, args) = parser.parse_args()
122 if len(args) == 0: 123 if len(args) == 0:
123 parser.error("no filename specified") 124 parser.error("no filename specified")
124 filenames = args 125 filenames = args
125 126
126 analyzer = DrMemoryAnalyze(options.source_dir, filenames) 127 analyzer = DrMemoryAnalyze(options.source_dir, filenames)
127 retcode = analyzer.Report(False) 128 retcode = analyzer.Report(False)
128 129
129 sys.exit(retcode) 130 sys.exit(retcode)
OLDNEW
« tools/valgrind/drmemory/suppressions.txt ('K') | « tools/valgrind/drmemory/suppressions.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698