8324210: Serial: Remove unused methods in Generation
Reviewed-by: tschatzl, stefank
This commit is contained in:
parent
bcb340da09
commit
f5e6d111b1
src
hotspot/share/gc
jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared
@ -183,18 +183,3 @@ bool Generation::block_is_obj(const HeapWord* p) const {
|
||||
((Generation*)this)->space_iterate(&blk);
|
||||
return blk.is_obj;
|
||||
}
|
||||
|
||||
class GenerationObjIterateClosure : public SpaceClosure {
|
||||
private:
|
||||
ObjectClosure* _cl;
|
||||
public:
|
||||
virtual void do_space(Space* s) {
|
||||
s->object_iterate(_cl);
|
||||
}
|
||||
GenerationObjIterateClosure(ObjectClosure* cl) : _cl(cl) {}
|
||||
};
|
||||
|
||||
void Generation::object_iterate(ObjectClosure* cl) {
|
||||
GenerationObjIterateClosure blk(cl);
|
||||
space_iterate(&blk);
|
||||
}
|
||||
|
@ -87,7 +87,6 @@ class Generation: public CHeapObj<mtGC> {
|
||||
enum Name {
|
||||
DefNew,
|
||||
MarkSweepCompact,
|
||||
Other
|
||||
};
|
||||
|
||||
enum SomePublicConstants {
|
||||
@ -99,9 +98,6 @@ class Generation: public CHeapObj<mtGC> {
|
||||
GenGrain = 1 << LogOfGenGrain
|
||||
};
|
||||
|
||||
|
||||
virtual Generation::Name kind() { return Generation::Other; }
|
||||
|
||||
virtual size_t capacity() const = 0; // The maximum number of object bytes the
|
||||
// generation can currently hold.
|
||||
virtual size_t used() const = 0; // The number of used bytes in the gen.
|
||||
@ -112,10 +108,6 @@ class Generation: public CHeapObj<mtGC> {
|
||||
// for the allocation of objects.
|
||||
virtual size_t max_capacity() const;
|
||||
|
||||
// If this is a young generation, the maximum number of bytes that can be
|
||||
// allocated in this generation before a GC is triggered.
|
||||
virtual size_t capacity_before_gc() const { return 0; }
|
||||
|
||||
// The largest number of contiguous free bytes in the generation,
|
||||
// including expansion (Assumes called at a safepoint.)
|
||||
virtual size_t contiguous_available() const = 0;
|
||||
@ -236,28 +228,10 @@ class Generation: public CHeapObj<mtGC> {
|
||||
GCStats* gc_stats() const { return _gc_stats; }
|
||||
virtual void update_gc_stats(Generation* current_generation, bool full) {}
|
||||
|
||||
// Accessing "marks".
|
||||
|
||||
// This function gives a generation a chance to note a point between
|
||||
// collections. For example, a contiguous generation might note the
|
||||
// beginning allocation point post-collection, which might allow some later
|
||||
// operations to be optimized.
|
||||
virtual void save_marks() {}
|
||||
|
||||
// This function is "true" iff any no allocations have occurred in the
|
||||
// generation since the last call to "save_marks".
|
||||
virtual bool no_allocs_since_save_marks() = 0;
|
||||
|
||||
// Printing
|
||||
virtual const char* name() const = 0;
|
||||
virtual const char* short_name() const = 0;
|
||||
|
||||
// Iteration.
|
||||
|
||||
// Iterate over all objects in the generation, calling "cl.do_object" on
|
||||
// each.
|
||||
virtual void object_iterate(ObjectClosure* cl);
|
||||
|
||||
// Block abstraction.
|
||||
|
||||
// Returns the address of the start of the "block" that contains the
|
||||
|
@ -217,7 +217,6 @@
|
||||
\
|
||||
declare_constant(Generation::DefNew) \
|
||||
declare_constant(Generation::MarkSweepCompact) \
|
||||
declare_constant(Generation::Other) \
|
||||
\
|
||||
declare_constant(Generation::LogOfGenGrain) \
|
||||
declare_constant(Generation::GenGrain) \
|
||||
|
@ -57,7 +57,6 @@ public abstract class Generation extends VMObject {
|
||||
private static int NAME_DEF_NEW;
|
||||
private static int NAME_PAR_NEW;
|
||||
private static int NAME_MARK_SWEEP_COMPACT;
|
||||
private static int NAME_OTHER;
|
||||
|
||||
static {
|
||||
VM.registerVMInitializedObserver(new Observer() {
|
||||
@ -80,7 +79,6 @@ public abstract class Generation extends VMObject {
|
||||
// constants from Generation::Name
|
||||
NAME_DEF_NEW = db.lookupIntConstant("Generation::DefNew").intValue();
|
||||
NAME_MARK_SWEEP_COMPACT = db.lookupIntConstant("Generation::MarkSweepCompact").intValue();
|
||||
NAME_OTHER = db.lookupIntConstant("Generation::Other").intValue();
|
||||
}
|
||||
|
||||
public Generation(Address addr) {
|
||||
@ -111,8 +109,6 @@ public abstract class Generation extends VMObject {
|
||||
return Name.DEF_NEW;
|
||||
} else if (value == NAME_MARK_SWEEP_COMPACT) {
|
||||
return Name.MARK_SWEEP_COMPACT;
|
||||
} else if (value == NAME_OTHER) {
|
||||
return Name.OTHER;
|
||||
} else {
|
||||
throw new RuntimeException("should not reach here");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user