[heap] Use global safepoint with shared space incremental marking start

Use a global safepoint when starting incremental marking in the
shared space isolate. This is required to start black allocation in
all shared LABs of all client isolates.

Bug: v8:13267
Change-Id: I4995dded2546f090cb3b074ee808992e3eb5f741
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3934103
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#83566}
This commit is contained in:
Dominik Inführ 2022-10-06 17:27:42 +02:00 committed by V8 LUCI CQ
parent f29f082eef
commit 03e7db10ce

View File

@ -1840,12 +1840,18 @@ void Heap::StartIncrementalMarking(int gc_flags,
CompleteSweepingFull();
}
base::Optional<GlobalSafepointScope> global_safepoint_scope;
base::Optional<SafepointScope> safepoint_scope;
{
AllowGarbageCollection allow_shared_gc;
IgnoreLocalGCRequests ignore_gc_requests(this);
safepoint_scope.emplace(this);
if (isolate()->is_shared_heap_isolate()) {
global_safepoint_scope.emplace(isolate());
} else {
safepoint_scope.emplace(this);
}
}
#ifdef DEBUG