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

Unified Diff: src/mksnapshot.cc

Issue 240193002: Serializer enable/disable flags need thread safety. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Code comment response. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/serialize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mksnapshot.cc
diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc
index 07b057549237f14ab2f75ecebf858b7345620bd3..47b5b3cda790fafa0ac217b2e81759b490939534 100644
--- a/src/mksnapshot.cc
+++ b/src/mksnapshot.cc
@@ -41,6 +41,10 @@
#include "serialize.h"
#include "list.h"
+#if V8_TARGET_ARCH_ARM
+#include "arm/assembler-arm-inl.h"
+#endif
+
using namespace v8;
@@ -272,6 +276,12 @@ int main(int argc, char** argv) {
// By default, log code create information in the snapshot.
i::FLAG_log_code = true;
+#if V8_TARGET_ARCH_ARM
+ // Printing flags on ARM requires knowing if we intend to enable
+ // the serializer or not.
+ v8::internal::CpuFeatures::SetHintCreatingSnapshot();
+#endif
+
// Print the usage if an error occurs when parsing the command line
// flags or if the help flag is set.
int result = i::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
@@ -293,7 +303,7 @@ int main(int argc, char** argv) {
Isolate* isolate = v8::Isolate::New();
isolate->Enter();
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
- i::Serializer::Enable(internal_isolate);
+ i::Serializer::RequestEnable(internal_isolate);
Persistent<Context> context;
{
HandleScope handle_scope(isolate);
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698