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

Unified Diff: src/heap/memory-reducer.h

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: Rebase 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 | « src/heap/heap.cc ('k') | src/heap/memory-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/memory-reducer.h
diff --git a/src/heap/memory-reducer.h b/src/heap/memory-reducer.h
index a9ba2980ad8e164a788bfb06e735b3a283dc74af..fc7b2eaee569b34add4501d2874fde953d5b3c6f 100644
--- a/src/heap/memory-reducer.h
+++ b/src/heap/memory-reducer.h
@@ -48,6 +48,15 @@ class Heap;
// - in the timer callback if the mutator allocation rate is high or
// incremental GC is in progress.
//
+// WAIT n x -> WAIT (n+1) happens:
+// - on background idle notification, which signals that we can start
+// incremental marking even if the allocation rate is high.
+// The MemoryReducer starts incremental marking on this transition but still
+// has a pending timer task.
+//
+// WAIT n x -> DONE happens:
+// - in the timer callback if n >= kMaxNumberOfGCs.
+//
// WAIT n x -> RUN (n+1) happens:
// - in the timer callback if the mutator allocation rate is low
// and now_ms >= x and there is no incremental GC in progress.
@@ -81,6 +90,7 @@ class MemoryReducer {
kTimer,
kMarkCompact,
kContextDisposed,
+ kBackgroundIdleNotification
};
struct Event {
@@ -95,8 +105,8 @@ class MemoryReducer {
// Callbacks.
void NotifyTimer(const Event& event);
void NotifyMarkCompact(const Event& event);
- void NotifyScavenge(const Event& event);
void NotifyContextDisposed(const Event& event);
+ void NotifyBackgroundIdleNotification(const Event& event);
// The step function that computes the next state from the current state and
// the incoming event.
static State Step(const State& state, const Event& event);
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/memory-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698