8324769: Serial: Remove unused TenuredGeneration::unsafe_max_alloc_nogc

Reviewed-by: tschatzl
This commit is contained in:
Albert Mingkun Yang 2024-01-29 12:42:10 +00:00
parent 3066d49cc1
commit 4df04f0ec9
4 changed files with 7 additions and 12 deletions

View File

@ -174,7 +174,14 @@ class DefNewGeneration: public Generation {
size_t free() const;
size_t max_capacity() const;
size_t capacity_before_gc() const;
// Return an estimate of the maximum allocation that could be performed
// in the generation without triggering any collection or expansion
// activity. It is "unsafe" because no locks are taken; the result
// should be treated as an approximation, not a guarantee, for use in
// 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; }

View File

@ -108,13 +108,6 @@ class Generation: public CHeapObj<mtGC> {
// The largest number of contiguous free bytes in this or any higher generation.
virtual size_t max_contiguous_available() const;
// Return an estimate of the maximum allocation that could be performed
// in the generation without triggering any collection or expansion
// activity. It is "unsafe" because no locks are taken; the result
// should be treated as an approximation, not a guarantee, for use in
// heuristic resizing decisions.
virtual size_t unsafe_max_alloc_nogc() const = 0;
// Returns true if this generation cannot be expanded further
// without a GC. Override as appropriate.
virtual bool is_maximal_no_gc() const {

View File

@ -450,10 +450,6 @@ TenuredGeneration::expand_and_allocate(size_t word_size, bool is_tlab) {
return _the_space->allocate(word_size);
}
size_t TenuredGeneration::unsafe_max_alloc_nogc() const {
return _the_space->free();
}
size_t TenuredGeneration::contiguous_available() const {
return _the_space->free() + _virtual_space.uncommitted_size();
}

View File

@ -111,7 +111,6 @@ class TenuredGeneration: public Generation {
const char* name() const { return "tenured generation"; }
const char* short_name() const { return "Tenured"; }
size_t unsafe_max_alloc_nogc() const;
size_t contiguous_available() const;
// Iteration