From de9b971c2e21d01586c15ad87c33dd8f24e64e29 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Thu, 14 Sep 2023 12:06:25 +0000 Subject: [PATCH] 8315933: Serial: Remove empty Generation::ensure_parsability Reviewed-by: tschatzl, sjohanss --- src/hotspot/share/gc/shared/collectedHeap.hpp | 2 +- src/hotspot/share/gc/shared/genCollectedHeap.cpp | 13 ------------- src/hotspot/share/gc/shared/genCollectedHeap.hpp | 3 --- src/hotspot/share/gc/shared/generation.hpp | 4 ---- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/hotspot/share/gc/shared/collectedHeap.hpp b/src/hotspot/share/gc/shared/collectedHeap.hpp index 217bc0cd865..19923ca9bc4 100644 --- a/src/hotspot/share/gc/shared/collectedHeap.hpp +++ b/src/hotspot/share/gc/shared/collectedHeap.hpp @@ -328,7 +328,7 @@ class CollectedHeap : public CHeapObj { // super::ensure_parsability so that the non-generational // part of the work gets done. See implementation of // CollectedHeap::ensure_parsability and, for instance, - // that of GenCollectedHeap::ensure_parsability(). + // that of ParallelScavengeHeap::ensure_parsability(). // The argument "retire_tlabs" controls whether existing TLABs // are merely filled or also retired, thus preventing further // allocation from them and necessitating allocation of new TLABs. diff --git a/src/hotspot/share/gc/shared/genCollectedHeap.cpp b/src/hotspot/share/gc/shared/genCollectedHeap.cpp index 5c67fa7eb82..341b1bb77bc 100644 --- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp +++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp @@ -1069,16 +1069,3 @@ void GenCollectedHeap::record_gen_tops_before_GC() { } } #endif // not PRODUCT - -class GenEnsureParsabilityClosure: public GenCollectedHeap::GenClosure { - public: - void do_generation(Generation* gen) { - gen->ensure_parsability(); - } -}; - -void GenCollectedHeap::ensure_parsability(bool retire_tlabs) { - CollectedHeap::ensure_parsability(retire_tlabs); - GenEnsureParsabilityClosure ep_cl; - generation_iterate(&ep_cl, false); -} diff --git a/src/hotspot/share/gc/shared/genCollectedHeap.hpp b/src/hotspot/share/gc/shared/genCollectedHeap.hpp index b8d811421e1..a725a936a2c 100644 --- a/src/hotspot/share/gc/shared/genCollectedHeap.hpp +++ b/src/hotspot/share/gc/shared/genCollectedHeap.hpp @@ -228,9 +228,6 @@ public: size_t requested_size, size_t* actual_size) override; - // Ensure parsability - void ensure_parsability(bool retire_tlabs) override; - // Total number of full collections completed. unsigned int total_full_collections_completed() { assert(_full_collections_completed <= _total_full_collections, diff --git a/src/hotspot/share/gc/shared/generation.hpp b/src/hotspot/share/gc/shared/generation.hpp index cb1d657446e..59d07cb9210 100644 --- a/src/hotspot/share/gc/shared/generation.hpp +++ b/src/hotspot/share/gc/shared/generation.hpp @@ -291,10 +291,6 @@ class Generation: public CHeapObj { // Save the high water marks for the used space in a generation. virtual void record_spaces_top() {} - // Some generations may need to be "fixed-up" after some allocation - // activity to make them parsable again. The default is to do nothing. - virtual void ensure_parsability() {} - // Generations may keep statistics about collection. This method // updates those statistics. current_generation is the generation // that was most recently collected. This allows the generation to