8323779: Serial: Remove Generation::promotion_attempt_is_safe
Reviewed-by: stefank, cjplummer
This commit is contained in:
parent
22642ff0aa
commit
f2a4ed680b
src/hotspot/share/gc/serial
@ -27,6 +27,7 @@
|
||||
|
||||
#include "gc/serial/cSpaceCounters.hpp"
|
||||
#include "gc/serial/generation.hpp"
|
||||
#include "gc/serial/tenuredGeneration.hpp"
|
||||
#include "gc/shared/ageTable.hpp"
|
||||
#include "gc/shared/copyFailedInfo.hpp"
|
||||
#include "gc/shared/gc_globals.hpp"
|
||||
@ -52,7 +53,8 @@ class STWGCTimer;
|
||||
class DefNewGeneration: public Generation {
|
||||
friend class VMStructs;
|
||||
|
||||
Generation* _old_gen;
|
||||
TenuredGeneration* _old_gen;
|
||||
|
||||
uint _tenuring_threshold; // Tenuring threshold for next collection.
|
||||
AgeTable _age_table;
|
||||
// Size of object to pretenure in words; command line provides bytes
|
||||
|
@ -113,14 +113,6 @@ size_t Generation::max_contiguous_available() const {
|
||||
return MAX2(avail, old_avail);
|
||||
}
|
||||
|
||||
bool Generation::promotion_attempt_is_safe(size_t max_promotion_in_bytes) const {
|
||||
size_t available = max_contiguous_available();
|
||||
bool res = (available >= max_promotion_in_bytes);
|
||||
log_trace(gc)("Generation: promo attempt is%s safe: available(" SIZE_FORMAT ") %s max_promo(" SIZE_FORMAT ")",
|
||||
res? "":" not", available, res? ">=":"<", max_promotion_in_bytes);
|
||||
return res;
|
||||
}
|
||||
|
||||
// Ignores "ref" and calls allocate().
|
||||
oop Generation::promote(oop obj, size_t obj_size) {
|
||||
assert(obj_size == obj->size(), "bad obj_size passed in");
|
||||
|
@ -122,12 +122,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;
|
||||
|
||||
// Returns true if promotions of the specified amount are
|
||||
// likely to succeed without a promotion failure.
|
||||
// Promotion of the full amount is not guaranteed but
|
||||
// might be attempted in the worst case.
|
||||
virtual bool promotion_attempt_is_safe(size_t max_promotion_in_bytes) 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
|
||||
|
@ -156,7 +156,11 @@ class TenuredGeneration: public Generation {
|
||||
|
||||
virtual void update_gc_stats(Generation* current_generation, bool full);
|
||||
|
||||
virtual bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const;
|
||||
// Returns true if promotions of the specified amount are
|
||||
// likely to succeed without a promotion failure.
|
||||
// Promotion of the full amount is not guaranteed but
|
||||
// might be attempted in the worst case.
|
||||
bool promotion_attempt_is_safe(size_t max_promoted_in_bytes) const;
|
||||
|
||||
virtual void verify();
|
||||
virtual void print_on(outputStream* st) const;
|
||||
|
@ -40,7 +40,7 @@
|
||||
nonstatic_field(TenuredGeneration, _min_heap_delta_bytes, size_t) \
|
||||
nonstatic_field(TenuredGeneration, _the_space, TenuredSpace*) \
|
||||
\
|
||||
nonstatic_field(DefNewGeneration, _old_gen, Generation*) \
|
||||
nonstatic_field(DefNewGeneration, _old_gen, TenuredGeneration*) \
|
||||
nonstatic_field(DefNewGeneration, _tenuring_threshold, uint) \
|
||||
nonstatic_field(DefNewGeneration, _age_table, AgeTable) \
|
||||
nonstatic_field(DefNewGeneration, _eden_space, ContiguousSpace*) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user