| 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 473b4742d496d3d1baa5e69d1e12115d620630cb..16a1f948d31208affecd438958fcb41fce7e0d76 100644
|
| --- a/src/heap/gc-idle-time-handler.h
|
| +++ b/src/heap/gc-idle-time-handler.h
|
| @@ -113,14 +113,18 @@ class GCIdleTimeHandler {
|
| // That is the maximum idle time we will have during frame rendering.
|
| static const size_t kMaxFrameRenderingIdleTime = 16;
|
|
|
| + // We consider idle notification with larger or equal invocations as large
|
| + // idle notifications.
|
| + static const size_t kLargeIdleTime = 10;
|
| +
|
| + // Scavenges with a larger estimated execution time may be forced early by the
|
| + // idle notification.
|
| + static const size_t kForceScavengeThreshold = 10;
|
| +
|
| // If less than that much memory is left in the new space, we consider it
|
| // as almost full and force a new space collection earlier in the idle time.
|
| static const size_t kNewSpaceAlmostFullTreshold = 100 * KB;
|
|
|
| - // If we haven't recorded any scavenger events yet, we use a conservative
|
| - // lower bound for the scavenger speed.
|
| - static const size_t kInitialConservativeScavengeSpeed = 100 * KB;
|
| -
|
| struct HeapState {
|
| int contexts_disposed;
|
| size_t size_of_objects;
|
| @@ -166,6 +170,15 @@ class GCIdleTimeHandler {
|
| size_t available_new_space_memory,
|
| size_t new_space_allocation_throughput_in_bytes_per_ms);
|
|
|
| + static bool DoEarlyScavenge(size_t idle_time_in_ms, size_t new_space_size,
|
| + size_t available_new_space_memory,
|
| + size_t scavenger_speed_in_bytes_per_ms);
|
| +
|
| + static bool DoScavenge(
|
| + size_t idle_time_in_ms, size_t new_space_size,
|
| + size_t available_new_space_memory, size_t scavenger_speed_in_bytes_per_ms,
|
| + size_t new_space_allocation_throughput_in_bytes_per_ms);
|
| +
|
| private:
|
| void StartIdleRound() { mark_compacts_since_idle_round_started_ = 0; }
|
| bool IsMarkCompactIdleRoundFinished() {
|
|
|