From da8a095a19c90e7ee2b45fab9b533a1092887023 Mon Sep 17 00:00:00 2001 From: Guoxiong Li Date: Tue, 26 Mar 2024 14:34:52 +0000 Subject: [PATCH] 8328928: Serial: Use IsGCActiveMark instead of AutoModifyRestore in SerialHeap::do_collection Reviewed-by: ayang, tschatzl --- src/hotspot/share/gc/serial/serialHeap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/serial/serialHeap.cpp b/src/hotspot/share/gc/serial/serialHeap.cpp index 2fd5dc1889a..71a068aeb3f 100644 --- a/src/hotspot/share/gc/serial/serialHeap.cpp +++ b/src/hotspot/share/gc/serial/serialHeap.cpp @@ -50,6 +50,7 @@ #include "gc/shared/gcTraceTime.inline.hpp" #include "gc/shared/gcVMOperations.hpp" #include "gc/shared/genArguments.hpp" +#include "gc/shared/isGCActiveMark.hpp" #include "gc/shared/locationPrinter.inline.hpp" #include "gc/shared/oopStorage.inline.hpp" #include "gc/shared/oopStorageParState.inline.hpp" @@ -74,7 +75,6 @@ #include "runtime/vmThread.hpp" #include "services/memoryManager.hpp" #include "services/memoryService.hpp" -#include "utilities/autoRestore.hpp" #include "utilities/debug.hpp" #include "utilities/formatBuffer.hpp" #include "utilities/macros.hpp" @@ -497,7 +497,7 @@ void SerialHeap::do_collection(bool full, ClearedAllSoftRefs casr(do_clear_all_soft_refs, soft_ref_policy()); - AutoModifyRestore temporarily(_is_gc_active, true); + IsGCActiveMark active_gc_mark; bool complete = full && (max_generation == OldGen); bool old_collects_young = complete && !ScavengeBeforeFullGC;