8330960: Serial: Remove SerialFullGC::_total_invocations

Reviewed-by: ayang, tschatzl
This commit is contained in:
Guoxiong Li 2024-04-29 08:16:12 +00:00
parent 4edac349a5
commit 766d0b0fa0
2 changed files with 1 additions and 12 deletions

View File

@ -74,8 +74,6 @@
#include "jvmci/jvmci.hpp"
#endif
uint SerialFullGC::_total_invocations = 0;
Stack<oop, mtGC> SerialFullGC::_marking_stack;
Stack<ObjArrayTask, mtGC> SerialFullGC::_objarray_stack;
@ -113,7 +111,7 @@ public:
// we don't start compacting before there is a significant gain to be made.
// Occasionally, we want to ensure a full compaction, which is determined
// by the MarkSweepAlwaysCompactCount parameter.
if ((SerialFullGC::total_invocations() % MarkSweepAlwaysCompactCount) != 0) {
if ((SerialHeap::heap()->total_full_collections() % MarkSweepAlwaysCompactCount) != 0) {
_allowed_deadspace_words = (space->capacity() * ratio / 100) / HeapWordSize;
} else {
_active = false;
@ -694,9 +692,6 @@ void SerialFullGC::invoke_at_safepoint(bool clear_all_softrefs) {
gch->trace_heap_before_gc(_gc_tracer);
// Increment the invocation count
_total_invocations++;
// Capture used regions for old-gen to reestablish old-to-young invariant
// after full-gc.
gch->old_gen()->save_used_region();

View File

@ -81,9 +81,6 @@ class SerialFullGC : AllStatic {
};
protected:
// Total invocations of serial full GC
static uint _total_invocations;
// Traversal stacks used during phase1
static Stack<oop, mtGC> _marking_stack;
static Stack<ObjArrayTask, mtGC> _objarray_stack;
@ -119,9 +116,6 @@ class SerialFullGC : AllStatic {
static void invoke_at_safepoint(bool clear_all_softrefs);
// Accessors
static uint total_invocations() { return _total_invocations; }
// Reference Processing
static ReferenceProcessor* ref_processor() { return _ref_processor; }