Skip to content

Commit

Permalink
8324769: Serial: Remove unused TenuredGeneration::unsafe_max_alloc_nogc
Browse files Browse the repository at this point in the history
Reviewed-by: tschatzl
  • Loading branch information
albertnetymk committed Jan 29, 2024
1 parent 3066d49 commit 4df04f0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
7 changes: 7 additions & 0 deletions src/hotspot/share/gc/serial/defNewGeneration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
7 changes: 0 additions & 7 deletions src/hotspot/share/gc/serial/generation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 0 additions & 4 deletions src/hotspot/share/gc/serial/tenuredGeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
1 change: 0 additions & 1 deletion src/hotspot/share/gc/serial/tenuredGeneration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 4df04f0

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.