8323738: Serial: Remove unreachable methods in Generation

Reviewed-by: tschatzl, stefank
This commit is contained in:
Albert Mingkun Yang 2024-01-16 08:38:53 +00:00
parent 36f4b34f19
commit 67204994dc
2 changed files with 2 additions and 24 deletions

View File

@ -254,8 +254,8 @@ class DefNewGeneration: public Generation {
// completed. Even if this method returns true, a collection
// may not be guaranteed to succeed, and the system should be
// able to safely unwind and recover from that failure, albeit
// at some additional cost. Override superclass's implementation.
virtual bool collection_attempt_is_safe();
// at some additional cost.
bool collection_attempt_is_safe();
virtual void collect(bool full,
bool clear_all_soft_refs,

View File

@ -188,18 +188,6 @@ class Generation: public CHeapObj<mtGC> {
// Thread-local allocation buffers
virtual bool supports_tlab_allocation() const { return false; }
virtual size_t tlab_capacity() const {
guarantee(false, "Generation doesn't support thread local allocation buffers");
return 0;
}
virtual size_t tlab_used() const {
guarantee(false, "Generation doesn't support thread local allocation buffers");
return 0;
}
virtual size_t unsafe_max_tlab_alloc() const {
guarantee(false, "Generation doesn't support thread local allocation buffers");
return 0;
}
// "obj" is the address of an object in a younger generation. Allocate space
// for "obj" in the current (or some higher) generation, and copy "obj" into
@ -226,16 +214,6 @@ class Generation: public CHeapObj<mtGC> {
return (full || should_allocate(word_size, is_tlab));
}
// Returns true if the collection is likely to be safely
// completed. Even if this method returns true, a collection
// may not be guaranteed to succeed, and the system should be
// able to safely unwind and recover from that failure, albeit
// at some additional cost.
virtual bool collection_attempt_is_safe() {
guarantee(false, "Are you sure you want to call this method?");
return true;
}
// Perform a garbage collection.
// If full is true attempt a full garbage collection of this generation.
// Otherwise, attempting to (at least) free enough space to support an