Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index ce0ec0be916ee168947c95e4ff263d512b3e5118..c9e7359d5749f86126cc7e8675369212bab95c34 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -4976,6 +4976,15 @@ bool Heap::IdleNotification(double deadline_in_seconds) { |
| double start_ms = MonotonicallyIncreasingTimeInMs(); |
| double idle_time_in_ms = deadline_in_ms - start_ms; |
| + if (idle_time_in_ms >= GCIdleTimeHandler::kMinBackgroundIdleTime) { |
| + MemoryReducer::Event event; |
| + event.type = MemoryReducer::kBackgroundIdleNotification; |
| + event.time_ms = start_ms; |
| + event.can_start_incremental_gc = incremental_marking()->IsStopped() && |
| + incremental_marking()->CanBeActivated(); |
| + memory_reducer_.NotifyBackgroundIdleNotification(event); |
| + } |
|
Hannes Payer (out of office)
2015/07/07 07:49:34
Let's make this block a method to keep IdleNotific
ulan
2015/07/07 11:58:26
Done.
|
| + |
| tracer()->SampleAllocation(start_ms, NewSpaceAllocationCounter(), |
| OldGenerationAllocationCounter()); |