8335604: Serial: Inline Generation::contiguous_available

Reviewed-by: tschatzl
This commit is contained in:
Albert Mingkun Yang 2024-07-08 15:45:26 +00:00
parent be3676f6bb
commit d8c1c6ab05
5 changed files with 1 additions and 18 deletions

View File

@ -533,11 +533,6 @@ size_t DefNewGeneration::capacity_before_gc() const {
return eden()->capacity();
}
size_t DefNewGeneration::contiguous_available() const {
return eden()->free();
}
void DefNewGeneration::object_iterate(ObjectClosure* blk) {
eden()->object_iterate(blk);
from()->object_iterate(blk);

View File

@ -172,8 +172,6 @@ class DefNewGeneration: public Generation {
// heuristic resizing decisions.
size_t unsafe_max_alloc_nogc() const;
size_t contiguous_available() const;
size_t max_eden_size() const { return _max_eden_size; }
size_t max_survivor_size() const { return _max_survivor_size; }

View File

@ -96,10 +96,6 @@ class Generation: public CHeapObj<mtGC> {
// for the allocation of objects.
virtual size_t max_capacity() const;
// The largest number of contiguous free bytes in the generation,
// including expansion (Assumes called at a safepoint.)
virtual size_t contiguous_available() const = 0;
MemRegion reserved() const { return _reserved; }
/* Returns "TRUE" iff "p" points into the reserved area of the generation. */

View File

@ -377,7 +377,7 @@ void TenuredGeneration::update_counters() {
}
bool TenuredGeneration::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
size_t available = contiguous_available();
size_t available = _the_space->free() + _virtual_space.uncommitted_size();
size_t av_promo = (size_t)_avg_promoted->padded_average();
bool res = (available >= av_promo) || (available >= max_promotion_in_bytes);
@ -413,10 +413,6 @@ TenuredGeneration::expand_and_allocate(size_t word_size, bool is_tlab) {
return allocate(word_size, is_tlab);
}
size_t TenuredGeneration::contiguous_available() const {
return _the_space->free() + _virtual_space.uncommitted_size();
}
void TenuredGeneration::assert_correct_size_change_locking() {
assert_locked_or_safepoint(Heap_lock);
}

View File

@ -124,8 +124,6 @@ public:
const char* name() const { return "tenured generation"; }
const char* short_name() const { return "Tenured"; }
size_t contiguous_available() const;
// Iteration
void object_iterate(ObjectClosure* blk);