Reviewers: Hannes Payer,

Message:
PTAL

Description:
Introduce --always-incremental-marking flag.

Please review this at https://codereview.chromium.org/204513002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+8, -4 lines):
  M src/flag-definitions.h
  M src/heap.cc


Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index d69ab89cbc1fe3078d1279f2caa57719784c2e3f..d358a20baa67031bcee6ad9e6b53a9d1f3af4475 100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -526,6 +526,9 @@ DEFINE_bool(age_code, true,
             "old code (required for code flushing)")
 DEFINE_bool(incremental_marking, true, "use incremental marking")
DEFINE_bool(incremental_marking_steps, true, "do incremental marking steps") +DEFINE_bool(always_incremental_marking, false, "always use incremental marking")
+DEFINE_implication(always_incremental_marking, incremental_marking)
+DEFINE_implication(always_incremental_marking, incremental_marking_steps)
 DEFINE_bool(trace_incremental_marking, false,
             "trace progress of the incremental marking")
 DEFINE_bool(track_gc_object_stats, false,
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 4855ac08aeb8e1a56b23df4e527edd97208e977e..a3113c8177964beb2890fafc720870fedee6b45d 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -860,10 +860,11 @@ bool Heap::CollectGarbage(GarbageCollector collector,

   // Start incremental marking for the next cycle. The heap snapshot
   // generator needs incremental marking to stay off after it aborted.
-  if (!mark_compact_collector()->abort_incremental_marking() &&
-      incremental_marking()->IsStopped() &&
-      incremental_marking()->WorthActivating() &&
-      NextGCIsLikelyToBeFull()) {
+  if (incremental_marking()->IsStopped() &&
+      (FLAG_always_incremental_marking ||
+       (!mark_compact_collector()->abort_incremental_marking() &&
+        incremental_marking()->WorthActivating() &&
+        NextGCIsLikelyToBeFull()))) {
     incremental_marking()->Start();
   }



--
--
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/d/optout.

Reply via email to