Index: src/heap/incremental-marking.cc |
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc |
index 08f11c62799b314f687f55bad6aeac58c34ff843..33f9de0da4b977903103f5fbbaae1bb6b1340e82 100644 |
--- a/src/heap/incremental-marking.cc |
+++ b/src/heap/incremental-marking.cc |
@@ -27,7 +27,8 @@ IncrementalMarking::IncrementalMarking(Heap* heap) |
allocated_(0), |
idle_marking_delay_counter_(0), |
no_marking_scope_depth_(0), |
- unscanned_bytes_of_large_object_(0) {} |
+ unscanned_bytes_of_large_object_(0), |
+ was_activated_(false) {} |
void IncrementalMarking::RecordWriteSlow(HeapObject* obj, Object** slot, |
@@ -423,6 +424,9 @@ bool IncrementalMarking::ShouldActivate() { |
} |
+bool IncrementalMarking::WasActivated() { return was_activated_; } |
+ |
+ |
bool IncrementalMarking::WorthActivating() { |
#ifndef DEBUG |
static const intptr_t kActivationThreshold = 8 * MB; |
@@ -490,6 +494,8 @@ void IncrementalMarking::Start(CompactionFlag flag) { |
ResetStepCounters(); |
+ was_activated_ = true; |
+ |
if (!heap_->mark_compact_collector()->sweeping_in_progress()) { |
StartMarking(flag); |
} else { |
@@ -785,6 +791,9 @@ void IncrementalMarking::MarkingComplete(CompletionAction action) { |
} |
+void IncrementalMarking::Epilogue() { was_activated_ = false; } |
+ |
+ |
void IncrementalMarking::OldSpaceStep(intptr_t allocated) { |
if (IsStopped() && ShouldActivate()) { |
// TODO(hpayer): Let's play safe for now, but compaction should be |