Revert "Allow incremental marking when expose_gc is turned on."
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 30 Nov 2012 09:42:20 +0000 (09:42 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 30 Nov 2012 09:42:20 +0000 (09:42 +0000)
This reverts r13072 from bleeding edge.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/11316268

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/extensions/gc-extension.cc
src/heap.cc
src/incremental-marking.cc

index 2282075445adba3950ae5c53599926469886c20a..813b9219bfec7eacd0638cf002c8abb368bba3d2 100644 (file)
@@ -43,7 +43,7 @@ v8::Handle<v8::Value> GCExtension::GC(const v8::Arguments& args) {
   if (args[0]->BooleanValue()) {
     HEAP->CollectGarbage(NEW_SPACE, "gc extension");
   } else {
-    HEAP->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask, "gc extension");
+    HEAP->CollectAllGarbage(Heap::kNoGCFlags, "gc extension");
   }
   return v8::Undefined();
 }
index b31564f3638e40ad74acf8cc61a965c6185669c9..ff791d83387b6b9dfba56e560633f2163c4a36d3 100644 (file)
@@ -5323,7 +5323,8 @@ bool Heap::IdleNotification(int hint) {
       AgeInlineCaches();
     }
     int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);
-    if (hint >= mark_sweep_time && incremental_marking()->IsStopped()) {
+    if (hint >= mark_sweep_time && !FLAG_expose_gc &&
+        incremental_marking()->IsStopped()) {
       HistogramTimerScope scope(isolate_->counters()->gc_context());
       CollectAllGarbage(kReduceMemoryFootprintMask,
                         "idle notification: contexts disposed");
@@ -5338,7 +5339,7 @@ bool Heap::IdleNotification(int hint) {
     return false;
   }
 
-  if (!FLAG_incremental_marking || Serializer::enabled()) {
+  if (!FLAG_incremental_marking || FLAG_expose_gc || Serializer::enabled()) {
     return IdleGlobalGC();
   }
 
index 3030bdf8cacdccf8e66e6e54f9d00bbe95fa2302..1457ee3094594af05e646c7f67a6dc8a3a91d83d 100644 (file)
@@ -491,7 +491,8 @@ bool IncrementalMarking::WorthActivating() {
   static const intptr_t kActivationThreshold = 0;
 #endif
 
-  return FLAG_incremental_marking &&
+  return !FLAG_expose_gc &&
+      FLAG_incremental_marking &&
       !Serializer::enabled() &&
       heap_->PromotedSpaceSizeOfObjects() > kActivationThreshold;
 }