From 03e7db10cebc9281dec6aa8fcb79eb56fa947461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Inf=C3=BChr?= Date: Thu, 6 Oct 2022 17:27:42 +0200 Subject: [PATCH] [heap] Use global safepoint with shared space incremental marking start MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Commit-Queue: Dominik Inführ Cr-Commit-Position: refs/heads/main@{#83566} --- src/heap/heap.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/heap/heap.cc b/src/heap/heap.cc index a300019893..7df5f1e2dc 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -1840,12 +1840,18 @@ void Heap::StartIncrementalMarking(int gc_flags, CompleteSweepingFull(); } + base::Optional global_safepoint_scope; base::Optional 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