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

Unified Diff: runtime/tools/create_snapshot_bin.py

Issue 2902313004: CoreJIT snapshots without training. (Closed)
Patch Set: . Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/tools/create_snapshot_bin.py
diff --git a/runtime/tools/create_snapshot_bin.py b/runtime/tools/create_snapshot_bin.py
index 7fd77e6f1ab7f6170629cb9de60ff8d5d2cf3dff..ada0d11171485ebe2292cf8ee3454e296c82eb8d 100755
--- a/runtime/tools/create_snapshot_bin.py
+++ b/runtime/tools/create_snapshot_bin.py
@@ -14,11 +14,6 @@ import sys
import utils
-HOST_OS = utils.GuessOS()
-HOST_CPUS = utils.GuessCpus()
-DEBUG = False
-VERBOSE = False
-
def BuildOptions():
result = optparse.OptionParser()
result.add_option("--executable",
@@ -32,10 +27,18 @@ def BuildOptions():
action="store", type="string",
help="output file name into which vm isolate snapshot in binary form " +
"is generated")
+ result.add_option("--vm_instructions_output_bin",
+ action="store", type="string",
+ help="output file name into which vm isolate snapshot in binary form " +
+ "is generated")
result.add_option("--isolate_output_bin",
action="store", type="string",
help="output file name into which isolate snapshot in binary form " +
"is generated")
+ result.add_option("--isolate_instructions_output_bin",
+ action="store", type="string",
+ help="output file name into which isolate snapshot in binary form " +
+ "is generated")
result.add_option("--embedder_entry_points_manifest",
action="store", type="string",
help="input manifest with the vm entry points in a precompiled snapshot")
@@ -56,12 +59,6 @@ def BuildOptions():
result.add_option("-v", "--verbose",
help='Verbose output.',
default=False, action="store_true")
- result.add_option("--target_os",
- action="store", type="string",
- help="Which os to run the executable on. Current choice is android")
- result.add_option("--abi",
- action="store", type="string",
- help="Desired ABI for android target OS. armeabi-v7a or x86")
result.add_option("--timestamp_file",
action="store", type="string",
help="Path to timestamp file that will be written",
@@ -82,8 +79,13 @@ def ProcessOptions(options):
if not options.isolate_output_bin:
sys.stderr.write('--isolate_output_bin not specified\n')
return False
- if options.abi and not options.target_os == 'android':
- sys.stderr.write('--abi requires --target_os android\n')
+ if (options.snapshot_kind == 'core-jit'
+ and not options.vm_instructions_output_bin):
+ sys.stderr.write('--vm_instructions_output_bin not specified\n')
+ return False
+ if (options.snapshot_kind == 'core-jit'
+ and not options.isolate_instructions_output_bin):
+ sys.stderr.write('--isolate_instructions_output_bin not specified\n')
return False
return True
@@ -110,9 +112,7 @@ def Main():
return 1
# Setup arguments to the snapshot generator binary.
- script_args = ["--ignore_unrecognized_flags",
- "--error_on_bad_type",
- "--error_on_bad_override"]
+ script_args = ["--ignore_unrecognized_flags" ]
# Pass along the package_root if there is one.
if options.package_root:
@@ -127,6 +127,13 @@ def Main():
script_args.append(''.join([ "--vm_snapshot_data=", options.vm_output_bin ]))
script_args.append(''.join([ "--isolate_snapshot_data=", options.isolate_output_bin ]))
+ if options.vm_instructions_output_bin != None:
+ script_args.append(''.join([ "--vm_snapshot_instructions=",
+ options.vm_instructions_output_bin ]))
+ if options.isolate_instructions_output_bin != None:
+ script_args.append(''.join([ "--isolate_snapshot_instructions=",
+ options.isolate_instructions_output_bin ]))
+
# Specify the embedder entry points snapshot
if options.embedder_entry_points_manifest:
script_args.append(''.join([ "--embedder_entry_points_manifest=",

Powered by Google App Engine
This is Rietveld 408576698