Chromium Code Reviews| Index: src/heap/gc-idle-time-handler.h |
| diff --git a/src/heap/gc-idle-time-handler.h b/src/heap/gc-idle-time-handler.h |
| index f953c87b3b81049345b2f23e15b451eb694c844d..681edaacb7906d91c1b3c89472a9e43ace376b7f 100644 |
| --- a/src/heap/gc-idle-time-handler.h |
| +++ b/src/heap/gc-idle-time-handler.h |
| @@ -16,6 +16,7 @@ enum GCIdleTimeActionType { |
| DO_INCREMENTAL_MARKING, |
| DO_SCAVENGE, |
| DO_FULL_GC, |
| + DO_FULL_GC_COMPACT, |
| DO_FINALIZE_SWEEPING |
| }; |
| @@ -62,6 +63,14 @@ class GCIdleTimeAction { |
| return result; |
| } |
| + static GCIdleTimeAction FullGCCompact() { |
| + GCIdleTimeAction result; |
| + result.type = DO_FULL_GC_COMPACT; |
| + result.parameter = 0; |
| + result.additional_work = false; |
| + return result; |
| + } |
| + |
| static GCIdleTimeAction FinalizeSweeping() { |
| GCIdleTimeAction result; |
| result.type = DO_FINALIZE_SWEEPING; |
| @@ -122,6 +131,10 @@ class GCIdleTimeHandler { |
| // 16 ms when there is currently no rendering going on. |
| static const size_t kMaxScheduledIdleTime = 50; |
| + // This is the minimum time needed to trigger a full garbage collection which |
| + // tries to reduce memory footprint. |
| + static const size_t kMinTimeForReduceMemory = 600; |
|
rmcilroy
2015/04/10 11:14:35
I'm guessing you are relying on the 1000ms IdleHan
Hannes Payer (out of office)
2015/04/10 13:06:57
Yes, exactly.
|
| + |
| // We conservatively assume that in the next kTimeUntilNextIdleEvent ms |
| // no idle notification happens. |
| static const size_t kTimeUntilNextIdleEvent = 100; |
| @@ -195,6 +208,8 @@ class GCIdleTimeHandler { |
| size_t size_of_objects, |
| size_t mark_compact_speed_in_bytes_per_ms); |
| + static bool ShouldDoReduceMemoryMarkCompact(size_t idle_time_in_ms); |
| + |
| static bool ShouldDoContextDisposalMarkCompact(int context_disposed, |
| double contexts_disposal_rate); |