Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index 93eba6f150afc5c44a23a21505a4939aa81d5316..9f334f74a1045d44cb8cd20fdf780f32d2b4eb3e 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -397,6 +397,22 @@ |
for (LargePage* lop : *heap_->lo_space()) { |
SetOldSpacePageFlags(lop, true, is_compacting_); |
} |
+} |
+ |
+ |
+bool IncrementalMarking::ShouldActivateEvenWithoutIdleNotification() { |
+#ifndef DEBUG |
+ static const intptr_t kActivationThreshold = 8 * MB; |
+#else |
+ // TODO(gc) consider setting this to some low level so that some |
+ // debug tests run with incremental marking and some without. |
+ static const intptr_t kActivationThreshold = 0; |
+#endif |
+ // Don't switch on for very small heaps. |
+ return CanBeActivated() && |
+ heap_->PromotedSpaceSizeOfObjects() > kActivationThreshold && |
+ heap_->HeapIsFullEnoughToStartIncrementalMarking( |
+ heap_->old_generation_allocation_limit()); |
} |