From 4cd166ff27c1e03a61855664f61dda4fca9aa5c9 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Tue, 17 Jan 2023 15:41:23 +0000 Subject: [PATCH] 8300125: Serial: Remove unused Generation::reset_saved_marks Reviewed-by: kbarrett, lkorinth --- src/hotspot/share/gc/serial/defNewGeneration.cpp | 7 ------- src/hotspot/share/gc/serial/defNewGeneration.hpp | 2 +- src/hotspot/share/gc/serial/tenuredGeneration.cpp | 4 ---- src/hotspot/share/gc/serial/tenuredGeneration.hpp | 2 +- src/hotspot/share/gc/shared/generation.hpp | 4 ---- 5 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index 195c9547f0c..66a3c9a4b71 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -772,13 +772,6 @@ void DefNewGeneration::save_marks() { } -void DefNewGeneration::reset_saved_marks() { - eden()->reset_saved_mark(); - to()->reset_saved_mark(); - from()->reset_saved_mark(); -} - - bool DefNewGeneration::no_allocs_since_save_marks() { assert(eden()->saved_mark_at_top(), "Violated spec - alloc in eden"); assert(from()->saved_mark_at_top(), "Violated spec - alloc in from"); diff --git a/src/hotspot/share/gc/serial/defNewGeneration.hpp b/src/hotspot/share/gc/serial/defNewGeneration.hpp index be742e284c3..1a448c5fd23 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.hpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.hpp @@ -278,7 +278,7 @@ protected: // Accessing marks void save_marks(); - void reset_saved_marks(); + bool no_allocs_since_save_marks(); // Need to declare the full complement of closures, whether we'll diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.cpp b/src/hotspot/share/gc/serial/tenuredGeneration.cpp index 47ff2d15900..b28b891816f 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.cpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.cpp @@ -500,10 +500,6 @@ void TenuredGeneration::save_marks() { _the_space->set_saved_mark(); } -void TenuredGeneration::reset_saved_marks() { - _the_space->reset_saved_mark(); -} - bool TenuredGeneration::no_allocs_since_save_marks() { return _the_space->saved_mark_at_top(); } diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.hpp b/src/hotspot/share/gc/serial/tenuredGeneration.hpp index f897c00581e..f51088a0f33 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.hpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.hpp @@ -132,7 +132,7 @@ class TenuredGeneration: public Generation { void oop_since_save_marks_iterate(OopClosureType* cl); void save_marks(); - void reset_saved_marks(); + bool no_allocs_since_save_marks(); inline size_t block_size(const HeapWord* addr) const; diff --git a/src/hotspot/share/gc/shared/generation.hpp b/src/hotspot/share/gc/shared/generation.hpp index 82548a117c8..081f9f8343a 100644 --- a/src/hotspot/share/gc/shared/generation.hpp +++ b/src/hotspot/share/gc/shared/generation.hpp @@ -333,10 +333,6 @@ class Generation: public CHeapObj { // operations to be optimized. virtual void save_marks() {} - // This function allows generations to initialize any "saved marks". That - // is, should only be called when the generation is empty. - virtual void reset_saved_marks() {} - // This function is "true" iff any no allocations have occurred in the // generation since the last call to "save_marks". virtual bool no_allocs_since_save_marks() = 0;