--- old/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2014-10-17 15:27:12.000000000 +0200 +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp 2014-10-17 15:27:12.000000000 +0200 @@ -380,7 +380,7 @@ double CMSStats::time_until_cms_gen_full() const { size_t cms_free = _cms_gen->cmsSpace()->free(); GenCollectedHeap* gch = GenCollectedHeap::heap(); - size_t expected_promotion = MIN2(gch->get_gen(0)->capacity(), + size_t expected_promotion = MIN2(gch->young_gen()->capacity(), (size_t) _cms_gen->gc_stats()->avg_promoted()->padded_average()); if (cms_free > expected_promotion) { // Start a cms collection if there isn't enough space to promote @@ -708,7 +708,7 @@ // Support for parallelizing young gen rescan GenCollectedHeap* gch = GenCollectedHeap::heap(); - _young_gen = gch->prev_gen(_cmsGen); + _young_gen = gch->young_gen(); if (gch->supports_inline_contig_alloc()) { _top_addr = gch->top_addr(); _end_addr = gch->end_addr(); @@ -955,7 +955,7 @@ if (prev_level >= 0) { size_t prev_size = 0; GenCollectedHeap* gch = GenCollectedHeap::heap(); - Generation* prev_gen = gch->get_gen(prev_level); + Generation* prev_gen = gch->young_gen(); prev_size = prev_gen->capacity(); gclog_or_tty->print_cr(" Younger gen size "SIZE_FORMAT, prev_size/1000); @@ -1126,7 +1126,7 @@ void CMSCollector::icms_update_allocation_limits() { - Generation* young = GenCollectedHeap::heap()->get_gen(0); + Generation* young = GenCollectedHeap::heap()->young_gen(); EdenSpace* eden = young->as_DefNewGeneration()->eden(); const unsigned int duty_cycle = stats().icms_update_duty_cycle(); @@ -1267,11 +1267,8 @@ size_t s = _cmsSpace->expansionSpaceRequired(obj_size); // HeapWords expand(s*HeapWordSize, MinHeapDeltaBytes, CMSExpansionCause::_satisfy_promotion); - // Since there's currently no next generation, we don't try to promote + // Since this is the old generation, we don't try to promote // into a more senior generation. - assert(next_gen() == NULL, "assumption, based upon which no attempt " - "is made to pass on a possibly failing " - "promotion to next generation"); res = _cmsSpace->promote(obj, obj_size); } if (res != NULL) {