Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: src/heap/heap.cc

Issue 1213313004: Start incremental marking in long idle notification for background tab (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add tests Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/memory-reducer.h » ('j') | src/heap/memory-reducer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index ce0ec0be916ee168947c95e4ff263d512b3e5118..c9e7359d5749f86126cc7e8675369212bab95c34 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4976,6 +4976,15 @@ bool Heap::IdleNotification(double deadline_in_seconds) {
double start_ms = MonotonicallyIncreasingTimeInMs();
double idle_time_in_ms = deadline_in_ms - start_ms;
+ if (idle_time_in_ms >= GCIdleTimeHandler::kMinBackgroundIdleTime) {
+ MemoryReducer::Event event;
+ event.type = MemoryReducer::kBackgroundIdleNotification;
+ event.time_ms = start_ms;
+ event.can_start_incremental_gc = incremental_marking()->IsStopped() &&
+ incremental_marking()->CanBeActivated();
+ memory_reducer_.NotifyBackgroundIdleNotification(event);
+ }
Hannes Payer (out of office) 2015/07/07 07:49:34 Let's make this block a method to keep IdleNotific
ulan 2015/07/07 11:58:26 Done.
+
tracer()->SampleAllocation(start_ms, NewSpaceAllocationCounter(),
OldGenerationAllocationCounter());
« no previous file with comments | « no previous file | src/heap/memory-reducer.h » ('j') | src/heap/memory-reducer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698