Commit 8ed81dde authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Restore TSAN exception for page flags.

This was removed in one of the branches during weak-refs work.

Bug: v8:7574
Change-Id: Id2a1af22b1150d8c888c117c023e8c78f532b9f2
Reviewed-on: https://chromium-review.googlesource.com/970702Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52061}
parent c0032377
...@@ -93,12 +93,26 @@ class ConcurrentMarkingVisitor final ...@@ -93,12 +93,26 @@ class ConcurrentMarkingVisitor final
void ProcessStrongHeapObject(HeapObject* host, Object** slot, void ProcessStrongHeapObject(HeapObject* host, Object** slot,
HeapObject* heap_object) { HeapObject* heap_object) {
#ifdef THREAD_SANITIZER
// Perform a dummy acquire load to tell TSAN that there is no data race
// in mark-bit initialization. See MemoryChunk::Initialize for the
// corresponding release store.
MemoryChunk* chunk = MemoryChunk::FromAddress(heap_object->address());
CHECK_NOT_NULL(chunk->synchronized_heap());
#endif
MarkObject(heap_object); MarkObject(heap_object);
MarkCompactCollector::RecordSlot(host, slot, heap_object); MarkCompactCollector::RecordSlot(host, slot, heap_object);
} }
void ProcessWeakHeapObject(HeapObject* host, HeapObjectReference** slot, void ProcessWeakHeapObject(HeapObject* host, HeapObjectReference** slot,
HeapObject* heap_object) { HeapObject* heap_object) {
#ifdef THREAD_SANITIZER
// Perform a dummy acquire load to tell TSAN that there is no data race
// in mark-bit initialization. See MemoryChunk::Initialize for the
// corresponding release store.
MemoryChunk* chunk = MemoryChunk::FromAddress(heap_object->address());
CHECK_NOT_NULL(chunk->synchronized_heap());
#endif
if (marking_state_.IsBlackOrGrey(heap_object)) { if (marking_state_.IsBlackOrGrey(heap_object)) {
// Weak references with live values are directly processed here to // Weak references with live values are directly processed here to
// reduce the processing time of weak cells during the main GC // reduce the processing time of weak cells during the main GC
...@@ -350,13 +364,6 @@ class ConcurrentMarkingVisitor final ...@@ -350,13 +364,6 @@ class ConcurrentMarkingVisitor final
} }
void MarkObject(HeapObject* object) { void MarkObject(HeapObject* object) {
#ifdef THREAD_SANITIZER
// Perform a dummy acquire load to tell TSAN that there is no data race
// in mark-bit initialization. See MemoryChunk::Initialize for the
// corresponding release store.
MemoryChunk* chunk = MemoryChunk::FromAddress(object->address());
CHECK_NOT_NULL(chunk->synchronized_heap());
#endif
if (marking_state_.WhiteToGrey(object)) { if (marking_state_.WhiteToGrey(object)) {
shared_.Push(object); shared_.Push(object);
} }
......
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