Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index ae730374c605a1440fb88a32c4ccbab6cd51feac..18b37fe552a23c8beb0de927fc0e8d8d68c1a6ec 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -4296,6 +4296,8 @@ bool Heap::IdleNotification(int idle_time_in_ms) { |
| heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); |
|
ulan
2014/08/22 08:05:35
incremental_marking has SWEEPING state, should we
Hannes Payer (out of office)
2014/08/22 09:57:04
The SWEEPING state in incremental marking is just
|
| heap_state.can_start_incremental_marking = |
| WorthActivatingIncrementalMarking(); |
| + heap_state.sweeping_in_progress = |
| + mark_compact_collector()->sweeping_in_progress(); |
| GCIdleTimeAction action = |
| gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state, tracer()); |
| @@ -4321,18 +4323,12 @@ bool Heap::IdleNotification(int idle_time_in_ms) { |
| case DO_SCAVENGE: |
| CollectGarbage(NEW_SPACE, "idle notification: scavenge"); |
| break; |
| + case DO_FINALIZE_SWEEPING: |
| + mark_compact_collector()->EnsureSweepingCompleted(); |
| case DO_NOTHING: |
| result = true; |
| break; |
| } |
| - // If the IdleNotifcation is called with a large hint we will wait for |
| - // the sweepter threads here. |
| - // TODO(ulan): move this in GCIdleTimeHandler. |
| - const int kMinHintForFullGC = 100; |
| - if (idle_time_in_ms >= kMinHintForFullGC && |
| - mark_compact_collector()->sweeping_in_progress()) { |
| - mark_compact_collector()->EnsureSweepingCompleted(); |
| - } |
| return result; |
| } |