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

Side by Side Diff: src/snapshot/mksnapshot.cc

Issue 1859063003: [serializer] make snapshot reproducible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <errno.h> 5 #include <errno.h>
6 #include <signal.h> 6 #include <signal.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/libplatform/libplatform.h" 9 #include "include/libplatform/libplatform.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 fclose(file); 133 fclose(file);
134 return chars; 134 return chars;
135 } 135 }
136 136
137 137
138 int main(int argc, char** argv) { 138 int main(int argc, char** argv) {
139 // By default, log code create information in the snapshot. 139 // By default, log code create information in the snapshot.
140 i::FLAG_log_code = true; 140 i::FLAG_log_code = true;
141 i::FLAG_logfile_per_isolate = false; 141 i::FLAG_logfile_per_isolate = false;
142 142 // Make mksnapshot runs predictable to create reproducible snapshots.
143 i::FLAG_predictable = true;
143 // Print the usage if an error occurs when parsing the command line 144 // Print the usage if an error occurs when parsing the command line
144 // flags or if the help flag is set. 145 // flags or if the help flag is set.
145 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true); 146 int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
146 if (result > 0 || (argc > 3) || i::FLAG_help) { 147 if (result > 0 || (argc > 3) || i::FLAG_help) {
147 ::printf("Usage: %s --startup_src=... --startup_blob=... [extras]\n", 148 ::printf("Usage: %s --startup_src=... --startup_blob=... [extras]\n",
148 argv[0]); 149 argv[0]);
149 i::FlagList::PrintHelp(); 150 i::FlagList::PrintHelp();
150 return !i::FLAG_help; 151 return !i::FLAG_help;
151 } 152 }
152 153
(...skipping 23 matching lines...) Expand all
176 CHECK(blob.data); 177 CHECK(blob.data);
177 writer.WriteSnapshot(blob); 178 writer.WriteSnapshot(blob);
178 delete[] blob.data; 179 delete[] blob.data;
179 } 180 }
180 181
181 V8::Dispose(); 182 V8::Dispose();
182 V8::ShutdownPlatform(); 183 V8::ShutdownPlatform();
183 delete platform; 184 delete platform;
184 return 0; 185 return 0;
185 } 186 }
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/snapshot/startup-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698