diff --git a/src/hotspot/share/gc/serial/serialFullGC.cpp b/src/hotspot/share/gc/serial/serialFullGC.cpp index 6471e13f449..d6398aa9fc1 100644 --- a/src/hotspot/share/gc/serial/serialFullGC.cpp +++ b/src/hotspot/share/gc/serial/serialFullGC.cpp @@ -97,7 +97,8 @@ class DeadSpacer : StackObj { public: DeadSpacer(ContiguousSpace* space) : _allowed_deadspace_words(0), _space(space) { - size_t ratio = _space->allowed_dead_ratio(); + size_t ratio = (_space == SerialHeap::heap()->old_gen()->space()) + ? MarkSweepDeadRatio : 0; _active = ratio > 0; if (_active) { diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp index ef8f648b18e..f5622cd64de 100644 --- a/src/hotspot/share/gc/shared/space.cpp +++ b/src/hotspot/share/gc/shared/space.cpp @@ -213,8 +213,4 @@ TenuredSpace::TenuredSpace(SerialBlockOffsetTable* offsets, { initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle); } - -size_t TenuredSpace::allowed_dead_ratio() const { - return MarkSweepDeadRatio; -} #endif // INCLUDE_SERIALGC diff --git a/src/hotspot/share/gc/shared/space.hpp b/src/hotspot/share/gc/shared/space.hpp index 33ef4b01e01..a4679b3adad 100644 --- a/src/hotspot/share/gc/shared/space.hpp +++ b/src/hotspot/share/gc/shared/space.hpp @@ -135,10 +135,6 @@ public: _next_compaction_space = csp; } - // The maximum percentage of objects that can be dead in the compacted - // live part of a compacted space ("deadwood" support.) - virtual size_t allowed_dead_ratio() const { return 0; }; - // Accessors HeapWord* top() const { return _top; } void set_top(HeapWord* value) { _top = value; } @@ -196,8 +192,6 @@ class TenuredSpace: public ContiguousSpace { protected: SerialBlockOffsetTable* _offsets; - // Mark sweep support - size_t allowed_dead_ratio() const override; public: // Constructor TenuredSpace(SerialBlockOffsetTable* offsets,