[heap] Fix false OLD_TO_OLD remembered set in MinorMC
A MinorMC in a client isolate while incremental marking is active in the main isolate may observe an object in the shared heap as residing on an evacuation candidate. It would then treat it as OLD_TO_OLD rather than OLD_TO_SHARED. This logic is obsolete and no longer needed since MinorMC is not interleaved with full GCs and only need to record OLD_TO_NEW and OLD_TO_SHARED slots. Fix by removing OLD_TO_OLD and OLD_TO_CODE recording. Bug: chromium:1402660 Change-Id: I5482d3fe7d7a4eeb00be13445d66f178a3ffe2fb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4152485 Commit-Queue: Omer Katz <omerkatz@chromium.org> Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Cr-Commit-Position: refs/heads/main@{#85191}
This commit is contained in:
parent
12a2fc2aad
commit
59657281c2
@ -5850,12 +5850,6 @@ class YoungGenerationRecordMigratedSlotVisitor final
|
||||
}
|
||||
|
||||
private:
|
||||
// Only record slots for host objects that are considered as live by the
|
||||
// full collector.
|
||||
inline bool IsLive(HeapObject object) {
|
||||
return heap_->non_atomic_marking_state()->IsBlack(object);
|
||||
}
|
||||
|
||||
inline void RecordMigratedSlot(HeapObject host, MaybeObject value,
|
||||
Address slot) final {
|
||||
if (value->IsStrongOrWeak()) {
|
||||
@ -5868,15 +5862,6 @@ class YoungGenerationRecordMigratedSlotVisitor final
|
||||
MemoryChunk* chunk = MemoryChunk::FromHeapObject(host);
|
||||
DCHECK(chunk->SweepingDone());
|
||||
RememberedSet<OLD_TO_NEW>::Insert<AccessMode::NON_ATOMIC>(chunk, slot);
|
||||
} else if (p->IsEvacuationCandidate() && IsLive(host)) {
|
||||
if (V8_EXTERNAL_CODE_SPACE_BOOL &&
|
||||
p->IsFlagSet(MemoryChunk::IS_EXECUTABLE)) {
|
||||
RememberedSet<OLD_TO_CODE>::Insert<AccessMode::NON_ATOMIC>(
|
||||
MemoryChunk::FromHeapObject(host), slot);
|
||||
} else {
|
||||
RememberedSet<OLD_TO_OLD>::Insert<AccessMode::NON_ATOMIC>(
|
||||
MemoryChunk::FromHeapObject(host), slot);
|
||||
}
|
||||
} else if (p->InSharedHeap()) {
|
||||
DCHECK(!host.InSharedWritableHeap());
|
||||
RememberedSet<OLD_TO_SHARED>::Insert<AccessMode::NON_ATOMIC>(
|
||||
|
Loading…
Reference in New Issue
Block a user