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

Unified Diff: src/heap/heap.cc

Issue 1420363004: Remove special handling of background idle notification in memory reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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.h ('k') | src/heap/memory-reducer.h » ('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 8aa6fb85876ef8c7df392e87c0d04fedb5dc28c7..05d1661495321e16febd0c9ba03935ecc04a08f6 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4207,15 +4207,11 @@ void Heap::IdleNotificationEpilogue(GCIdleTimeAction action,
}
-void Heap::CheckAndNotifyBackgroundIdleNotification(double idle_time_in_ms,
- double now_ms) {
+void Heap::CheckBackgroundIdleNotification(double idle_time_in_ms,
+ double now_ms) {
+ // TODO(ulan): Remove this function once Chrome uses new API
+ // for foreground/background notification.
if (idle_time_in_ms >= GCIdleTimeHandler::kMinBackgroundIdleTime) {
- MemoryReducer::Event event;
- event.type = MemoryReducer::kBackgroundIdleNotification;
- event.time_ms = now_ms;
- event.can_start_incremental_gc = incremental_marking()->IsStopped() &&
- incremental_marking()->CanBeActivated();
- memory_reducer_->NotifyBackgroundIdleNotification(event);
optimize_for_memory_usage_ = true;
} else {
optimize_for_memory_usage_ = false;
@@ -4247,7 +4243,7 @@ bool Heap::IdleNotification(double deadline_in_seconds) {
double start_ms = MonotonicallyIncreasingTimeInMs();
double idle_time_in_ms = deadline_in_ms - start_ms;
- CheckAndNotifyBackgroundIdleNotification(idle_time_in_ms, start_ms);
+ CheckBackgroundIdleNotification(idle_time_in_ms, start_ms);
tracer()->SampleAllocation(start_ms, NewSpaceAllocationCounter(),
OldGenerationAllocationCounter());
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/memory-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698