Home | History | Annotate | Download | only in heap

Lines Matching refs:Event

30   Event event;
42 event.type = kTimer;
43 event.time_ms = time_ms;
47 event.should_start_incremental_gc =
49 event.can_start_incremental_gc =
52 event.committed_memory = heap->CommittedOldGenerationMemory();
53 memory_reducer_->NotifyTimer(event);
57 void MemoryReducer::NotifyTimer(const Event& event) {
58 DCHECK_EQ(kTimer, event.type);
60 state_ = Step(state_, event);
86 ScheduleTimer(event.time_ms, state_.next_gc_start_ms - event.time_ms);
90 state_.next_gc_start_ms - event.time_ms);
96 void MemoryReducer::NotifyMarkCompact(const Event& event) {
97 DCHECK_EQ(kMarkCompact, event.type);
99 state_ = Step(state_, event);
102 ScheduleTimer(event.time_ms, state_.next_gc_start_ms - event.time_ms);
113 void MemoryReducer::NotifyPossibleGarbage(const Event& event) {
114 DCHECK_EQ(kPossibleGarbage, event.type);
116 state_ = Step(state_, event);
119 ScheduleTimer(event.time_ms, state_.next_gc_start_ms - event.time_ms);
124 bool MemoryReducer::WatchdogGC(const State& state, const Event& event) {
126 event.time_ms > state.last_gc_time_ms + kWatchdogDelayMs;
132 const Event& event) {
138 if (event.type == kTimer) {
140 } else if (event.type == kMarkCompact) {
141 if (event.committed_memory <
147 return State(kWait, 0, event.time_ms + kLongDelayMs,
148 event.type == kMarkCompact ? event.time_ms
153 DCHECK_EQ(kPossibleGarbage, event.type);
155 kWait, 0, event.time_ms + kLongDelayMs,
156 event.type == kMarkCompact ? event.time_ms : state.last_gc_time_ms,
160 switch (event.type) {
166 event.committed_memory);
167 } else if (event.can_start_incremental_gc &&
168 (event.should_start_incremental_gc ||
169 WatchdogGC(state, event))) {
170 if (state.next_gc_start_ms <= event.time_ms) {
177 return State(kWait, state.started_gcs, event.time_ms + kLongDelayMs,
181 return State(kWait, state.started_gcs, event.time_ms + kLongDelayMs,
182 event.time_ms, 0);
185 if (event.type != kMarkCompact) {
189 (event.next_gc_likely_to_collect_more || state.started_gcs == 1)) {
190 return State(kWait, state.started_gcs, event.time_ms + kShortDelayMs,
191 event.time_ms, 0);
193 return State(kDone, kMaxNumberOfGCs, 0.0, event.time_ms,
194 event.committed_memory);