Lines Matching refs:event

38   Event event;  in RunInternal()  local
50 event.type = kTimer; in RunInternal()
51 event.time_ms = time_ms; in RunInternal()
55 event.should_start_incremental_gc = in RunInternal()
57 event.can_start_incremental_gc = in RunInternal()
60 event.committed_memory = heap->CommittedOldGenerationMemory(); in RunInternal()
61 memory_reducer_->NotifyTimer(event); in RunInternal()
65 void MemoryReducer::NotifyTimer(const Event& event) { in NotifyTimer() argument
66 DCHECK_EQ(kTimer, event.type); in NotifyTimer()
68 state_ = Step(state_, event); in NotifyTimer()
95 ScheduleTimer(state_.next_gc_start_ms - event.time_ms); in NotifyTimer()
99 state_.next_gc_start_ms - event.time_ms); in NotifyTimer()
105 void MemoryReducer::NotifyMarkCompact(const Event& event) { in NotifyMarkCompact() argument
106 DCHECK_EQ(kMarkCompact, event.type); in NotifyMarkCompact()
108 state_ = Step(state_, event); in NotifyMarkCompact()
111 ScheduleTimer(state_.next_gc_start_ms - event.time_ms); in NotifyMarkCompact()
122 void MemoryReducer::NotifyPossibleGarbage(const Event& event) { in NotifyPossibleGarbage() argument
123 DCHECK_EQ(kPossibleGarbage, event.type); in NotifyPossibleGarbage()
125 state_ = Step(state_, event); in NotifyPossibleGarbage()
128 ScheduleTimer(state_.next_gc_start_ms - event.time_ms); in NotifyPossibleGarbage()
133 bool MemoryReducer::WatchdogGC(const State& state, const Event& event) { in WatchdogGC() argument
135 event.time_ms > state.last_gc_time_ms + kWatchdogDelayMs; in WatchdogGC()
141 const Event& event) { in Step() argument
147 if (event.type == kTimer) { in Step()
149 } else if (event.type == kMarkCompact) { in Step()
150 if (event.committed_memory < in Step()
156 return State(kWait, 0, event.time_ms + kLongDelayMs, in Step()
157 event.type == kMarkCompact ? event.time_ms in Step()
162 DCHECK_EQ(kPossibleGarbage, event.type); in Step()
164 kWait, 0, event.time_ms + kLongDelayMs, in Step()
165 event.type == kMarkCompact ? event.time_ms : state.last_gc_time_ms, in Step()
169 switch (event.type) { in Step()
175 event.committed_memory); in Step()
176 } else if (event.can_start_incremental_gc && in Step()
177 (event.should_start_incremental_gc || in Step()
178 WatchdogGC(state, event))) { in Step()
179 if (state.next_gc_start_ms <= event.time_ms) { in Step()
186 return State(kWait, state.started_gcs, event.time_ms + kLongDelayMs, in Step()
190 return State(kWait, state.started_gcs, event.time_ms + kLongDelayMs, in Step()
191 event.time_ms, 0); in Step()
194 if (event.type != kMarkCompact) { in Step()
198 (event.next_gc_likely_to_collect_more || state.started_gcs == 1)) { in Step()
199 return State(kWait, state.started_gcs, event.time_ms + kShortDelayMs, in Step()
200 event.time_ms, 0); in Step()
202 return State(kDone, kMaxNumberOfGCs, 0.0, event.time_ms, in Step()
203 event.committed_memory); in Step()