Chromium Code Reviews| Index: src/heap.cc |
| diff --git a/src/heap.cc b/src/heap.cc |
| index 4ce1816673a39368e57931c0f2a934594b5c0efc..9416bc3292d90b649ca9f72442c1f46aff3c280f 100644 |
| --- a/src/heap.cc |
| +++ b/src/heap.cc |
| @@ -504,11 +504,17 @@ bool Heap::CollectGarbage(AllocationSpace space, |
| !incremental_marking()->IsStopped() && |
| !incremental_marking()->should_hurry() && |
| FLAG_incremental_marking_steps) { |
| - if (FLAG_trace_incremental_marking) { |
| - PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); |
| + // Make progress in incremental marking. |
| + const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; |
| + incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, |
| + IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| + if (!incremental_marking()->IsComplete()) { |
| + if (FLAG_trace_incremental_marking) { |
| + PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); |
| + } |
| + collector = SCAVENGER; |
| + collector_reason = "incremental marking delaying mark-sweep"; |
| } |
| - collector = SCAVENGER; |
| - collector_reason = "incremental marking delaying mark-sweep"; |
| } |
| bool next_gc_likely_to_collect_more = false; |
| @@ -4817,10 +4823,8 @@ void Heap::EnsureHeapIsIterable() { |
| void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) { |
| - // This flag prevents incremental marking from requesting GC via stack guard |
| - idle_notification_will_schedule_next_gc_ = true; |
|
Michael Starzinger
2012/04/02 09:01:46
This was the last site that changed the above flag
ulan
2012/04/02 09:42:24
Done.
|
| - incremental_marking()->Step(step_size); |
| - idle_notification_will_schedule_next_gc_ = false; |
| + incremental_marking()->Step(step_size, |
| + IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| if (incremental_marking()->IsComplete()) { |
| bool uncommit = false; |