From 0d8ec42969fb60c140aaed7795ea1b9591915b8d Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Tue, 6 Aug 2024 06:59:11 +0000 Subject: [PATCH] 8337642: Remove unused APIs of GCPolicyCounters Reviewed-by: tschatzl --- .../share/gc/parallel/gcAdaptivePolicyCounters.hpp | 4 ---- .../gc/parallel/psGCAdaptivePolicyCounters.hpp | 4 ---- src/hotspot/share/gc/serial/defNewGeneration.cpp | 1 - src/hotspot/share/gc/shared/gcPolicyCounters.hpp | 13 ------------- 4 files changed, 22 deletions(-) diff --git a/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp b/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp index e83813c78f4..e21d568955a 100644 --- a/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp +++ b/src/hotspot/share/gc/parallel/gcAdaptivePolicyCounters.hpp @@ -223,10 +223,6 @@ class GCAdaptivePolicyCounters : public GCPolicyCounters { } void set_size_policy(AdaptiveSizePolicy* v) { _size_policy = v; } - - virtual GCPolicyCounters::Name kind() const { - return GCPolicyCounters::GCAdaptivePolicyCountersKind; - } }; #endif // SHARE_GC_PARALLEL_GCADAPTIVEPOLICYCOUNTERS_HPP diff --git a/src/hotspot/share/gc/parallel/psGCAdaptivePolicyCounters.hpp b/src/hotspot/share/gc/parallel/psGCAdaptivePolicyCounters.hpp index ad84eb4368b..217cd7b9c5c 100644 --- a/src/hotspot/share/gc/parallel/psGCAdaptivePolicyCounters.hpp +++ b/src/hotspot/share/gc/parallel/psGCAdaptivePolicyCounters.hpp @@ -180,10 +180,6 @@ class PSGCAdaptivePolicyCounters : public GCAdaptivePolicyCounters { // counter or from globals. This is distinguished from counters // that are updated via input parameters. void update_counters(); - - virtual GCPolicyCounters::Name kind() const { - return GCPolicyCounters::PSGCAdaptivePolicyCountersKind; - } }; #endif // SHARE_GC_PARALLEL_PSGCADAPTIVEPOLICYCOUNTERS_HPP diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index 715b82fd38d..e93b97c85eb 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -833,7 +833,6 @@ void DefNewGeneration::gc_epilogue(bool full) { assert(!GCLocker::is_active(), "We should not be executing here"); // update the generation and space performance counters update_counters(); - SerialHeap::heap()->counters()->update_counters(); } void DefNewGeneration::update_counters() { diff --git a/src/hotspot/share/gc/shared/gcPolicyCounters.hpp b/src/hotspot/share/gc/shared/gcPolicyCounters.hpp index a631664fcab..9c7e5788a7e 100644 --- a/src/hotspot/share/gc/shared/gcPolicyCounters.hpp +++ b/src/hotspot/share/gc/shared/gcPolicyCounters.hpp @@ -46,13 +46,6 @@ class GCPolicyCounters: public CHeapObj { const char* _name_space; public: - enum Name { - NONE, - GCPolicyCountersKind, - GCAdaptivePolicyCountersKind, - PSGCAdaptivePolicyCountersKind - }; - GCPolicyCounters(const char* name, int collectors, int generations); inline PerfVariable* tenuring_threshold() const { @@ -68,12 +61,6 @@ public: } const char* name_space() const { return _name_space; } - - virtual void update_counters() {} - - virtual GCPolicyCounters::Name kind() const { - return GCPolicyCounters::GCPolicyCountersKind; - } }; #endif // SHARE_GC_SHARED_GCPOLICYCOUNTERS_HPP