Commit 413ea926 authored by hpayer's avatar hpayer Committed by Commit bot

[heap] Turn on black allocation during marking finalization to avoid floating garbage.

We will move this back to start of incremental marking when we make faster progress.

Perf sheriffs: This CL may cause a regression on benchmarks that improved earlier by enabling black allocation.

BUG=chromium:599174
LOG=n

Review URL: https://codereview.chromium.org/1889853002

Cr-Commit-Position: refs/heads/master@{#35500}
parent 43c7c76f
...@@ -557,10 +557,6 @@ void IncrementalMarking::StartMarking() { ...@@ -557,10 +557,6 @@ void IncrementalMarking::StartMarking() {
IncrementalMarkingRootMarkingVisitor visitor(this); IncrementalMarkingRootMarkingVisitor visitor(this);
heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
if (FLAG_black_allocation && !heap()->ShouldReduceMemory()) {
StartBlackAllocation();
}
// Ready to start incremental marking. // Ready to start incremental marking.
if (FLAG_trace_incremental_marking) { if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Running\n"); PrintF("[IncrementalMarking] Running\n");
...@@ -761,13 +757,14 @@ void IncrementalMarking::FinalizeIncrementally() { ...@@ -761,13 +757,14 @@ void IncrementalMarking::FinalizeIncrementally() {
(marking_progress < (marking_progress <
FLAG_min_progress_during_incremental_marking_finalization)) { FLAG_min_progress_during_incremental_marking_finalization)) {
finalize_marking_completed_ = true; finalize_marking_completed_ = true;
}
// If black allocation was not enabled earlier, start black allocation if (FLAG_black_allocation && !heap()->ShouldReduceMemory() &&
// here. !black_allocation_) {
if (FLAG_black_allocation && !black_allocation_) { // TODO(hpayer): Move to an earlier point as soon as we make faster marking
// progress.
StartBlackAllocation(); StartBlackAllocation();
} }
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment