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,8 +850,9 @@ 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(
static_cast<int>(end - start));
MarkingState::Internal(this)
.IncrementLiveBytes<IncrementalMarking::kAtomicity>(
static_cast<int>(end - start));
}
void Page::DestroyBlackArea(Address start, Address end) {
......@@ -861,8 +862,9 @@ 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(
-static_cast<int>(end - start));
MarkingState::Internal(this)
.IncrementLiveBytes<IncrementalMarking::kAtomicity>(
-static_cast<int>(end - start));
}
void MemoryAllocator::PartialFreeMemory(MemoryChunk* chunk,
......@@ -1500,8 +1502,9 @@ void PagedSpace::EmptyAllocationInfo() {
MarkingState::Internal(page).bitmap()->ClearRange(
page->AddressToMarkbitIndex(current_top),
page->AddressToMarkbitIndex(current_limit));
MarkingState::Internal(page).IncrementLiveBytes(
-static_cast<int>(current_limit - current_top));
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