Commit 34112c3a authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

[heap] Remove shared heap barrier for code

The barrier is currently not thread-safe but may be executed via
concurrent Sparkplug compilation. Remove the actual barrier code as
the remembered set is anyways not used yet.

Bug: v8:13018, chromium:1336850, chromium:1333414
Change-Id: I9287516d559cc3b10d170fa0fda36b26ca487a15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3734809
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81438}
parent e5dd7a40
......@@ -32,9 +32,6 @@ V8_EXPORT_PRIVATE void Heap_WriteBarrierForCodeSlow(Code host);
V8_EXPORT_PRIVATE void Heap_GenerationalBarrierForCodeSlow(Code host,
RelocInfo* rinfo,
HeapObject object);
V8_EXPORT_PRIVATE void Heap_SharedHeapBarrierForCodeSlow(Code host,
RelocInfo* rinfo,
HeapObject object);
V8_EXPORT_PRIVATE void Heap_GenerationalEphemeronKeyBarrierSlow(
Heap* heap, HeapObject table, Address slot);
......@@ -210,10 +207,13 @@ inline void GenerationalBarrierForCode(Code host, RelocInfo* rinfo,
inline void SharedHeapBarrierForCode(Code host, RelocInfo* rinfo,
HeapObject object) {
if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) return;
heap_internals::MemoryChunk* object_chunk =
heap_internals::MemoryChunk::FromHeapObject(object);
if (!object_chunk->InSharedHeap()) return;
Heap_SharedHeapBarrierForCodeSlow(host, rinfo, object);
// TODO(v8:11708): Implement a thread-safe shared heap barrier. The barrier is
// executed from the main thread as well from concurrent compilation threads.
}
inline WriteBarrierMode GetWriteBarrierModeForObject(
......
......@@ -152,11 +152,6 @@ void Heap_GenerationalBarrierForCodeSlow(Code host, RelocInfo* rinfo,
Heap::GenerationalBarrierForCodeSlow(host, rinfo, object);
}
void Heap_SharedHeapBarrierForCodeSlow(Code host, RelocInfo* rinfo,
HeapObject object) {
Heap::SharedHeapBarrierForCodeSlow(host, rinfo, object);
}
void Heap::SetConstructStubCreateDeoptPCOffset(int pc_offset) {
DCHECK_EQ(Smi::zero(), construct_stub_create_deopt_pc_offset());
set_construct_stub_create_deopt_pc_offset(Smi::FromInt(pc_offset));
......@@ -7456,16 +7451,6 @@ void Heap::GenerationalBarrierForCodeSlow(Code host, RelocInfo* rinfo,
info.offset);
}
void Heap::SharedHeapBarrierForCodeSlow(Code host, RelocInfo* rinfo,
HeapObject object) {
DCHECK(object.InSharedHeap());
const MarkCompactCollector::RecordRelocSlotInfo info =
MarkCompactCollector::ProcessRelocInfo(host, rinfo, object);
RememberedSet<OLD_TO_SHARED>::InsertTyped(info.memory_chunk, info.slot_type,
info.offset);
}
bool Heap::PageFlagsAreConsistent(HeapObject object) {
if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) {
return true;
......
......@@ -513,9 +513,6 @@ class Heap {
Address raw_object, Address address, Isolate* isolate);
V8_EXPORT_PRIVATE static void GenerationalBarrierForCodeSlow(
Code host, RelocInfo* rinfo, HeapObject value);
V8_EXPORT_PRIVATE static void SharedHeapBarrierForCodeSlow(Code host,
RelocInfo* rinfo,
HeapObject value);
V8_EXPORT_PRIVATE static bool PageFlagsAreConsistent(HeapObject object);
// Notifies the heap that is ok to start marking or other activities that
......
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