V8 Project
|
#include <gc-idle-time-handler.h>
Classes | |
struct | HeapState |
Public Member Functions | |
GCIdleTimeHandler () | |
GCIdleTimeAction | Compute (size_t idle_time_in_ms, HeapState heap_state) |
void | NotifyIdleMarkCompact () |
void | NotifyScavenge () |
Static Public Member Functions | |
static size_t | EstimateMarkingStepSize (size_t idle_time_in_ms, size_t marking_speed_in_bytes_per_ms) |
static size_t | EstimateMarkCompactTime (size_t size_of_objects, size_t mark_compact_speed_in_bytes_per_ms) |
static size_t | EstimateScavengeTime (size_t new_space_size, size_t scavenger_speed_in_bytes_per_ms) |
static bool | ScavangeMayHappenSoon (size_t available_new_space_memory, size_t new_space_allocation_throughput_in_bytes_per_ms) |
Static Public Attributes | |
static const size_t | kInitialConservativeMarkingSpeed = 100 * KB |
static const size_t | kMaximumMarkingStepSize = 700 * MB |
static const double | kConservativeTimeRatio = 0.9 |
static const size_t | kInitialConservativeMarkCompactSpeed = 2 * MB |
static const size_t | kMaxMarkCompactTimeInMs = 1000 |
static const size_t | kMinTimeForFinalizeSweeping = 100 |
static const int | kMaxMarkCompactsInIdleRound = 7 |
static const int | kIdleScavengeThreshold = 5 |
static const size_t | kSmallHeapSize = 4 * kPointerSize * MB |
static const size_t | kMaxFrameRenderingIdleTime = 16 |
static const size_t | kNewSpaceAlmostFullTreshold = 100 * KB |
static const size_t | kInitialConservativeScavengeSpeed = 100 * KB |
Private Member Functions | |
void | StartIdleRound () |
bool | IsMarkCompactIdleRoundFinished () |
bool | EnoughGarbageSinceLastIdleRound () |
DISALLOW_COPY_AND_ASSIGN (GCIdleTimeHandler) | |
Private Attributes | |
int | mark_compacts_since_idle_round_started_ |
int | scavenges_since_last_idle_round_ |
Definition at line 78 of file gc-idle-time-handler.h.
|
inline |
Definition at line 138 of file gc-idle-time-handler.h.
GCIdleTimeAction v8::internal::GCIdleTimeHandler::Compute | ( | size_t | idle_time_in_ms, |
HeapState | heap_state | ||
) |
Definition at line 111 of file gc-idle-time-handler.cc.
References v8::internal::GCIdleTimeHandler::HeapState::available_new_space_memory, v8::internal::GCIdleTimeHandler::HeapState::can_start_incremental_marking, v8::internal::GCIdleTimeHandler::HeapState::contexts_disposed, v8::internal::GCIdleTimeAction::Done(), EnoughGarbageSinceLastIdleRound(), EstimateMarkCompactTime(), EstimateMarkingStepSize(), EstimateScavengeTime(), v8::internal::GCIdleTimeAction::FinalizeSweeping(), v8::internal::GCIdleTimeAction::FullGC(), v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::incremental_marking_stopped, v8::internal::GCIdleTimeAction::IncrementalMarking(), IsMarkCompactIdleRoundFinished(), kMaxFrameRenderingIdleTime, kMaxMarkCompactsInIdleRound, kMinTimeForFinalizeSweeping, kSmallHeapSize, v8::internal::GCIdleTimeHandler::HeapState::mark_compact_speed_in_bytes_per_ms, mark_compacts_since_idle_round_started_, v8::internal::GCIdleTimeHandler::HeapState::new_space_allocation_throughput_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::new_space_capacity, v8::internal::GCIdleTimeAction::Nothing(), ScavangeMayHappenSoon(), v8::internal::GCIdleTimeAction::Scavenge(), v8::internal::GCIdleTimeHandler::HeapState::scavenge_speed_in_bytes_per_ms, v8::internal::GCIdleTimeHandler::HeapState::size_of_objects, StartIdleRound(), and v8::internal::GCIdleTimeHandler::HeapState::sweeping_in_progress.
Referenced by v8::internal::Heap::IdleNotification().
|
private |
|
inlineprivate |
Definition at line 175 of file gc-idle-time-handler.h.
References kIdleScavengeThreshold, and scavenges_since_last_idle_round_.
Referenced by Compute().
|
static |
Definition at line 64 of file gc-idle-time-handler.cc.
References kInitialConservativeMarkCompactSpeed, kMaxMarkCompactTimeInMs, and v8::internal::Min().
Referenced by Compute(), and v8::internal::TEST().
|
static |
Definition at line 43 of file gc-idle-time-handler.cc.
References DCHECK, kConservativeTimeRatio, kInitialConservativeMarkingSpeed, and kMaximumMarkingStepSize.
Referenced by Compute(), and v8::internal::TEST().
|
static |
Definition at line 74 of file gc-idle-time-handler.cc.
References kInitialConservativeScavengeSpeed.
Referenced by Compute(), and v8::internal::TEST().
|
inlineprivate |
Definition at line 171 of file gc-idle-time-handler.h.
References kMaxMarkCompactsInIdleRound, and mark_compacts_since_idle_round_started_.
Referenced by Compute().
|
inline |
Definition at line 144 of file gc-idle-time-handler.h.
References kMaxMarkCompactsInIdleRound, mark_compacts_since_idle_round_started_, and scavenges_since_last_idle_round_.
Referenced by v8::internal::Heap::AdvanceIdleIncrementalMarking(), and v8::internal::Heap::IdleNotification().
|
inline |
|
static |
Definition at line 83 of file gc-idle-time-handler.cc.
References kMaxFrameRenderingIdleTime.
Referenced by Compute(), and v8::internal::TEST().
|
inlineprivate |
Definition at line 170 of file gc-idle-time-handler.h.
References mark_compacts_since_idle_round_started_.
Referenced by Compute().
|
static |
Definition at line 89 of file gc-idle-time-handler.h.
Referenced by EstimateMarkingStepSize(), and v8::internal::TEST().
|
static |
Definition at line 107 of file gc-idle-time-handler.h.
Referenced by EnoughGarbageSinceLastIdleRound(), and v8::internal::TEST_F().
|
static |
Definition at line 93 of file gc-idle-time-handler.h.
Referenced by EstimateMarkCompactTime(), and v8::internal::TEST().
|
static |
Definition at line 82 of file gc-idle-time-handler.h.
Referenced by EstimateMarkingStepSize(), and v8::internal::TEST().
|
static |
Definition at line 122 of file gc-idle-time-handler.h.
Referenced by EstimateScavengeTime(), and v8::internal::TEST().
|
static |
Definition at line 114 of file gc-idle-time-handler.h.
Referenced by Compute(), ScavangeMayHappenSoon(), and v8::internal::TEST().
|
static |
Definition at line 85 of file gc-idle-time-handler.h.
Referenced by EstimateMarkingStepSize(), and v8::internal::TEST().
|
static |
Definition at line 104 of file gc-idle-time-handler.h.
Referenced by Compute(), IsMarkCompactIdleRoundFinished(), NotifyIdleMarkCompact(), and v8::internal::TEST_F().
|
static |
Definition at line 96 of file gc-idle-time-handler.h.
Referenced by EstimateMarkCompactTime(), and v8::internal::TEST().
|
static |
Definition at line 100 of file gc-idle-time-handler.h.
Referenced by Compute().
|
static |
Definition at line 118 of file gc-idle-time-handler.h.
|
static |
Definition at line 111 of file gc-idle-time-handler.h.
Referenced by Compute().
|
private |
Definition at line 179 of file gc-idle-time-handler.h.
Referenced by Compute(), IsMarkCompactIdleRoundFinished(), NotifyIdleMarkCompact(), and StartIdleRound().
|
private |
Definition at line 180 of file gc-idle-time-handler.h.
Referenced by EnoughGarbageSinceLastIdleRound(), NotifyIdleMarkCompact(), and NotifyScavenge().