diff options
author | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-30 19:48:32 +0000 |
---|---|---|
committer | dkegel@google.com <dkegel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-30 19:48:32 +0000 |
commit | 20642bec700c2e432d364488fda394a5d2add130 (patch) | |
tree | fae948f481c1d4a98a4036529c477708f3143659 /tools | |
parent | 288488c29bc8eabd5f2c34c0fd1b07fe7b006dd0 (diff) | |
download | chromium_src-20642bec700c2e432d364488fda394a5d2add130.zip chromium_src-20642bec700c2e432d364488fda394a5d2add130.tar.gz chromium_src-20642bec700c2e432d364488fda394a5d2add130.tar.bz2 |
Massage autogenerated suppressions to be more portable
between mac and linux, and to avoid droning on and on and on and on.
Review URL: http://codereview.chromium.org/255026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27642 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/valgrind/memcheck_analyze.py | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tools/valgrind/memcheck_analyze.py b/tools/valgrind/memcheck_analyze.py index d0ac76b..af5d09d 100755 --- a/tools/valgrind/memcheck_analyze.py +++ b/tools/valgrind/memcheck_analyze.py @@ -251,7 +251,28 @@ class ValgrindError: if (self._suppression != None): output += "Suppression:" - output += self._suppression + # Widen suppression slightly to make portable between mac and linux + supp = self._suppression; + supp = supp.replace("fun:_Znwj", "fun:_Znw*") + supp = supp.replace("fun:_Znwm", "fun:_Znw*") + # Split into lines so we can enforce length limits + supplines = supp.split("\n") + + # Truncate at line 26 (VG_MAX_SUPP_CALLERS plus 2 for name and type) + # or at the first 'boring' caller. + # (https://bugs.kde.org/show_bug.cgi?id=199468 proposes raising + # VG_MAX_SUPP_CALLERS, but we're probably fine with it as is.) + # TODO(dkegel): add more boring callers + newlen = 26; + try: + newlen = min(newlen, supplines.index(" fun:_ZN11MessageLoop3RunEv")) + except ValueError: + pass + if (len(supplines) > newlen): + supplines = supplines[0:newlen] + supplines.append("}") + + output += "\n".join(supplines) + "\n" return output |