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

Unified Diff: runtime/tools/create_snapshot_file.py

Issue 1023753006: First step towards splitting a full snapshot into a vm isolate snapshot and a (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/tools/create_snapshot_bin.py ('k') | runtime/vm/benchmark_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tools/create_snapshot_file.py
===================================================================
--- runtime/tools/create_snapshot_file.py (revision 44745)
+++ runtime/tools/create_snapshot_file.py (working copy)
@@ -20,9 +20,12 @@
def BuildOptions():
result = optparse.OptionParser()
+ result.add_option("--vm_input_bin",
+ action="store", type="string",
+ help="input file name of the vm isolate snapshot in binary form")
result.add_option("--input_bin",
action="store", type="string",
- help="input file name of the snapshot in binary form")
+ help="input file name of the isolate snapshot in binary form")
result.add_option("--input_cc",
action="store", type="string",
help="input file name which contains the C buffer template")
@@ -36,6 +39,9 @@
def ProcessOptions(options):
+ if not options.vm_input_bin:
+ sys.stderr.write('--vm_input_bin not specified\n')
+ return False
if not options.input_bin:
sys.stderr.write('--input_bin not specified\n')
return False
@@ -63,9 +69,11 @@
return result
-def makeFile(output_file, input_cc_file, input_file):
+def makeFile(output_file, input_cc_file,
+ vm_isolate_input_file, isolate_input_file):
snapshot_cc_text = open(input_cc_file).read()
- snapshot_cc_text = snapshot_cc_text % makeString(input_file)
+ snapshot_cc_text = snapshot_cc_text % (makeString(vm_isolate_input_file),
+ makeString(isolate_input_file))
open(output_file, 'w').write(snapshot_cc_text)
return True
@@ -83,7 +91,8 @@
parser.print_help()
return 1
- if not makeFile(options.output, options.input_cc, options.input_bin):
+ if not makeFile(options.output, options.input_cc,
+ options.vm_input_bin, options.input_bin):
print "Unable to generate snapshot in C buffer form"
return -1
« no previous file with comments | « runtime/tools/create_snapshot_bin.py ('k') | runtime/vm/benchmark_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698