Reviewers: Michael Starzinger, ulan,

Description:
Allow incremental marking when expose_gc is turned on.


BUG=


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

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

Affected files:
  M src/extensions/gc-extension.cc
  M src/heap.cc
  M src/incremental-marking.cc


Index: src/extensions/gc-extension.cc
diff --git a/src/extensions/gc-extension.cc b/src/extensions/gc-extension.cc
index 813b9219bfec7eacd0638cf002c8abb368bba3d2..7323a0d100183ad6e94da8ea30add26791d9ba63 100644
--- a/src/extensions/gc-extension.cc
+++ b/src/extensions/gc-extension.cc
@@ -43,6 +43,8 @@ v8::Handle<v8::Value> GCExtension::GC(const v8::Arguments& args) {
   if (args[0]->BooleanValue()) {
     HEAP->CollectGarbage(NEW_SPACE, "gc extension");
   } else {
+    HEAP->mark_compact_collector()->
+        SetFlags(Heap::kAbortIncrementalMarkingMask);
     HEAP->CollectAllGarbage(Heap::kNoGCFlags, "gc extension");
   }
   return v8::Undefined();
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 976d65e959fdc35e50a8efe8964ff9e00a1388c4..49ab6564dac09bf8758a55a2ef865322a7c4c121 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -5322,8 +5322,7 @@ bool Heap::IdleNotification(int hint) {
       AgeInlineCaches();
     }
     int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);
-    if (hint >= mark_sweep_time && !FLAG_expose_gc &&
-        incremental_marking()->IsStopped()) {
+    if (hint >= mark_sweep_time && incremental_marking()->IsStopped()) {
       HistogramTimerScope scope(isolate_->counters()->gc_context());
       CollectAllGarbage(kReduceMemoryFootprintMask,
                         "idle notification: contexts disposed");
@@ -5342,7 +5341,7 @@ bool Heap::IdleNotification(int hint) {
     return false;
   }

- if (!FLAG_incremental_marking || FLAG_expose_gc || Serializer::enabled()) {
+  if (!FLAG_incremental_marking || Serializer::enabled()) {
     return IdleGlobalGC();
   }

Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index e420d28521ec26de2f7a01151e3ade68a28c6235..8cdcdb5e5e4364102baee95166d7424fa7a503dc 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -493,8 +493,7 @@ bool IncrementalMarking::WorthActivating() {
   static const intptr_t kActivationThreshold = 0;
 #endif

-  return !FLAG_expose_gc &&
-      FLAG_incremental_marking &&
+  return FLAG_incremental_marking &&
       !Serializer::enabled() &&
       heap_->PromotedSpaceSizeOfObjects() > kActivationThreshold;
 }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to