OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # This is a small script for manually launching valgrind, along with passing | 7 # This is a small script for manually launching valgrind, along with passing |
8 # it the suppression file, and some helpful arguments (automatically attaching | 8 # it the suppression file, and some helpful arguments (automatically attaching |
9 # the debugger on failures, etc). Run it from your repo root, something like: | 9 # the debugger on failures, etc). Run it from your repo root, something like: |
10 # $ sh ./tools/valgrind/valgrind.sh ./sconsbuild/Debug/chrome | 10 # $ sh ./tools/valgrind/valgrind.sh ./sconsbuild/Debug/chrome |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 fi | 90 fi |
91 | 91 |
92 set -x | 92 set -x |
93 | 93 |
94 # G_SLICE=always-malloc: make glib use system malloc | 94 # G_SLICE=always-malloc: make glib use system malloc |
95 # NSS_DISABLE_ARENA_FREE_LIST=1: make nss use system malloc | 95 # NSS_DISABLE_ARENA_FREE_LIST=1: make nss use system malloc |
96 # G_DEBUG=fatal_warnings: make GTK abort on any critical or warning assertions. | 96 # G_DEBUG=fatal_warnings: make GTK abort on any critical or warning assertions. |
97 # If it crashes on you in the Options menu, you hit bug 19751, | 97 # If it crashes on you in the Options menu, you hit bug 19751, |
98 # comment out the G_DEBUG=fatal_warnings line. | 98 # comment out the G_DEBUG=fatal_warnings line. |
99 # | 99 # |
100 # --smc-check=all: handle v8's dynamic code generation. | 100 # GTEST_DEATH_TEST_USE_FORK=1: make gtest death tests valgrind-friendly |
101 # (though we can probably remove that now that v8 is annotated). | |
102 # --trace-children to follow into the renderer processes. | |
103 # | 101 # |
104 # When everyone has the latest valgrind, we might want to add | 102 # When everyone has the latest valgrind, we might want to add |
105 # --show-possible=no | 103 # --show-possible=no |
106 # to ignore possible but not definite leaks. | 104 # to ignore possible but not definite leaks. |
107 | 105 |
108 G_SLICE=always-malloc \ | 106 G_SLICE=always-malloc \ |
109 NSS_DISABLE_ARENA_FREE_LIST=1 \ | 107 NSS_DISABLE_ARENA_FREE_LIST=1 \ |
110 G_DEBUG=fatal_warnings \ | 108 G_DEBUG=fatal_warnings \ |
| 109 GTEST_DEATH_TEST_USE_FORK=1 \ |
111 valgrind \ | 110 valgrind \ |
112 --tool=$TOOL_NAME \ | 111 --tool=$TOOL_NAME \ |
113 --trace-children=yes \ | 112 --trace-children=yes \ |
114 --suppressions="$SUPPRESSIONS" \ | 113 --suppressions="$SUPPRESSIONS" \ |
115 --smc-check=all \ | |
116 "${DEFAULT_TOOL_FLAGS[@]}" \ | 114 "${DEFAULT_TOOL_FLAGS[@]}" \ |
117 "$@" | 115 "$@" |
OLD | NEW |