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

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

Issue 1889853002: [heap] Turn on black allocation during marking finalization to avoid floating garbage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | 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 85e9f6d7763820d1c3617428228f234f053de4e4..167c13a4fee7bb3d268189d64ac762663b9c7848 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -557,10 +557,6 @@ void IncrementalMarking::StartMarking() {
IncrementalMarkingRootMarkingVisitor visitor(this);
heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
- if (FLAG_black_allocation && !heap()->ShouldReduceMemory()) {
- StartBlackAllocation();
- }
-
// Ready to start incremental marking.
if (FLAG_trace_incremental_marking) {
PrintF("[IncrementalMarking] Running\n");
@@ -761,12 +757,13 @@ void IncrementalMarking::FinalizeIncrementally() {
(marking_progress <
FLAG_min_progress_during_incremental_marking_finalization)) {
finalize_marking_completed_ = true;
+ }
- // If black allocation was not enabled earlier, start black allocation
- // here.
- if (FLAG_black_allocation && !black_allocation_) {
- StartBlackAllocation();
- }
+ if (FLAG_black_allocation && !heap()->ShouldReduceMemory() &&
+ !black_allocation_) {
+ // TODO(hpayer): Move to an earlier point as soon as we make faster marking
+ // progress.
+ StartBlackAllocation();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698