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

Unified Diff: src/heap/heap.cc

Issue 1094843002: Rename some things around incremental marking triggers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 82589c7fd9b1b3a8dee83ace222ef997506f0959..38a31bc210a65f9ece2d33b7d4d5ee94472cd864 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -874,7 +874,8 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason,
// Start incremental marking for the next cycle. The heap snapshot
// generator needs incremental marking to stay off after it aborted.
if (!mark_compact_collector()->abort_incremental_marking() &&
- WorthActivatingIncrementalMarking()) {
+ incremental_marking()->IsStopped() &&
+ incremental_marking()->ShouldActivateEvenWithoutIdleNotification()) {
incremental_marking()->Start();
}
@@ -4545,12 +4546,6 @@ bool Heap::TryFinalizeIdleIncrementalMarking(
}
-bool Heap::WorthActivatingIncrementalMarking() {
- return incremental_marking()->IsStopped() &&
- incremental_marking()->ShouldActivate();
-}
-
-
static double MonotonicallyIncreasingTimeInMs() {
return V8::GetCurrentPlatform()->MonotonicallyIncreasingTime() *
static_cast<double>(base::Time::kMillisecondsPerSecond);
@@ -4588,8 +4583,8 @@ bool Heap::IdleNotification(double deadline_in_seconds) {
}
heap_state.can_start_incremental_marking =
- incremental_marking()->WorthActivating() &&
- NextGCIsLikelyToBeFull(limit) && FLAG_incremental_marking &&
+ incremental_marking()->CanBeActivated() &&
+ HeapIsFullEnoughToStartIncrementalMarking(limit) &&
!mark_compact_collector()->sweeping_in_progress();
heap_state.sweeping_in_progress =
mark_compact_collector()->sweeping_in_progress();
« src/heap/heap.h ('K') | « src/heap/heap.h ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698