8329659: Serial: Extract allowed_dead_ratio from ContiguousSpace
Reviewed-by: ayang, iwalulya
This commit is contained in:
parent
9ac3b77d0d
commit
115f4193eb
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user