Commit 42ecd616 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

cppgc: Fix marking on allocation

Marking on allocation assumes a non-empty stack. Thus marking on
allocation will not finalize even if it runs out of work (we prefer
to finalize in a non-nestable task with no stack).
Instead it will schedule another marking task and delegates
finalization to the next marking task.

Bug: chromium:1056170
Change-Id: I457090fe0a235707bb9973e330ff24fb25ac66c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2366764Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69534}
parent 1a543700
......@@ -290,7 +290,13 @@ bool MarkerBase::IncrementalMarkingStep(MarkingConfig::StackState stack_state,
bool MarkerBase::AdvanceMarkingOnAllocation() {
// Replace with schedule based deadline.
return AdvanceMarkingWithDeadline(kMinimumMarkedBytesPerIncrementalStep);
bool is_done =
AdvanceMarkingWithDeadline(kMinimumMarkedBytesPerIncrementalStep);
if (is_done) {
// Schedule another incremental task for finalizing without a stack.
ScheduleIncrementalMarkingTask();
}
return is_done;
}
bool MarkerBase::AdvanceMarkingWithDeadline(size_t expected_marked_bytes,
......
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