Commit 9aff1d35 authored by ulan's avatar ulan Committed by Commit bot

Perform full GC in background idle notification.

BUG=chromium:515873
LOG=NO

Review URL: https://codereview.chromium.org/1263373002

Cr-Commit-Position: refs/heads/master@{#29996}
parent 4e036f30
...@@ -95,13 +95,20 @@ void MemoryReducer::NotifyBackgroundIdleNotification(const Event& event) { ...@@ -95,13 +95,20 @@ void MemoryReducer::NotifyBackgroundIdleNotification(const Event& event) {
if (old_action == kWait && state_.action == kWait && if (old_action == kWait && state_.action == kWait &&
old_started_gcs + 1 == state_.started_gcs) { old_started_gcs + 1 == state_.started_gcs) {
DCHECK(heap()->incremental_marking()->IsStopped()); DCHECK(heap()->incremental_marking()->IsStopped());
DCHECK(FLAG_incremental_marking); // TODO(ulan): Replace it with incremental marking GC once
heap()->StartIdleIncrementalMarking(); // chromium:490559 is fixed.
if (FLAG_trace_gc_verbose) { if (event.time_ms > state_.last_gc_time_ms + kLongDelayMs) {
PrintIsolate(heap()->isolate(), heap()->CollectAllGarbage(Heap::kReduceMemoryFootprintMask,
"Memory reducer: started GC #%d" "memory reducer background GC");
" (background idle)\n", } else {
state_.started_gcs); DCHECK(FLAG_incremental_marking);
heap()->StartIdleIncrementalMarking();
if (FLAG_trace_gc_verbose) {
PrintIsolate(heap()->isolate(),
"Memory reducer: started GC #%d"
" (background idle)\n",
state_.started_gcs);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment