| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """A utility script to help building Syzygy-instrumented Chrome binaries.""" | 6 """A utility script to help building Syzygy-instrumented Chrome binaries.""" |
| 7 | 7 |
| 8 import glob | 8 import glob |
| 9 import logging | 9 import logging |
| 10 import optparse | 10 import optparse |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 '--debug-friendly', | 68 '--debug-friendly', |
| 69 '--input-image=%s' % executable, | 69 '--input-image=%s' % executable, |
| 70 '--input-pdb=%s' % symbol, | 70 '--input-pdb=%s' % symbol, |
| 71 '--output-image=%s' % os.path.abspath( | 71 '--output-image=%s' % os.path.abspath( |
| 72 os.path.join(dst_dir, os.path.basename(executable))), | 72 os.path.join(dst_dir, os.path.basename(executable))), |
| 73 '--output-pdb=%s' % os.path.abspath( | 73 '--output-pdb=%s' % os.path.abspath( |
| 74 os.path.join(dst_dir, os.path.basename(symbol)))] | 74 os.path.join(dst_dir, os.path.basename(symbol)))] |
| 75 | 75 |
| 76 if mode == "asan": | 76 if mode == "asan": |
| 77 cmd.append('--no-augment-pdb') | 77 cmd.append('--no-augment-pdb') |
| 78 # Disable some of the new SysyASAN features. We're seeing an increase in |
| 79 # crash rates and are wondering if they are to blame. |
| 80 cmd.append( |
| 81 '--asan-rtl-options="--disable_ctmalloc --disable_large_block_heap"') |
| 78 | 82 |
| 79 # If any filters were specified then pass them on to the instrumenter. | 83 # If any filters were specified then pass them on to the instrumenter. |
| 80 if filter_file: | 84 if filter_file: |
| 81 cmd.append('--filter=%s' % os.path.abspath(filter_file)) | 85 cmd.append('--filter=%s' % os.path.abspath(filter_file)) |
| 82 if allocation_filter_file: | 86 if allocation_filter_file: |
| 83 cmd.append('--allocation-filter-config-file=%s' % | 87 cmd.append('--allocation-filter-config-file=%s' % |
| 84 os.path.abspath(allocation_filter_file)) | 88 os.path.abspath(allocation_filter_file)) |
| 85 | 89 |
| 86 return _Shell(*cmd) | 90 return _Shell(*cmd) |
| 87 | 91 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 option_parser.error('You must provide a destination directory.') | 147 option_parser.error('You must provide a destination directory.') |
| 144 if options.filter and not options.output_filter_file: | 148 if options.filter and not options.output_filter_file: |
| 145 option_parser.error('You must provide a filter output file.') | 149 option_parser.error('You must provide a filter output file.') |
| 146 | 150 |
| 147 return options | 151 return options |
| 148 | 152 |
| 149 | 153 |
| 150 if '__main__' == __name__: | 154 if '__main__' == __name__: |
| 151 logging.basicConfig(level=logging.INFO) | 155 logging.basicConfig(level=logging.INFO) |
| 152 sys.exit(main(_ParseOptions())) | 156 sys.exit(main(_ParseOptions())) |
| OLD | NEW |