From 203d11979524126add9ee5d04174bde07a5a3f5a Mon Sep 17 00:00:00 2001 From: Leo Korinth Date: Wed, 21 Jan 2026 11:49:12 +0100 Subject: [PATCH] Stefan J 4 --- src/hotspot/share/gc/g1/g1CollectedHeap.cpp | 2 ++ src/hotspot/share/gc/g1/g1YoungCollector.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp index 5e79ca7d019..5f77835cebe 100644 --- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp +++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp @@ -2727,6 +2727,8 @@ void G1CollectedHeap::do_collection_pause_at_safepoint(size_t allocation_word_si _bytes_used_during_gc = 0; + _cm->fully_initialize(); + policy()->decide_on_concurrent_start_pause(); // Record whether this pause may need to trigger a concurrent operation. Later, // when we signal the G1ConcurrentMarkThread, the collector state has already diff --git a/src/hotspot/share/gc/g1/g1YoungCollector.cpp b/src/hotspot/share/gc/g1/g1YoungCollector.cpp index f5bca9a68b0..8b22d78f06c 100644 --- a/src/hotspot/share/gc/g1/g1YoungCollector.cpp +++ b/src/hotspot/share/gc/g1/g1YoungCollector.cpp @@ -1124,7 +1124,7 @@ G1YoungCollector::G1YoungCollector(GCCause::Cause gc_cause, } void G1YoungCollector::collect() { - _g1h->_cm->fully_initialize(); +// _g1h->_cm->fully_initialize(); // Do timing/tracing/statistics/pre- and post-logging/verification work not // directly related to the collection. They should not be accounted for in // collection work timing.