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

Unified Diff: chrome/tools/build/win/syzygy/instrument.py

Issue 773253004: Move Syzygy build related things to their own directory with an OWNERS file, and add an allocation … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit. Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/tools/build/win/syzygy/OWNERS ('k') | chrome/tools/build/win/syzygy/reorder.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 91%
rename from chrome/tools/build/win/syzygy_instrument.py
rename to chrome/tools/build/win/syzygy/instrument.py
index ae6558e7cf297f6967a2a58f92b85bd239e482eb..f3c725c517f80c6f15d2f60b49e6c3d43a46432f 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,8 @@ 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.')
options, args = option_parser.parse_args()
if not options.mode:
« no previous file with comments | « chrome/tools/build/win/syzygy/OWNERS ('k') | chrome/tools/build/win/syzygy/reorder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698