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

Side by Side Diff: tools/valgrind/asan/asan_symbolize.py

Issue 1017793002: Revert of Do not allow asan_symbolize.py to fall back to addr2line/atos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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
« no previous file with comments | « no previous file | tools/valgrind/asan/third_party/README.chromium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 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 from third_party import asan_symbolize 7 from third_party import asan_symbolize
8 8
9 import argparse 9 import argparse
10 import base64 10 import base64
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 parser.add_argument('strip_path_prefix', nargs='*', 239 parser.add_argument('strip_path_prefix', nargs='*',
240 help='When printing source file names, the longest prefix ending in one ' 240 help='When printing source file names, the longest prefix ending in one '
241 'of these substrings will be stripped. E.g.: "Release/../../".') 241 'of these substrings will be stripped. E.g.: "Release/../../".')
242 parser.add_argument('--executable-path', 242 parser.add_argument('--executable-path',
243 help='Path to program executable. Used on OSX swarming bots to locate ' 243 help='Path to program executable. Used on OSX swarming bots to locate '
244 'dSYM bundles for associated frameworks and bundles.') 244 'dSYM bundles for associated frameworks and bundles.')
245 args = parser.parse_args() 245 args = parser.parse_args()
246 246
247 disable_buffering() 247 disable_buffering()
248 set_symbolizer_path() 248 set_symbolizer_path()
249 # Disallow fallback to addr2line/atos if llvm-symbolizer is not present. Those
250 # are slow and we don't want to use them ever.
251 asan_symbolize.allow_system_symbolizer = False
252 asan_symbolize.demangle = True 249 asan_symbolize.demangle = True
253 asan_symbolize.fix_filename_patterns = args.strip_path_prefix 250 asan_symbolize.fix_filename_patterns = args.strip_path_prefix
254 # Most source paths for Chromium binaries start with 251 # Most source paths for Chromium binaries start with
255 # /path/to/src/out/Release/../../ 252 # /path/to/src/out/Release/../../
256 asan_symbolize.fix_filename_patterns.append('Release/../../') 253 asan_symbolize.fix_filename_patterns.append('Release/../../')
257 binary_name_filter = None 254 binary_name_filter = None
258 if platform.uname()[0] == 'Darwin': 255 if platform.uname()[0] == 'Darwin':
259 binary_name_filter = make_chrome_osx_binary_name_filter( 256 binary_name_filter = make_chrome_osx_binary_name_filter(
260 chrome_product_dir_path(args.executable_path)) 257 chrome_product_dir_path(args.executable_path))
261 loop = asan_symbolize.SymbolizationLoop( 258 loop = asan_symbolize.SymbolizationLoop(
262 binary_name_filter=binary_name_filter, 259 binary_name_filter=binary_name_filter,
263 dsym_hint_producer=chrome_dsym_hints) 260 dsym_hint_producer=chrome_dsym_hints)
264 261
265 if args.test_summary_json_file: 262 if args.test_summary_json_file:
266 symbolize_snippets_in_json(args.test_summary_json_file, loop) 263 symbolize_snippets_in_json(args.test_summary_json_file, loop)
267 else: 264 else:
268 # Process stdin. 265 # Process stdin.
269 asan_symbolize.logfile = sys.stdin 266 asan_symbolize.logfile = sys.stdin
270 loop.process_logfile() 267 loop.process_logfile()
271 268
272 if __name__ == '__main__': 269 if __name__ == '__main__':
273 main() 270 main()
OLDNEW
« no previous file with comments | « no previous file | tools/valgrind/asan/third_party/README.chromium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698