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

Unified Diff: src/heap/heap.cc

Issue 771703004: Slow down incremental marking on main thread when idle notification is active. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »
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 fa327641250cd51d24d01f822ff04e641a758ab4..8c489bd940b1bd0eb5eec4ebd967974ac25ac2d8 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -120,6 +120,7 @@ Heap::Heap()
min_in_mutator_(kMaxInt),
marking_time_(0.0),
sweeping_time_(0.0),
+ last_idle_notification_time_(0.0),
mark_compact_collector_(this),
store_buffer_(this),
marking_(this),
@@ -4530,6 +4531,7 @@ bool Heap::IdleNotification(double deadline_in_seconds) {
}
double current_time = MonotonicallyIncreasingTimeInMs();
+ last_idle_notification_time_ = current_time;
double deadline_difference = deadline_in_ms - current_time;
if (deadline_difference >= 0) {
@@ -4564,6 +4566,13 @@ bool Heap::IdleNotification(double deadline_in_seconds) {
}
+bool Heap::RecentIdleNotifcationHappened() {
+ return (last_idle_notification_time_ +
+ GCIdleTimeHandler::kMaxFrameRenderingIdleTime) >
+ MonotonicallyIncreasingTimeInMs();
+}
+
+
#ifdef DEBUG
void Heap::Print() {
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698