Commit 5449c984 authored by ulan's avatar ulan Committed by Commit bot

Remove non-incremental GC from memory reducer.

Incremental GC now finish quickly in background tabs too because they
do not rely on idle notifications.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31461}
parent 7ad82f91
......@@ -50,14 +50,7 @@ void MemoryReducer::NotifyTimer(const Event& event) {
PrintIsolate(heap()->isolate(), "Memory reducer: started GC #%d\n",
state_.started_gcs);
}
if (heap()->ShouldOptimizeForMemoryUsage()) {
// Do full GC if memory usage has higher priority than latency. This is
// important for background tabs that do not send idle notifications.
heap()->CollectAllGarbage(Heap::kReduceMemoryFootprintMask,
"memory reducer");
} else {
heap()->StartIdleIncrementalMarking();
}
heap()->StartIdleIncrementalMarking();
} else if (state_.action == kWait) {
if (!heap()->incremental_marking()->IsStopped() &&
heap()->ShouldOptimizeForMemoryUsage()) {
......
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