From 1f4474f6776cf55796bc6f5ec2e60b44f57bb976 Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Mon, 15 Jan 2024 15:21:09 +0000 Subject: [PATCH] 8323726: Serial: Remove unused definitions in Generation Reviewed-by: stefank --- src/hotspot/share/gc/serial/defNewGeneration.cpp | 5 ----- src/hotspot/share/gc/serial/defNewGeneration.hpp | 2 -- src/hotspot/share/gc/serial/generation.hpp | 14 -------------- src/hotspot/share/gc/serial/tenuredGeneration.hpp | 2 -- .../share/gc/serial/tenuredGeneration.inline.hpp | 4 ---- 5 files changed, 27 deletions(-) diff --git a/src/hotspot/share/gc/serial/defNewGeneration.cpp b/src/hotspot/share/gc/serial/defNewGeneration.cpp index b569fbac48f..964c7661d31 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.cpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.cpp @@ -1104,11 +1104,6 @@ const char* DefNewGeneration::name() const { return "def new generation"; } -// Moved from inline file as they are not called inline -ContiguousSpace* DefNewGeneration::first_compaction_space() const { - return eden(); -} - HeapWord* DefNewGeneration::allocate(size_t word_size, bool is_tlab) { // This is the slow-path allocation for the DefNewGeneration. // Most allocations are fast-path in compiled code. diff --git a/src/hotspot/share/gc/serial/defNewGeneration.hpp b/src/hotspot/share/gc/serial/defNewGeneration.hpp index e9586993e54..a2b17b6a9f5 100644 --- a/src/hotspot/share/gc/serial/defNewGeneration.hpp +++ b/src/hotspot/share/gc/serial/defNewGeneration.hpp @@ -168,8 +168,6 @@ class DefNewGeneration: public Generation { ContiguousSpace* from() const { return _from_space; } ContiguousSpace* to() const { return _to_space; } - virtual ContiguousSpace* first_compaction_space() const; - // Space enquiries size_t capacity() const; size_t used() const; diff --git a/src/hotspot/share/gc/serial/generation.hpp b/src/hotspot/share/gc/serial/generation.hpp index 9b956c9df61..fa5ef14519c 100644 --- a/src/hotspot/share/gc/serial/generation.hpp +++ b/src/hotspot/share/gc/serial/generation.hpp @@ -55,16 +55,6 @@ class ContiguousSpace; class OopClosure; class GCStats; -// A "ScratchBlock" represents a block of memory in one generation usable by -// another. It represents "num_words" free words, starting at and including -// the address of "this". -struct ScratchBlock { - ScratchBlock* next; - size_t num_words; - HeapWord scratch_space[1]; // Actually, of size "num_words-2" (assuming - // first two fields are word-sized.) -}; - class Generation: public CHeapObj { friend class VMStructs; private: @@ -175,10 +165,6 @@ class Generation: public CHeapObj { // Iteration - do not use for time critical operations virtual void space_iterate(SpaceClosure* blk, bool usedOnly = false) = 0; - // Returns the first space, if any, in the generation that can participate - // in compaction, or else "null". - virtual ContiguousSpace* first_compaction_space() const = 0; - // Returns "true" iff this generation should be used to allocate an // object of the given size. Young generations might // wish to exclude very large objects, for example, since, if allocated diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.hpp b/src/hotspot/share/gc/serial/tenuredGeneration.hpp index 6b2a5891c64..7c0cd2ffd7b 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.hpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.hpp @@ -101,8 +101,6 @@ class TenuredGeneration: public Generation { bool is_in(const void* p) const; - ContiguousSpace* first_compaction_space() const; - TenuredGeneration(ReservedSpace rs, size_t initial_byte_size, size_t min_byte_size, diff --git a/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp b/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp index 5d8bf32e2ce..31d32745b0d 100644 --- a/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp +++ b/src/hotspot/share/gc/serial/tenuredGeneration.inline.hpp @@ -49,10 +49,6 @@ inline bool TenuredGeneration::is_in(const void* p) const { return space()->is_in(p); } -inline ContiguousSpace* TenuredGeneration::first_compaction_space() const { - return space(); -} - HeapWord* TenuredGeneration::allocate(size_t word_size, bool is_tlab) { assert(!is_tlab, "TenuredGeneration does not support TLAB allocation");