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:
|
public:
|
||||||
DeadSpacer(ContiguousSpace* space) : _allowed_deadspace_words(0), _space(space) {
|
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;
|
_active = ratio > 0;
|
||||||
|
|
||||||
if (_active) {
|
if (_active) {
|
||||||
|
@ -213,8 +213,4 @@ TenuredSpace::TenuredSpace(SerialBlockOffsetTable* offsets,
|
|||||||
{
|
{
|
||||||
initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle);
|
initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t TenuredSpace::allowed_dead_ratio() const {
|
|
||||||
return MarkSweepDeadRatio;
|
|
||||||
}
|
|
||||||
#endif // INCLUDE_SERIALGC
|
#endif // INCLUDE_SERIALGC
|
||||||
|
@ -135,10 +135,6 @@ public:
|
|||||||
_next_compaction_space = csp;
|
_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
|
// Accessors
|
||||||
HeapWord* top() const { return _top; }
|
HeapWord* top() const { return _top; }
|
||||||
void set_top(HeapWord* value) { _top = value; }
|
void set_top(HeapWord* value) { _top = value; }
|
||||||
@ -196,8 +192,6 @@ class TenuredSpace: public ContiguousSpace {
|
|||||||
protected:
|
protected:
|
||||||
SerialBlockOffsetTable* _offsets;
|
SerialBlockOffsetTable* _offsets;
|
||||||
|
|
||||||
// Mark sweep support
|
|
||||||
size_t allowed_dead_ratio() const override;
|
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
TenuredSpace(SerialBlockOffsetTable* offsets,
|
TenuredSpace(SerialBlockOffsetTable* offsets,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user