From 8e838f705c32c5a40e4618d47f8feaa4ca41757a Mon Sep 17 00:00:00 2001 From: hpayer Date: Mon, 26 Jan 2015 06:54:58 -0800 Subject: [PATCH] Perform full GC if incremental marking is completed or marking deque is empty. BUG= Review URL: https://codereview.chromium.org/874993003 Cr-Commit-Position: refs/heads/master@{#26272} --- src/heap/heap.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/heap/heap.cc b/src/heap/heap.cc index d455094903..bc55f9e1c5 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -827,7 +827,8 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason, const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, IncrementalMarking::NO_GC_VIA_STACK_GUARD); - if (!incremental_marking()->IsComplete() && !FLAG_gc_global) { + if (!incremental_marking()->IsComplete() && + !mark_compact_collector_.marking_deque_.IsEmpty() && !FLAG_gc_global) { if (FLAG_trace_incremental_marking) { PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); }