Chromium Code Reviews| Index: chrome/tools/build/win/syzygy/instrument.py |
| diff --git a/chrome/tools/build/win/syzygy_instrument.py b/chrome/tools/build/win/syzygy/instrument.py |
| similarity index 90% |
| rename from chrome/tools/build/win/syzygy_instrument.py |
| rename to chrome/tools/build/win/syzygy/instrument.py |
| index ae6558e7cf297f6967a2a58f92b85bd239e482eb..29c4bde650919fc7d4de9c470560fae192b33bbf 100755 |
| --- a/chrome/tools/build/win/syzygy_instrument.py |
| +++ b/chrome/tools/build/win/syzygy/instrument.py |
| @@ -58,7 +58,7 @@ def _CompileFilter(syzygy_dir, executable, symbol, filter_file, |
| def _InstrumentBinary(syzygy_dir, mode, executable, symbol, dst_dir, |
| - filter_file): |
| + filter_file, allocation_filter_file): |
| """Instruments the executable found in input_dir, and writes the resultant |
| instrumented executable and symbol files to dst_dir. |
| """ |
| @@ -76,9 +76,12 @@ def _InstrumentBinary(syzygy_dir, mode, executable, symbol, dst_dir, |
| if mode == "asan": |
| cmd.append('--no-augment-pdb') |
| - # If a filter was specified then pass it on to the instrumenter. |
| + # If any filters were specified then pass them on to the instrumenter. |
| if filter_file: |
| cmd.append('--filter=%s' % os.path.abspath(filter_file)) |
| + if allocation_filter_file: |
| + cmd.append('--allocation-filter-config-file=%s' % |
| + os.path.abspath(allocation_filter_file)) |
| return _Shell(*cmd) |
| @@ -104,7 +107,8 @@ def main(options): |
| options.input_executable, |
| options.input_symbol, |
| options.destination_dir, |
| - options.output_filter_file) |
| + options.output_filter_file, |
| + options.allocation_filter_file) |
| def _ParseOptions(): |
| @@ -125,6 +129,9 @@ def _ParseOptions(): |
| option_parser.add_option('--output-filter-file', |
| help='The path where the compiled filter will be written. This is ' |
| 'required if --filter is specified.') |
| + option_parser.add_option('--allocation-filter-file', |
| + help='THe path to the SyzyASAN allocation filter to use.') |
| + option_parser.add |
|
Sébastien Marchand
2014/12/15 16:13:27
oops ?
chrisha
2014/12/15 16:17:28
Err, yeah.
|
| options, args = option_parser.parse_args() |
| if not options.mode: |