From cc4ca9fde84c95e369169fe1cd3f62c5d3379d18 Mon Sep 17 00:00:00 2001 From: jonghoonpark Date: Mon, 2 Mar 2026 14:25:41 +0000 Subject: [PATCH] 8378128: Make PLABStats data members private Reviewed-by: tschatzl, ayang, jwaters --- src/hotspot/share/gc/shared/plab.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hotspot/share/gc/shared/plab.hpp b/src/hotspot/share/gc/shared/plab.hpp index 5200f022633..d893a720e2a 100644 --- a/src/hotspot/share/gc/shared/plab.hpp +++ b/src/hotspot/share/gc/shared/plab.hpp @@ -147,14 +147,14 @@ public: // PLAB book-keeping. class PLABStats : public CHeapObj { -protected: - const char* _description; // Identifying string. - Atomic _allocated; // Total allocated Atomic _wasted; // of which wasted (internal fragmentation) Atomic _undo_wasted; // of which wasted on undo (is not used for calculation of PLAB size) Atomic _unused; // Unused in last buffer +protected: + const char* _description; // Identifying string. + virtual void reset() { _allocated.store_relaxed(0); _wasted.store_relaxed(0); @@ -164,11 +164,11 @@ protected: public: PLABStats(const char* description) : - _description(description), _allocated(0), _wasted(0), _undo_wasted(0), - _unused(0) + _unused(0), + _description(description) { } virtual ~PLABStats() { }