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

Unified Diff: src/heap/incremental-marking.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
« src/heap/heap.h ('K') | « src/heap/incremental-marking.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index ef2e1137857ebe685c72705e917a6317d75e01d6..17c609c3f64668db620eedd017dcdb541a4222bd 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -386,9 +386,9 @@ void IncrementalMarking::ActivateIncrementalWriteBarrier() {
}
-bool IncrementalMarking::ShouldActivate() {
- return WorthActivating() &&
- heap_->NextGCIsLikelyToBeFull(
+bool IncrementalMarking::ShouldActivateEvenWithoutIdleNotification() {
+ return CanBeActivated() &&
+ heap_->HeapIsFullEnoughToStartIncrementalMarking(
heap_->old_generation_allocation_limit());
}
@@ -396,7 +396,7 @@ bool IncrementalMarking::ShouldActivate() {
bool IncrementalMarking::WasActivated() { return was_activated_; }
-bool IncrementalMarking::WorthActivating() {
+bool IncrementalMarking::CanBeActivated() {
#ifndef DEBUG
static const intptr_t kActivationThreshold = 8 * MB;
#else
@@ -407,6 +407,7 @@ bool IncrementalMarking::WorthActivating() {
// Only start incremental marking in a safe state: 1) when incremental
// marking is turned on, 2) when we are currently not in a GC, and
// 3) when we are currently not serializing or deserializing the heap.
+ // Don't switch on for very small heaps.
return FLAG_incremental_marking && FLAG_incremental_marking_steps &&
heap_->gc_state() == Heap::NOT_IN_GC &&
heap_->deserialization_complete() &&
@@ -814,7 +815,7 @@ void IncrementalMarking::Epilogue() {
void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
- if (IsStopped() && ShouldActivate()) {
+ if (IsStopped() && ShouldActivateEvenWithoutIdleNotification()) {
Start();
} else {
Step(allocated * kOldSpaceAllocationMarkingFactor, GC_VIA_STACK_GUARD);
« src/heap/heap.h ('K') | « src/heap/incremental-marking.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698