Commit 6fbe1bf2 authored by Dominik Inführ's avatar Dominik Inführ Committed by V8 LUCI CQ

[heap] Also record old-to-shared slots on promotion and evacuation

When an object either gets promoted or evacuated, old-to-shared slots
need to be recorded like we already do for old-to-old or old-to-new.

Bug: v8:11708
Change-Id: Ifb5b3d50a59aa45bf8289e1cd7610bb2f317fd6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3794648Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82096}
parent 2ca9baa2
......@@ -1641,6 +1641,9 @@ class RecordMigratedSlotVisitor : public ObjectVisitorWithCageBases {
RememberedSet<OLD_TO_OLD>::Insert<AccessMode::NON_ATOMIC>(
MemoryChunk::FromHeapObject(host), slot);
}
} else if (p->InSharedHeap() && !collector_->is_shared_heap()) {
RememberedSet<OLD_TO_SHARED>::Insert<AccessMode::NON_ATOMIC>(
MemoryChunk::FromHeapObject(host), slot);
}
}
}
......
......@@ -147,6 +147,11 @@ class IterateAndScavengePromotedObjectsVisitor final : public ObjectVisitor {
// for pending large pages.
RememberedSet<OLD_TO_OLD>::Insert<AccessMode::ATOMIC>(
MemoryChunk::FromHeapObject(host), slot.address());
} else if (target.InSharedWritableHeap()) {
DCHECK(!scavenger_->heap()->IsShared());
MemoryChunk* chunk = MemoryChunk::FromHeapObject(host);
RememberedSet<OLD_TO_SHARED>::Insert<AccessMode::ATOMIC>(chunk,
slot.address());
}
}
......
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