Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index 76046641cd4f07ee6b44262ae100e914bf03af61..762fcf348c035c6d56b3c4ca863d3c6dbcb50461 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -846,7 +846,7 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason, |
| // generator needs incremental marking to stay off after it aborted. |
| if (!mark_compact_collector()->abort_incremental_marking() && |
| incremental_marking()->IsStopped() && |
| - incremental_marking()->WorthActivating() && NextGCIsLikelyToBeFull()) { |
| + WorthActivatingIncrementalMarking()) { |
| incremental_marking()->Start(); |
| } |
| @@ -4283,6 +4283,11 @@ void Heap::AdvanceIdleIncrementalMarking(intptr_t step_size) { |
| } |
| +bool Heap::WorthActivatingIncrementalMarking() { |
| + return incremental_marking()->WorthActivating() && NextGCIsLikelyToBeFull(); |
| +} |
| + |
| + |
| bool Heap::IdleNotification(int idle_time_in_ms) { |
| // If incremental marking is off, we do not perform idle notification. |
| if (!FLAG_incremental_marking) return true; |
| @@ -4298,7 +4303,8 @@ bool Heap::IdleNotification(int idle_time_in_ms) { |
| bool result = false; |
| switch (action.type) { |
| case DO_INCREMENTAL_MARKING: |
| - if (incremental_marking()->IsStopped()) { |
| + if (incremental_marking()->IsStopped() && |
| + WorthActivatingIncrementalMarking()) { |
|
Hannes Payer (out of office)
2014/08/21 15:25:18
As discussed offline, can we move that into GCIdle
|
| incremental_marking()->Start(); |
| } |
| AdvanceIdleIncrementalMarking(action.parameter); |