Commit 033118ee authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[offthread] Avoid invalid live byte update for off-thread page

During off-thread space merge, we free the linear allocation area in the
off-thread space. Since the off-thread space isn't marked, we have to
make sure that we don't try to compensate for black allocated live bytes.

Bug: chromium:1011762
Change-Id: Id2eb2212dc25e78952f817482abcdb4b49f3a373
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2111224Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66823}
parent 33318c91
......@@ -1120,7 +1120,7 @@ size_t Page::ShrinkToHighWaterMark() {
void Page::CreateBlackArea(Address start, Address end) {
DCHECK(heap()->incremental_marking()->black_allocation());
DCHECK_EQ(Page::FromAddress(start), this);
DCHECK_NE(start, end);
DCHECK_LT(start, end);
DCHECK_EQ(Page::FromAddress(end - 1), this);
IncrementalMarking::MarkingState* marking_state =
heap()->incremental_marking()->marking_state();
......@@ -1132,7 +1132,7 @@ void Page::CreateBlackArea(Address start, Address end) {
void Page::DestroyBlackArea(Address start, Address end) {
DCHECK(heap()->incremental_marking()->black_allocation());
DCHECK_EQ(Page::FromAddress(start), this);
DCHECK_NE(start, end);
DCHECK_LT(start, end);
DCHECK_EQ(Page::FromAddress(end - 1), this);
IncrementalMarking::MarkingState* marking_state =
heap()->incremental_marking()->marking_state();
......@@ -1998,7 +1998,8 @@ void PagedSpace::FreeLinearAllocationArea() {
return;
}
if (heap()->incremental_marking()->black_allocation()) {
if (!is_off_thread_space() &&
heap()->incremental_marking()->black_allocation()) {
Page* page = Page::FromAllocationAreaAddress(current_top);
// Clear the bits in the unused black area.
......
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