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}
This commit is contained in:
hpayer 2015-01-26 06:54:58 -08:00 committed by Commit bot
parent ae22d7f873
commit 8e838f705c

View File

@ -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");
}