diff --git a/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp b/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp index a2ae6f8a14a9d..c9325de55cdfb 100644 --- a/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp +++ b/src/hotspot/share/gc/epsilon/epsilonMonitoringSupport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. + * Copyright (c) 2017, 2025, Red Hat, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,7 +91,7 @@ class EpsilonGenerationCounters : public GenerationCounters { {}; void update_all() { - GenerationCounters::update_all(_heap->capacity()); + GenerationCounters::update_capacity(_heap->capacity()); } }; diff --git a/src/hotspot/share/gc/g1/g1MonitoringSupport.cpp b/src/hotspot/share/gc/g1/g1MonitoringSupport.cpp index 6d1ffdb7c005a..26364705a9d08 100644 --- a/src/hotspot/share/gc/g1/g1MonitoringSupport.cpp +++ b/src/hotspot/share/gc/g1/g1MonitoringSupport.cpp @@ -62,7 +62,7 @@ class G1YoungGenerationCounters : public G1GenerationCounters { void update_all() { size_t committed = _monitoring_support->young_gen_committed(); - GenerationCounters::update_all(committed); + GenerationCounters::update_capacity(committed); } }; @@ -83,7 +83,7 @@ class G1OldGenerationCounters : public G1GenerationCounters { void update_all() { size_t committed = _monitoring_support->old_gen_committed(); - GenerationCounters::update_all(committed); + GenerationCounters::update_capacity(committed); } }; diff --git a/src/hotspot/share/gc/parallel/psOldGen.cpp b/src/hotspot/share/gc/parallel/psOldGen.cpp index bc25683e00fa6..cedad78be3059 100644 --- a/src/hotspot/share/gc/parallel/psOldGen.cpp +++ b/src/hotspot/share/gc/parallel/psOldGen.cpp @@ -234,7 +234,7 @@ bool PSOldGen::expand_by(size_t bytes) { post_resize(); if (UsePerfData) { _space_counters->update_capacity(); - _gen_counters->update_all(_virtual_space->committed_size()); + _gen_counters->update_capacity(_virtual_space->committed_size()); } } @@ -366,7 +366,7 @@ void PSOldGen::print_on(outputStream* st) const { void PSOldGen::update_counters() { if (UsePerfData) { _space_counters->update_all(); - _gen_counters->update_all(_virtual_space->committed_size()); + _gen_counters->update_capacity(_virtual_space->committed_size()); } } diff --git a/src/hotspot/share/gc/parallel/psYoungGen.cpp b/src/hotspot/share/gc/parallel/psYoungGen.cpp index bf77a0dde930d..4024109a4a033 100644 --- a/src/hotspot/share/gc/parallel/psYoungGen.cpp +++ b/src/hotspot/share/gc/parallel/psYoungGen.cpp @@ -810,7 +810,7 @@ void PSYoungGen::update_counters() { _eden_counters->update_all(); _from_counters->update_all(); _to_counters->update_all(); - _gen_counters->update_all(_virtual_space->committed_size()); + _gen_counters->update_capacity(_virtual_space->committed_size()); } } diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index 61b0ccad19163..cb36207ff4735 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -814,7 +814,7 @@ void DefNewGeneration::update_counters() { _eden_counters->update_all(); _from_counters->update_all(); _to_counters->update_all(); - _gen_counters->update_all(_virtual_space.committed_size()); + _gen_counters->update_capacity(_virtual_space.committed_size()); } } diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.cpp b/src/hotspot/share/gc/serial/tenuredGeneration.cpp index 2725f1105f1bd..589e670a2e436 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.cpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.cpp @@ -368,7 +368,7 @@ void TenuredGeneration::update_promote_stats() { void TenuredGeneration::update_counters() { if (UsePerfData) { _space_counters->update_all(); - _gen_counters->update_all(_virtual_space.committed_size()); + _gen_counters->update_capacity(_virtual_space.committed_size()); } } diff --git a/src/hotspot/share/gc/shared/generationCounters.cpp b/src/hotspot/share/gc/shared/generationCounters.cpp index 4af7b412aea55..f6bbc1c261855 100644 --- a/src/hotspot/share/gc/shared/generationCounters.cpp +++ b/src/hotspot/share/gc/shared/generationCounters.cpp @@ -67,7 +67,7 @@ GenerationCounters::~GenerationCounters() { FREE_C_HEAP_ARRAY(char, _name_space); } -void GenerationCounters::update_all(size_t curr_capacity) { +void GenerationCounters::update_capacity(size_t curr_capacity) { _current_size->set_value(curr_capacity); } diff --git a/src/hotspot/share/gc/shared/generationCounters.hpp b/src/hotspot/share/gc/shared/generationCounters.hpp index 50672ab5d74f8..cb835b44e259c 100644 --- a/src/hotspot/share/gc/shared/generationCounters.hpp +++ b/src/hotspot/share/gc/shared/generationCounters.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,7 +52,7 @@ class GenerationCounters: public CHeapObj { ~GenerationCounters(); - void update_all(size_t curr_capacity); + void update_capacity(size_t curr_capacity); const char* name_space() const { return _name_space; } }; diff --git a/src/hotspot/share/gc/shenandoah/shenandoahMonitoringSupport.cpp b/src/hotspot/share/gc/shenandoah/shenandoahMonitoringSupport.cpp index 6b72cbdd62bba..dab5e65389ebd 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahMonitoringSupport.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahMonitoringSupport.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2019, Red Hat, Inc. All rights reserved. + * Copyright (c) 2015, 2025, Red Hat, Inc. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ class ShenandoahGenerationCounters : public GenerationCounters { {}; void update_all() { - GenerationCounters::update_all(_heap->capacity()); + GenerationCounters::update_capacity(_heap->capacity()); } }; diff --git a/src/hotspot/share/gc/z/zServiceability.cpp b/src/hotspot/share/gc/z/zServiceability.cpp index 076d310ff717c..7afa73245960f 100644 --- a/src/hotspot/share/gc/z/zServiceability.cpp +++ b/src/hotspot/share/gc/z/zServiceability.cpp @@ -65,9 +65,6 @@ class ZGenerationCounters : public GenerationCounters { max_capacity, curr_capacity) {} - void update_capacity(size_t capacity) { - update_all(capacity); - } }; // Class to expose perf counters used by jstat.