diff --git a/src/hotspot/share/gc/serial/generation.cpp b/src/hotspot/share/gc/serial/generation.cpp index 86fc3300e30ab..33910a2b380cc 100644 --- a/src/hotspot/share/gc/serial/generation.cpp +++ b/src/hotspot/share/gc/serial/generation.cpp @@ -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); -} diff --git a/src/hotspot/share/gc/serial/generation.hpp b/src/hotspot/share/gc/serial/generation.hpp index 5a0440daff6ce..09d40052ff12f 100644 --- a/src/hotspot/share/gc/serial/generation.hpp +++ b/src/hotspot/share/gc/serial/generation.hpp @@ -87,7 +87,6 @@ class Generation: public CHeapObj { enum Name { DefNew, MarkSweepCompact, - Other }; enum SomePublicConstants { @@ -99,9 +98,6 @@ class Generation: public CHeapObj { 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 { // 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 { 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 diff --git a/src/hotspot/share/gc/shared/vmStructs_gc.hpp b/src/hotspot/share/gc/shared/vmStructs_gc.hpp index 472a02c012a38..21437b3b5a3c1 100644 --- a/src/hotspot/share/gc/shared/vmStructs_gc.hpp +++ b/src/hotspot/share/gc/shared/vmStructs_gc.hpp @@ -217,7 +217,6 @@ \ declare_constant(Generation::DefNew) \ declare_constant(Generation::MarkSweepCompact) \ - declare_constant(Generation::Other) \ \ declare_constant(Generation::LogOfGenGrain) \ declare_constant(Generation::GenGrain) \ diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java index e9854c3d683b3..01c85f0a0fc6a 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/shared/Generation.java @@ -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 @@ private static synchronized void initialize(TypeDataBase db) { // 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 @@ static Generation.Name nameForEnum(int value) { 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"); }