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

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

Issue 1038663002: Reland "Allow compaction when incremental marking is on." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
« 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 749fa5ef54934d7c2ed3945d8381b4cfd3c2cdcb..b3609e4adcf7db1baa16dde096f9ee48d5290045 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -468,7 +468,7 @@ static void PatchIncrementalMarkingRecordWriteStubs(
}
-void IncrementalMarking::Start(CompactionFlag flag) {
+void IncrementalMarking::Start() {
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start\n");
}
@@ -483,7 +483,7 @@ void IncrementalMarking::Start(CompactionFlag flag) {
was_activated_ = true;
if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
- StartMarking(flag);
+ StartMarking();
} else {
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start sweeping.\n");
@@ -495,12 +495,12 @@ void IncrementalMarking::Start(CompactionFlag flag) {
}
-void IncrementalMarking::StartMarking(CompactionFlag flag) {
+void IncrementalMarking::StartMarking() {
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Start marking\n");
}
- is_compacting_ = !FLAG_never_compact && (flag == ALLOW_COMPACTION) &&
+ is_compacting_ = !FLAG_never_compact &&
heap_->mark_compact_collector()->StartCompaction(
MarkCompactCollector::INCREMENTAL_COMPACTION);
@@ -834,9 +834,7 @@ void IncrementalMarking::Epilogue() {
void IncrementalMarking::OldSpaceStep(intptr_t allocated) {
if (IsStopped() && ShouldActivate()) {
- // TODO(hpayer): Let's play safe for now, but compaction should be
- // in principle possible.
- Start(PREVENT_COMPACTION);
+ Start();
} else {
Step(allocated * kFastMarking / kInitialMarkingSpeed, GC_VIA_STACK_GUARD);
}
@@ -965,7 +963,7 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes,
}
if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
bytes_scanned_ = 0;
- StartMarking(PREVENT_COMPACTION);
+ StartMarking();
}
} else if (state_ == MARKING) {
bytes_processed = ProcessMarkingDeque(bytes_to_process);
« 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