Commit e0dcd1ec authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Fix more data races with live bytes in concurrent marking.

BUG=chromium:694255

Change-Id: I7edece8191d85376d3435e799ac64f3cbe814456
Reviewed-on: https://chromium-review.googlesource.com/519002Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45618}
parent ec411b5d
......@@ -850,7 +850,8 @@ void Page::CreateBlackArea(Address start, Address end) {
DCHECK_EQ(Page::FromAddress(end - 1), this);
MarkingState::Internal(this).bitmap()->SetRange(AddressToMarkbitIndex(start),
AddressToMarkbitIndex(end));
MarkingState::Internal(this).IncrementLiveBytes(
MarkingState::Internal(this)
.IncrementLiveBytes<IncrementalMarking::kAtomicity>(
static_cast<int>(end - start));
}
......@@ -861,7 +862,8 @@ void Page::DestroyBlackArea(Address start, Address end) {
DCHECK_EQ(Page::FromAddress(end - 1), this);
MarkingState::Internal(this).bitmap()->ClearRange(
AddressToMarkbitIndex(start), AddressToMarkbitIndex(end));
MarkingState::Internal(this).IncrementLiveBytes(
MarkingState::Internal(this)
.IncrementLiveBytes<IncrementalMarking::kAtomicity>(
-static_cast<int>(end - start));
}
......@@ -1500,7 +1502,8 @@ void PagedSpace::EmptyAllocationInfo() {
MarkingState::Internal(page).bitmap()->ClearRange(
page->AddressToMarkbitIndex(current_top),
page->AddressToMarkbitIndex(current_limit));
MarkingState::Internal(page).IncrementLiveBytes(
MarkingState::Internal(page)
.IncrementLiveBytes<IncrementalMarking::kAtomicity>(
-static_cast<int>(current_limit - current_top));
}
}
......
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