From 44a9392ecade2bc1ba78ce695a98ccfddc65c516 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Tue, 16 Jan 2024 11:56:10 +0000 Subject: [PATCH] 8323780: Serial: Remove unused _full_collections_completed Reviewed-by: ehelin, stefank --- src/hotspot/share/gc/serial/serialHeap.cpp | 11 ----------- src/hotspot/share/gc/serial/serialHeap.hpp | 13 ------------- 2 files changed, 24 deletions(-) diff --git a/src/hotspot/share/gc/serial/serialHeap.cpp b/src/hotspot/share/gc/serial/serialHeap.cpp index 76bc1547547..b65bab44946 100644 --- a/src/hotspot/share/gc/serial/serialHeap.cpp +++ b/src/hotspot/share/gc/serial/serialHeap.cpp @@ -97,7 +97,6 @@ SerialHeap::SerialHeap() : _soft_ref_policy(), _gc_policy_counters(new GCPolicyCounters("Copy:MSC", 2, 2)), _incremental_collection_failed(false), - _full_collections_completed(0), _young_manager(nullptr), _old_manager(nullptr), _eden_pool(nullptr), @@ -304,15 +303,6 @@ size_t SerialHeap::max_capacity() const { return _young_gen->max_capacity() + _old_gen->max_capacity(); } -// Update the _full_collections_completed counter -// at the end of a stop-world full GC. -unsigned int SerialHeap::update_full_collections_completed() { - assert(_full_collections_completed <= _total_full_collections, - "Can't complete more collections than were started"); - _full_collections_completed = _total_full_collections; - return _full_collections_completed; -} - // Return true if any of the following is true: // . the allocation won't fit into the current young gen heap // . gc locker is occupied (jni critical section) @@ -645,7 +635,6 @@ void SerialHeap::do_collection(bool full, // Resize the metaspace capacity after full collections MetaspaceGC::compute_new_size(); - update_full_collections_completed(); print_heap_change(pre_gc_values); diff --git a/src/hotspot/share/gc/serial/serialHeap.hpp b/src/hotspot/share/gc/serial/serialHeap.hpp index 6c024095b09..71880e7c771 100644 --- a/src/hotspot/share/gc/serial/serialHeap.hpp +++ b/src/hotspot/share/gc/serial/serialHeap.hpp @@ -99,9 +99,6 @@ private: // condition that caused that incremental collection to fail. bool _incremental_collection_failed; - // In support of ExplicitGCInvokesConcurrent functionality - unsigned int _full_collections_completed; - // Collects the given generation. void collect_generation(Generation* gen, bool full, size_t size, bool is_tlab, bool run_verification, bool clear_soft_refs); @@ -233,16 +230,6 @@ public: size_t requested_size, size_t* actual_size) override; - // Total number of full collections completed. - unsigned int total_full_collections_completed() { - assert(_full_collections_completed <= _total_full_collections, - "Can't complete more collections than were started"); - return _full_collections_completed; - } - - // Update above counter, as appropriate, at the end of a stop-world GC cycle - unsigned int update_full_collections_completed(); - // Update the gc statistics for each generation. void update_gc_stats(Generation* current_generation, bool full) { _old_gen->update_gc_stats(current_generation, full);