From b8d2bdb46529f780b4c21d709ca38b489348ee10 Mon Sep 17 00:00:00 2001 From: Thomas Schatzl Date: Thu, 15 May 2025 08:03:44 +0000 Subject: [PATCH] 8355743: G1: Collection set clearing is not recorded as part of "Free Collection Set Time" Reviewed-by: iwalulya, shade --- src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp b/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp index 4dfa026e420..3e8f1bbba64 100644 --- a/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp +++ b/src/hotspot/share/gc/g1/g1YoungGCPostEvacuateTasks.cpp @@ -881,10 +881,10 @@ public: } FREE_C_HEAP_ARRAY(FreeCSetStats, _worker_stats); + _g1h->clear_collection_set(); + G1GCPhaseTimes* p = _g1h->phase_times(); p->record_serial_free_cset_time_ms((Ticks::now() - serial_time).seconds() * 1000.0); - - _g1h->clear_collection_set(); } double worker_cost() const override { return G1CollectedHeap::heap()->collection_set()->region_length(); }