[heap] Adjust live bytes atomically when concurrent marking is on.

BUG=chromium:723600

Change-Id: I7fbc9cbeac2bd3d826d81808c0f3c2c24a21a562
Reviewed-on: https://chromium-review.googlesource.com/518013
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45596}
This commit is contained in:
Ulan Degenbaev 2017-05-30 17:39:45 +06:00 committed by Commit Bot
parent a7a5176778
commit 898eb142ce

View File

@ -3172,7 +3172,11 @@ void Heap::AdjustLiveBytes(HeapObject* object, int by) {
!mark_compact_collector()->sweeping_in_progress() &&
ObjectMarking::IsBlack(object, MarkingState::Internal(object))) {
DCHECK(MemoryChunk::FromAddress(object->address())->SweepingDone());
#ifdef V8_CONCURRENT_MARKING
MarkingState::Internal(object).IncrementLiveBytes<MarkBit::ATOMIC>(by);
#else
MarkingState::Internal(object).IncrementLiveBytes(by);
#endif
}
}