[heap] Remove IsolateSafepointScope in CombinedHeapObjectIterator
The safepoint is already initiated by the HeapObjectIterator. In addition the CombinedHeapObjectIterator wasn't updated for the shared heap and always used an IsolateSafepointScope which didn't match the global safepoint initiated by HeapObjectIterator. Simplify this by relying on the safepoint scope in HeapObjectIterator. This CL also moves the verification that all client isolates are fully deserialized into the GC. Bug: v8:13267 Change-Id: I59eff66a38fd8ecd8e90f68e6ed5abc5d2d4cec9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4076332 Commit-Queue: Dominik Inführ <dinfuehr@chromium.org> Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#84631}
This commit is contained in:
parent
bb288ea342
commit
c62d8261dc
@ -10,8 +10,7 @@ namespace internal {
|
||||
|
||||
CombinedHeapObjectIterator::CombinedHeapObjectIterator(
|
||||
Heap* heap, HeapObjectIterator::HeapObjectsFiltering filtering)
|
||||
: safepoint_scope_(heap),
|
||||
heap_iterator_(heap, filtering),
|
||||
: heap_iterator_(heap, filtering),
|
||||
ro_heap_iterator_(heap->isolate()->read_only_heap()) {}
|
||||
|
||||
HeapObject CombinedHeapObjectIterator::Next() {
|
||||
|
@ -26,7 +26,6 @@ class V8_EXPORT_PRIVATE CombinedHeapObjectIterator final {
|
||||
HeapObject Next();
|
||||
|
||||
private:
|
||||
IsolateSafepointScope safepoint_scope_;
|
||||
HeapObjectIterator heap_iterator_;
|
||||
ReadOnlyHeapObjectIterator ro_heap_iterator_;
|
||||
};
|
||||
|
@ -2212,6 +2212,7 @@ size_t Heap::PerformGarbageCollection(GarbageCollector collector,
|
||||
if (isolate()->is_shared_heap_isolate()) {
|
||||
isolate()->global_safepoint()->IterateClientIsolates([](Isolate* client) {
|
||||
if (client->is_shared_heap_isolate()) return;
|
||||
CHECK(client->heap()->deserialization_complete());
|
||||
|
||||
if (v8_flags.concurrent_marking) {
|
||||
client->heap()->concurrent_marking()->Pause();
|
||||
|
@ -393,7 +393,6 @@ void GlobalSafepoint::EnterGlobalSafepointScope(Isolate* initiator) {
|
||||
#if DEBUG
|
||||
for (const PerClientSafepointData& client : clients) {
|
||||
DCHECK_EQ(client.isolate()->shared_heap_isolate(), shared_heap_isolate_);
|
||||
DCHECK(client.heap()->deserialization_complete());
|
||||
}
|
||||
#endif // DEBUG
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user