--- old/src/share/vm/memory/tenuredGeneration.cpp 2014-10-17 16:10:07.000000000 +0200 +++ new/src/share/vm/memory/tenuredGeneration.cpp 2014-10-17 16:10:07.000000000 +0200 @@ -36,10 +36,9 @@ #include "utilities/macros.hpp" TenuredGeneration::TenuredGeneration(ReservedSpace rs, - size_t initial_byte_size, int level, + size_t initial_byte_size, GenRemSet* remset) : - OneContigSpaceCardGeneration(rs, initial_byte_size, - level, remset, NULL) + OneContigSpaceCardGeneration(rs, initial_byte_size, remset, NULL) { HeapWord* bottom = (HeapWord*) _virtual_space.low(); HeapWord* end = (HeapWord*) _virtual_space.high(); @@ -171,11 +170,13 @@ err_msg("used: " SIZE_FORMAT " used_after_gc: " SIZE_FORMAT " capacity: " SIZE_FORMAT, used(), used_after_gc, capacity())); } -void TenuredGeneration::update_gc_stats(int current_level, + +void TenuredGeneration::update_gc_stats(Generation* current_generation, bool full) { - // If the next lower level(s) has been collected, gather any statistics + // If the young generation has been collected, gather any statistics // that are of interest at this point. - if (!full && (current_level + 1) == level()) { + bool current_is_young = (current_generation == GenCollectedHeap::heap()->young_gen()); + if (!full && current_is_young) { // Calculate size of data promoted from the younger generations // before doing the collection. size_t used_before_gc = used();