--- old/src/share/vm/memory/generation.hpp 2014-10-17 16:10:05.000000000 +0200 +++ new/src/share/vm/memory/generation.hpp 2014-10-17 16:10:05.000000000 +0200 @@ -102,9 +102,6 @@ // Memory area reserved for generation VirtualSpace _virtual_space; - // Level in the generation hierarchy. - int _level; - // ("Weak") Reference processing support ReferenceProcessor* _ref_processor; @@ -114,12 +111,8 @@ // Statistics for garbage collection GCStats* _gc_stats; - // Returns the next generation in the configuration, or else NULL if this - // is the highest generation. - Generation* next_gen() const; - // Initialize the generation. - Generation(ReservedSpace rs, size_t initial_byte_size, int level); + Generation(ReservedSpace rs, size_t initial_byte_size); // Apply "cl->do_oop" to (the address of) (exactly) all the ref fields in // "sp" that point into younger generations. @@ -138,6 +131,11 @@ Other }; + enum Type { + Young, + Old + }; + enum SomePublicConstants { // Generations are GenGrain-aligned and have size that are multiples of // GenGrain. @@ -438,7 +436,7 @@ // generation can decide to gather the amount of promoted data // if the collection of the younger generations has completed. GCStats* gc_stats() const { return _gc_stats; } - virtual void update_gc_stats(int current_level, bool full) {} + virtual void update_gc_stats(Generation* current_generation, bool full) {} // Mark sweep support phase2 virtual void prepare_for_compaction(CompactPoint* cp); @@ -523,8 +521,6 @@ virtual const char* name() const = 0; virtual const char* short_name() const = 0; - int level() const { return _level; } - // Attributes // True iff the given generation may only be the youngest generation. @@ -638,8 +634,7 @@ size_t _capacity_at_prologue; size_t _used_at_prologue; - CardGeneration(ReservedSpace rs, size_t initial_byte_size, int level, - GenRemSet* remset); + CardGeneration(ReservedSpace rs, size_t initial_byte_size, GenRemSet* remset); public: @@ -696,9 +691,8 @@ public: OneContigSpaceCardGeneration(ReservedSpace rs, size_t initial_byte_size, - int level, GenRemSet* remset, - ContiguousSpace* space) : - CardGeneration(rs, initial_byte_size, level, remset), + GenRemSet* remset, ContiguousSpace* space) : + CardGeneration(rs, initial_byte_size, remset), _the_space(space) {}