Commit 0d192e1e authored by Leon Bettscheider's avatar Leon Bettscheider Committed by V8 LUCI CQ

[heap] Select MinorMC to finalize incremental MinorMC

This CL makes SelectGarbageCollector choose MinorMC to finalize
minor incremental marking if the allocation space is new space.

Bug: v8:13012
Change-Id: I0125d956842d83683cf3b1c5999de0e10a43dee5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3871074
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82956}
parent cc3bd0e6
......@@ -470,13 +470,14 @@ GarbageCollector Heap::SelectGarbageCollector(AllocationSpace space,
return GarbageCollector::MARK_COMPACTOR;
}
if (incremental_marking()->IsMarkingComplete() &&
if (incremental_marking()->IsMajorMarking() &&
incremental_marking()->IsMarkingComplete() &&
AllocationLimitOvershotByLargeMargin()) {
*reason = "Incremental marking needs finalization";
return GarbageCollector::MARK_COMPACTOR;
}
if (FLAG_separate_gc_phases && incremental_marking()->IsMarking()) {
if (FLAG_separate_gc_phases && incremental_marking()->IsMajorMarking()) {
// TODO(v8:12503): Remove previous condition when flag gets removed.
*reason = "Incremental marking forced finalization";
return GarbageCollector::MARK_COMPACTOR;
......
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