Revision: 18358
Author:   [email protected]
Date:     Wed Dec 18 17:31:12 2013 UTC
Log:      --predictable mode added

[email protected]

Review URL: https://codereview.chromium.org/93633008
http://code.google.com/p/v8/source/detail?r=18358

Modified:
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/v8.cc

=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Fri Dec 6 09:52:40 2013 UTC +++ /branches/bleeding_edge/src/flag-definitions.h Wed Dec 18 17:31:12 2013 UTC
@@ -69,6 +69,9 @@
 #define DEFINE_implication(whenflag, thenflag) \
   if (FLAG_##whenflag) FLAG_##thenflag = true;

+#define DEFINE_neg_implication(whenflag, thenflag) \
+  if (FLAG_##whenflag) FLAG_##thenflag = false;
+
 #else
 #error No mode supplied when including flags.defs
 #endif
@@ -90,6 +93,10 @@
 #define DEFINE_implication(whenflag, thenflag)
 #endif

+#ifndef DEFINE_neg_implication
+#define DEFINE_neg_implication(whenflag, thenflag)
+#endif
+
 #define COMMA ,

 #ifdef FLAG_MODE_DECLARE
@@ -628,6 +635,14 @@
 DEFINE_bool(profile_hydrogen_code_stub_compilation, false,
"Print the time it takes to lazily compile hydrogen code stubs.")

+DEFINE_bool(predictable, false, "enable predictable mode")
+DEFINE_neg_implication(predictable, randomize_hashes)
+DEFINE_neg_implication(predictable, concurrent_recompilation)
+DEFINE_neg_implication(predictable, concurrent_osr)
+DEFINE_neg_implication(predictable, concurrent_sweeping)
+DEFINE_neg_implication(predictable, parallel_sweeping)
+
+
 //
 // Dev shell flags
 //
@@ -875,6 +890,7 @@
 #undef DEFINE_float
 #undef DEFINE_args
 #undef DEFINE_implication
+#undef DEFINE_neg_implication
 #undef DEFINE_ALIAS_bool
 #undef DEFINE_ALIAS_int
 #undef DEFINE_ALIAS_string
=======================================
--- /branches/bleeding_edge/src/v8.cc   Wed Nov 27 17:21:40 2013 UTC
+++ /branches/bleeding_edge/src/v8.cc   Wed Dec 18 17:31:12 2013 UTC
@@ -162,6 +162,15 @@

 void V8::InitializeOncePerProcessImpl() {
   FlagList::EnforceFlagImplications();
+
+  if (FLAG_predictable) {
+    if (FLAG_random_seed == 0) {
+      // Avoid random seeds in predictable mode.
+      FLAG_random_seed = 12347;
+    }
+    FLAG_hash_seed = 0;
+  }
+
   if (FLAG_stress_compaction) {
     FLAG_force_marking_deque_overflows = true;
     FLAG_gc_global = true;

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to