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

Unified Diff: src/heap/incremental-marking.cc

Issue 783453003: Explicitly track whether incremental marking was activated (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/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 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
« no previous file with comments | « src/heap/incremental-marking.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698