summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authordank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 01:30:20 +0000
committerdank@chromium.org <dank@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 01:30:20 +0000
commit01ca4935562aae152719ad39035fc013b2eec5f6 (patch)
treecaf1533cb93be234226a7b8f4ff42aceef289f52 /tools
parent58bf86404acb1f5976f38ece94174c0ec3f0c1fa (diff)
downloadchromium_src-01ca4935562aae152719ad39035fc013b2eec5f6.zip
chromium_src-01ca4935562aae152719ad39035fc013b2eec5f6.tar.gz
chromium_src-01ca4935562aae152719ad39035fc013b2eec5f6.tar.bz2
Add new option --show-possible to valgrind for later use by valgrind_test.py to speed up log processing.
BUG=17484 TEST=run to install new valgrind; sh tools/valgrind/chrome_tests.sh -t base --tool_flags="--nocleanup_on_exit --show-possible=no"; grep PossiblyLost valgrind.tmp/* should find no matches. Review URL: http://codereview.chromium.org/159251 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-xtools/valgrind/build-valgrind-for-chromium.sh5
-rw-r--r--tools/valgrind/possible.patch56
2 files changed, 61 insertions, 0 deletions
diff --git a/tools/valgrind/build-valgrind-for-chromium.sh b/tools/valgrind/build-valgrind-for-chromium.sh
index 9308388..6eee33f 100755
--- a/tools/valgrind/build-valgrind-for-chromium.sh
+++ b/tools/valgrind/build-valgrind-for-chromium.sh
@@ -42,6 +42,11 @@ patch -p0 < "$THISDIR"/fork.patch
#wget -O longlines.patch "https://bugs.kde.org/attachment.cgi?id=35174"
patch -p0 < "$THISDIR"/longlines.patch
+# Add feature bug https://bugs.kde.org/show_bug.cgi?id=201170
+# "Want --show-possible option so I can ignore the bazillion possible leaks..."
+#wget -O possible.patch https://bugs.kde.org/attachment.cgi?id=35559
+patch -p0 < "$THISDIR"/possible.patch
+
sh autogen.sh
./configure --prefix=/usr/local/valgrind-20090715
make -j4
diff --git a/tools/valgrind/possible.patch b/tools/valgrind/possible.patch
new file mode 100644
index 0000000..af4a1ef
--- /dev/null
+++ b/tools/valgrind/possible.patch
@@ -0,0 +1,56 @@
+Index: memcheck/mc_main.c
+===================================================================
+--- memcheck/mc_main.c (revision 10536)
++++ memcheck/mc_main.c (working copy)
+@@ -4658,6 +4658,7 @@
+ LeakCheckMode MC_(clo_leak_check) = LC_Summary;
+ VgRes MC_(clo_leak_resolution) = Vg_HighRes;
+ Bool MC_(clo_show_reachable) = False;
++Bool MC_(clo_show_possible) = True;
+ Bool MC_(clo_workaround_gcc296_bugs) = False;
+ Int MC_(clo_malloc_fill) = -1;
+ Int MC_(clo_free_fill) = -1;
+@@ -4711,6 +4712,7 @@
+
+ if VG_BOOL_CLO(arg, "--partial-loads-ok", MC_(clo_partial_loads_ok)) {}
+ else if VG_BOOL_CLO(arg, "--show-reachable", MC_(clo_show_reachable)) {}
++ else if VG_BOOL_CLO(arg, "--show-possible", MC_(clo_show_possible)) {}
+ else if VG_BOOL_CLO(arg, "--workaround-gcc296-bugs",
+ MC_(clo_workaround_gcc296_bugs)) {}
+
+@@ -4776,6 +4778,7 @@
+ " --leak-check=no|summary|full search for memory leaks at exit? [summary]\n"
+ " --leak-resolution=low|med|high differentiation of leak stack traces [high]\n"
+ " --show-reachable=no|yes show reachable blocks in leak check? [no]\n"
++" --show-possible=no|yes show possibly lost blocks in leak check? [yes]\n"
+ " --undef-value-errors=no|yes check for undefined value errors [yes]\n"
+ " --track-origins=no|yes show origins of undefined values? [no]\n"
+ " --partial-loads-ok=no|yes too hard to explain here; see manual [no]\n"
+Index: memcheck/mc_include.h
+===================================================================
+--- memcheck/mc_include.h (revision 10536)
++++ memcheck/mc_include.h (working copy)
+@@ -390,6 +390,9 @@
+ /* In leak check, show reachable-but-not-freed blocks? default: NO */
+ extern Bool MC_(clo_show_reachable);
+
++/* In leak check, show possibly-lost blocks? default: YES */
++extern Bool MC_(clo_show_possible);
++
+ /* Assume accesses immediately below %esp are due to gcc-2.96 bugs.
+ * default: NO */
+ extern Bool MC_(clo_workaround_gcc296_bugs);
+Index: memcheck/mc_leakcheck.c
+===================================================================
+--- memcheck/mc_leakcheck.c (revision 10536)
++++ memcheck/mc_leakcheck.c (working copy)
+@@ -844,7 +844,8 @@
+ print_record = is_full_check &&
+ ( MC_(clo_show_reachable) ||
+ Unreached == lr->key.state ||
+- Possible == lr->key.state );
++ ( MC_(clo_show_possible) &&
++ Possible == lr->key.state ) );
+ is_suppressed =
+ MC_(record_leak_error) ( tid, i+1, n_lossrecords, lr, print_record );
+