[heap] Remove PostponeInterruptScope from mark compact GCs

The GC doesn't handle interrupts at this level and all callbacks that
would execute user code are invoked before entering the marker.

Bug: v8:12612
Change-Id: I13c7dab1f69c51d1dbe66721b3422d8ebf48c1c0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4212398
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#85595}
This commit is contained in:
Michael Lippautz 2023-02-01 15:03:01 +01:00 committed by V8 LUCI CQ
parent 8b231d80ca
commit e4a9f0a5f2

View File

@ -2797,10 +2797,6 @@ void MarkCompactCollector::RetainMaps() {
void MarkCompactCollector::MarkLiveObjects() {
TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK);
// The recursive GC marker detects when it is nearing stack overflow,
// and switches to a different marking system. JS interrupts interfere
// with the C stack limit check.
PostponeInterruptsScope postpone(isolate());
const bool was_marked_incrementally =
!heap_->incremental_marking()->IsStopped();
@ -5448,16 +5444,16 @@ void MarkCompactCollector::UpdatePointersInClientHeap(Isolate* client) {
if (chunk->InYoungGeneration()) chunk->ReleaseSlotSet<OLD_TO_SHARED>();
RememberedSet<OLD_TO_SHARED>::IterateTyped(chunk, [this](SlotType slot_type,
Address slot) {
// Using UpdateStrongSlot is OK here, because there are no weak
// typed slots.
PtrComprCageBase cage_base = heap_->isolate();
return UpdateTypedSlotHelper::UpdateTypedSlot(
heap_, slot_type, slot, [cage_base](FullMaybeObjectSlot slot) {
return UpdateStrongOldToSharedSlot(cage_base, slot);
});
});
RememberedSet<OLD_TO_SHARED>::IterateTyped(
chunk, [this](SlotType slot_type, Address slot) {
// Using UpdateStrongSlot is OK here, because there are no weak
// typed slots.
PtrComprCageBase cage_base = heap_->isolate();
return UpdateTypedSlotHelper::UpdateTypedSlot(
heap_, slot_type, slot, [cage_base](FullMaybeObjectSlot slot) {
return UpdateStrongOldToSharedSlot(cage_base, slot);
});
});
if (chunk->InYoungGeneration()) chunk->ReleaseTypedSlotSet<OLD_TO_SHARED>();
}
}
@ -6341,8 +6337,6 @@ void MinorMarkCompactCollector::MarkLiveObjects() {
DCHECK_NOT_NULL(local_marking_worklists_);
DCHECK_NOT_NULL(main_marking_visitor_);
PostponeInterruptsScope postpone(isolate());
const bool was_marked_incrementally =
!heap_->incremental_marking()->IsStopped();
if (was_marked_incrementally) {