--- old/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-10-17 15:27:11.000000000 +0200 +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp 2014-10-17 15:27:11.000000000 +0200 @@ -187,7 +187,7 @@ cp->space->set_compaction_top(compact_top); cp->space = cp->space->next_compaction_space(); if (cp->space == NULL) { - cp->gen = GenCollectedHeap::heap()->prev_gen(cp->gen); + cp->gen = GenCollectedHeap::heap()->young_gen(); assert(cp->gen != NULL, "compaction must succeed"); cp->space = cp->gen->first_compaction_space(); assert(cp->space != NULL, "generation must have a first compaction space"); @@ -907,7 +907,6 @@ } } - // Callers of this iterator beware: The closure application should // be robust in the face of uninitialized objects and should (always) // return a correct size so that the next addr + size below gives us a --- 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) { --- old/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2014-10-17 15:27:13.000000000 +0200 +++ new/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp 2014-10-17 15:27:13.000000000 +0200 @@ -326,7 +326,7 @@ private: ParallelTaskTerminator& _term; ParNewGeneration& _gen; - Generation& _next_gen; + Generation& _old_gen; public: bool is_valid(int id) const { return id < length(); } ParallelTaskTerminator* terminator() { return &_term; } @@ -339,7 +339,7 @@ Stack* overflow_stacks, size_t desired_plab_sz, ParallelTaskTerminator& term) : ResourceArray(sizeof(ParScanThreadState), num_threads), - _gen(gen), _next_gen(old_gen), _term(term) + _gen(gen), _old_gen(old_gen), _term(term) { assert(num_threads > 0, "sanity check!"); assert(ParGCUseLocalOverflow == (overflow_stacks != NULL), @@ -475,8 +475,8 @@ _gen.age_table()->merge(local_table); // Inform old gen that we're done. - _next_gen.par_promote_alloc_done(i); - _next_gen.par_oop_since_save_marks_iterate_done(i); + _old_gen.par_promote_alloc_done(i); + _old_gen.par_oop_since_save_marks_iterate_done(i); } if (UseConcMarkSweepGC && ParallelGCThreads > 0) { @@ -578,10 +578,10 @@ par_scan_state()->end_term_time(); } -ParNewGenTask::ParNewGenTask(ParNewGeneration* gen, Generation* next_gen, +ParNewGenTask::ParNewGenTask(ParNewGeneration* gen, Generation* old_gen, HeapWord* young_old_boundary, ParScanThreadStateSet* state_set) : AbstractGangTask("ParNewGeneration collection"), - _gen(gen), _next_gen(next_gen), + _gen(gen), _old_gen(old_gen), _young_old_boundary(young_old_boundary), _state_set(state_set) {} @@ -605,7 +605,7 @@ // We would need multiple old-gen queues otherwise. assert(gch->n_gens() == 2, "Par young collection currently only works with one older gen."); - Generation* old_gen = gch->next_gen(_gen); + Generation* old_gen = gch->old_gen(); ParScanThreadState& par_scan_state = _state_set->thread_state(worker_id); assert(_state_set->is_valid(worker_id), "Should not have been called"); @@ -768,7 +768,7 @@ typedef AbstractRefProcTaskExecutor::ProcessTask ProcessTask; public: ParNewRefProcTaskProxy(ProcessTask& task, ParNewGeneration& gen, - Generation& next_gen, + Generation& old_gen, HeapWord* young_old_boundary, ParScanThreadStateSet& state_set); @@ -780,20 +780,20 @@ private: ParNewGeneration& _gen; ProcessTask& _task; - Generation& _next_gen; + Generation& _old_gen; HeapWord* _young_old_boundary; ParScanThreadStateSet& _state_set; }; ParNewRefProcTaskProxy::ParNewRefProcTaskProxy( ProcessTask& task, ParNewGeneration& gen, - Generation& next_gen, + Generation& old_gen, HeapWord* young_old_boundary, ParScanThreadStateSet& state_set) : AbstractGangTask("ParNewGeneration parallel reference processing"), _gen(gen), _task(task), - _next_gen(next_gen), + _old_gen(old_gen), _young_old_boundary(young_old_boundary), _state_set(state_set) { @@ -899,7 +899,7 @@ from()->set_next_compaction_space(to()); gch->set_incremental_collection_failed(); // Inform the next generation that a promotion failure occurred. - _next_gen->promotion_failure_occurred(); + _old_gen->promotion_failure_occurred(); // Trace promotion failure in the parallel GC threads thread_state_set.trace_promotion_failed(gc_tracer); @@ -933,7 +933,7 @@ workers->set_active_workers(active_workers); assert(gch->n_gens() == 2, "Par collection currently only works with single older gen."); - _next_gen = gch->next_gen(this); + _old_gen = gch->old_gen(); // Do we have to avoid promotion_undo? if (gch->collector_policy()->is_concurrent_mark_sweep_policy()) { set_avoid_promotion_undo(true); @@ -979,10 +979,10 @@ // because only those workers go through the termination protocol. ParallelTaskTerminator _term(n_workers, task_queues()); ParScanThreadStateSet thread_state_set(workers->active_workers(), - *to(), *this, *_next_gen, *task_queues(), + *to(), *this, *_old_gen, *task_queues(), _overflow_stacks, desired_plab_sz(), _term); - ParNewGenTask tsk(this, _next_gen, reserved().end(), &thread_state_set); + ParNewGenTask tsk(this, _old_gen, reserved().end(), &thread_state_set); gch->set_par_threads(n_workers); gch->rem_set()->prepare_for_younger_refs_iterate(true); // It turns out that even when we're using 1 thread, doing the work in a @@ -1196,8 +1196,8 @@ return real_forwardee(old); } - new_obj = _next_gen->par_promote(par_scan_state->thread_num(), - old, m, sz); + new_obj = _old_gen->par_promote(par_scan_state->thread_num(), + old, m, sz); if (new_obj == NULL) { // promotion failed, forward to self @@ -1314,8 +1314,8 @@ if (new_obj == NULL) { // Either to-space is full or we decided to promote // try allocating obj tenured - new_obj = _next_gen->par_promote(par_scan_state->thread_num(), - old, m, sz); + new_obj = _old_gen->par_promote(par_scan_state->thread_num(), + old, m, sz); if (new_obj == NULL) { // promotion failed, forward to self @@ -1395,8 +1395,8 @@ par_scan_state->undo_alloc_in_to_space((HeapWord*)new_obj, sz); } else { assert(!_avoid_promotion_undo, "Should not be here if avoiding."); - _next_gen->par_promote_alloc_undo(par_scan_state->thread_num(), - (HeapWord*)new_obj, sz); + _old_gen->par_promote_alloc_undo(par_scan_state->thread_num(), + (HeapWord*)new_obj, sz); } return forward_ptr; --- old/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp 2014-10-17 15:27:14.000000000 +0200 +++ new/src/share/vm/gc_implementation/parNew/parNewGeneration.hpp 2014-10-17 15:27:14.000000000 +0200 @@ -233,13 +233,13 @@ class ParNewGenTask: public AbstractGangTask { private: ParNewGeneration* _gen; - Generation* _next_gen; + Generation* _old_gen; HeapWord* _young_old_boundary; class ParScanThreadStateSet* _state_set; public: ParNewGenTask(ParNewGeneration* gen, - Generation* next_gen, + Generation* old_gen, HeapWord* young_old_boundary, ParScanThreadStateSet* state_set); --- old/src/share/vm/memory/collectorPolicy.cpp 2014-10-17 15:27:15.000000000 +0200 +++ new/src/share/vm/memory/collectorPolicy.cpp 2014-10-17 15:27:15.000000000 +0200 @@ -602,7 +602,7 @@ HandleMark hm; // Discard any handles allocated in each iteration. // First allocation attempt is lock-free. - Generation *young = gch->get_gen(0); + Generation *young = gch->young_gen(); assert(young->supports_inline_contig_alloc(), "Otherwise, must do alloc within heap lock"); if (young->should_allocate(size, is_tlab)) { @@ -616,8 +616,8 @@ { MutexLocker ml(Heap_lock); if (PrintGC && Verbose) { - gclog_or_tty->print_cr("TwoGenerationCollectorPolicy::mem_allocate_work:" - " attempting locked slow path allocation"); + gclog_or_tty->print_cr("GenCollectorPolicy::mem_allocate_work:" + " attempting locked slow path allocation"); } // Note that only large objects get a shot at being // allocated in later generations. @@ -706,7 +706,7 @@ // Give a warning if we seem to be looping forever. if ((QueuedAllocationWarningCount > 0) && (try_count % QueuedAllocationWarningCount == 0)) { - warning("TwoGenerationCollectorPolicy::mem_allocate_work retries %d times \n\t" + warning("GenCollectorPolicy::mem_allocate_work retries %d times \n\t" " size=" SIZE_FORMAT " %s", try_count, size, is_tlab ? "(TLAB)" : ""); } } @@ -716,10 +716,14 @@ bool is_tlab) { GenCollectedHeap *gch = GenCollectedHeap::heap(); HeapWord* result = NULL; - for (int i = number_of_generations() - 1; i >= 0 && result == NULL; i--) { - Generation *gen = gch->get_gen(i); - if (gen->should_allocate(size, is_tlab)) { - result = gen->expand_and_allocate(size, is_tlab); + Generation *old = gch->old_gen(); + if (old->should_allocate(size, is_tlab)) { + result = old->expand_and_allocate(size, is_tlab); + } + if (result == NULL) { + Generation *young = gch->young_gen(); + if (young->should_allocate(size, is_tlab)) { + result = young->expand_and_allocate(size, is_tlab); } } assert(result == NULL || gch->is_in_reserved(result), "result not in heap"); @@ -892,7 +896,7 @@ bool GenCollectorPolicy::should_try_older_generation_allocation( size_t word_size) const { GenCollectedHeap* gch = GenCollectedHeap::heap(); - size_t young_capacity = gch->get_gen(0)->capacity_before_gc(); + size_t young_capacity = gch->young_gen()->capacity_before_gc(); return (word_size > heap_word_size(young_capacity)) || GC_locker::is_active_and_needs_gc() || gch->incremental_collection_failed(); --- old/src/share/vm/memory/defNewGeneration.cpp 2014-10-17 15:27:15.000000000 +0200 +++ new/src/share/vm/memory/defNewGeneration.cpp 2014-10-17 15:27:15.000000000 +0200 @@ -230,7 +230,7 @@ compute_space_boundaries(0, SpaceDecorator::Clear, SpaceDecorator::Mangle); update_counters(); - _next_gen = NULL; + _old_gen = NULL; _tenuring_threshold = MaxTenuringThreshold; _pretenure_size_threshold_words = PretenureSizeThreshold >> LogHeapWordSize; @@ -387,8 +387,8 @@ assert(next_level < gch->_n_gens, "DefNewGeneration cannot be an oldest gen"); - Generation* next_gen = gch->get_gen(next_level); - size_t old_size = next_gen->capacity(); + Generation* old_gen = gch->old_gen(); + size_t old_size = old_gen->capacity(); size_t new_size_before = _virtual_space.committed_size(); size_t min_new_size = spec()->init_size(); size_t max_new_size = reserved().byte_size(); @@ -572,7 +572,7 @@ DefNewTracer gc_tracer; gc_tracer.report_gc_start(gch->gc_cause(), _gc_timer->gc_start()); - _next_gen = gch->next_gen(this); + _old_gen = gch->old_gen(); // If the next generation is too full to accommodate promotion // from this generation, pass on collection; let the next generation @@ -692,7 +692,7 @@ gch->set_incremental_collection_failed(); // Inform the next generation that a promotion failure occurred. - _next_gen->promotion_failure_occurred(); + _old_gen->promotion_failure_occurred(); gc_tracer.report_promotion_failed(_promotion_failed_info); // Reset the PromotionFailureALot counters. @@ -797,7 +797,7 @@ // Otherwise try allocating obj tenured if (obj == NULL) { - obj = _next_gen->promote(old, s); + obj = _old_gen->promote(old, s); if (obj == NULL) { handle_promotion_failure(old); return old; @@ -902,11 +902,11 @@ } return false; } - if (_next_gen == NULL) { + if (_old_gen == NULL) { GenCollectedHeap* gch = GenCollectedHeap::heap(); - _next_gen = gch->next_gen(this); + _old_gen = gch->old_gen(); } - return _next_gen->promotion_attempt_is_safe(used()); + return _old_gen->promotion_attempt_is_safe(used()); } void DefNewGeneration::gc_epilogue(bool full) { @@ -1026,8 +1026,7 @@ return eden(); } -HeapWord* DefNewGeneration::allocate(size_t word_size, - bool is_tlab) { +HeapWord* DefNewGeneration::allocate(size_t word_size, bool is_tlab) { // This is the slow-path allocation for the DefNewGeneration. // Most allocations are fast-path in compiled code. // We try to allocate from the eden. If that works, we are happy. @@ -1035,17 +1034,17 @@ // have to use it here, as well. HeapWord* result = eden()->par_allocate(word_size); if (result != NULL) { - if (CMSEdenChunksRecordAlways && _next_gen != NULL) { - _next_gen->sample_eden_chunk(); + if (CMSEdenChunksRecordAlways && _old_gen != NULL) { + _old_gen->sample_eden_chunk(); } return result; } do { HeapWord* old_limit = eden()->soft_end(); if (old_limit < eden()->end()) { - // Tell the next generation we reached a limit. + // Tell the old generation we reached a limit. HeapWord* new_limit = - next_gen()->allocation_limit_reached(eden(), eden()->top(), word_size); + _old_gen->allocation_limit_reached(eden(), eden()->top(), word_size); if (new_limit != NULL) { Atomic::cmpxchg_ptr(new_limit, eden()->soft_end_addr(), old_limit); } else { @@ -1068,8 +1067,8 @@ // circular dependency at compile time. if (result == NULL) { result = allocate_from_space(word_size); - } else if (CMSEdenChunksRecordAlways && _next_gen != NULL) { - _next_gen->sample_eden_chunk(); + } else if (CMSEdenChunksRecordAlways && _old_gen != NULL) { + _old_gen->sample_eden_chunk(); } return result; } @@ -1077,8 +1076,8 @@ HeapWord* DefNewGeneration::par_allocate(size_t word_size, bool is_tlab) { HeapWord* res = eden()->par_allocate(word_size); - if (CMSEdenChunksRecordAlways && _next_gen != NULL) { - _next_gen->sample_eden_chunk(); + if (CMSEdenChunksRecordAlways && _old_gen != NULL) { + _old_gen->sample_eden_chunk(); } return res; } --- old/src/share/vm/memory/defNewGeneration.hpp 2014-10-17 15:27:16.000000000 +0200 +++ new/src/share/vm/memory/defNewGeneration.hpp 2014-10-17 15:27:16.000000000 +0200 @@ -44,7 +44,7 @@ friend class VMStructs; protected: - Generation* _next_gen; + Generation* _old_gen; uint _tenuring_threshold; // Tenuring threshold for next collection. ageTable _age_table; // Size of object to pretenure in words; command line provides bytes --- old/src/share/vm/memory/genCollectedHeap.cpp 2014-10-17 15:27:17.000000000 +0200 +++ new/src/share/vm/memory/genCollectedHeap.cpp 2014-10-17 15:27:17.000000000 +0200 @@ -192,18 +192,17 @@ SharedHeap::post_initialize(); GenCollectorPolicy *policy = (GenCollectorPolicy *)collector_policy(); guarantee(policy->is_generation_policy(), "Illegal policy type"); - DefNewGeneration* def_new_gen = (DefNewGeneration*) get_gen(0); + DefNewGeneration* def_new_gen = (DefNewGeneration*) _young_gen; assert(def_new_gen->kind() == Generation::DefNew || def_new_gen->kind() == Generation::ParNew, "Wrong generation kind"); - Generation* old_gen = get_gen(1); - assert(old_gen->kind() == Generation::ConcurrentMarkSweep || - old_gen->kind() == Generation::MarkSweepCompact, + assert(_old_gen->kind() == Generation::ConcurrentMarkSweep || + _old_gen->kind() == Generation::MarkSweepCompact, "Wrong generation kind"); policy->initialize_size_policy(def_new_gen->eden()->capacity(), - old_gen->capacity(), + _old_gen->capacity(), def_new_gen->from()->capacity()); policy->initialize_gc_policy_counters(); } @@ -1041,20 +1040,10 @@ void GenCollectedHeap::prepare_for_compaction() { guarantee(_n_gens = 2, "Wrong number of generations"); - Generation* old_gen = _old_gen; // Start by compacting into same gen. - CompactPoint cp(old_gen); - old_gen->prepare_for_compaction(&cp); - Generation* young_gen = _young_gen; - young_gen->prepare_for_compaction(&cp); -} - -GCStats* GenCollectedHeap::gc_stats(int level) const { - if (level == 0) { - return _young_gen->gc_stats(); - } else { - return _old_gen->gc_stats(); - } + CompactPoint cp(_old_gen); + _old_gen->prepare_for_compaction(&cp); + _young_gen->prepare_for_compaction(&cp); } void GenCollectedHeap::verify(bool silent, VerifyOption option /* ignored */) { @@ -1117,10 +1106,10 @@ void GenCollectedHeap::print_tracing_info() const { if (TraceYoungGenTime) { - get_gen(0)->print_summary_info(); + _young_gen->print_summary_info(); } if (TraceOldGenTime) { - get_gen(1)->print_summary_info(); + _old_gen->print_summary_info(); } } --- old/src/share/vm/memory/genCollectedHeap.hpp 2014-10-17 15:27:18.000000000 +0200 +++ new/src/share/vm/memory/genCollectedHeap.hpp 2014-10-17 15:27:17.000000000 +0200 @@ -369,26 +369,6 @@ // collection. virtual bool is_maximal_no_gc() const; - // Return the generation before "gen". - Generation* prev_gen(Generation* gen) const { - int l = gen->level(); - guarantee(l == 1, "Out of bounds"); - return _young_gen; - } - - // Return the generation after "gen". - Generation* next_gen(Generation* gen) const { - int l = gen->level() + 1; - guarantee(l == 1, "Out of bounds"); - return _old_gen; - } - - Generation* get_gen(int i) const { - guarantee(i >= 0 && i < _n_gens, "Out of bounds"); - if (i == 0) return _young_gen; - else return _old_gen; - } - int n_gens() const { assert(_n_gens == gen_policy()->number_of_generations(), "Sanity"); return _n_gens; @@ -477,7 +457,7 @@ assert(heap()->collector_policy()->is_generation_policy(), "the following definition may not be suitable for an n(>2)-generation system"); return incremental_collection_failed() || - (consult_young && !get_gen(0)->collection_attempt_is_safe()); + (consult_young && !_young_gen->collection_attempt_is_safe()); } // If a generation bails out of an incremental collection, --- old/src/share/vm/memory/genMarkSweep.cpp 2014-10-17 15:27:18.000000000 +0200 +++ new/src/share/vm/memory/genMarkSweep.cpp 2014-10-17 15:27:18.000000000 +0200 @@ -115,12 +115,13 @@ // it (consider all cards dirty). In the future, we might consider doing // compaction within generations only, and doing card-table sliding. bool all_empty = true; - for (int i = 0; all_empty && i < level; i++) { - Generation* g = gch->get_gen(i); - all_empty = all_empty && gch->get_gen(i)->used() == 0; + if (level == 1) { + all_empty = gch->young_gen()->used() == 0; } + GenRemSet* rs = gch->rem_set(); - Generation* old_gen = gch->get_gen(level); + assert(level == 1, "Code will break if this isn't true."); + Generation* old_gen = gch->old_gen(); // Clear/invalidate below make use of the "prev_used_regions" saved earlier. if (all_empty) { // We've evacuated all generations below us. @@ -160,7 +161,7 @@ GenCollectedHeap* gch = GenCollectedHeap::heap(); // Scratch request on behalf of oldest generation; will do no // allocation. - ScratchBlock* scratch = gch->gather_scratch(gch->get_gen(gch->_n_gens-1), 0); + ScratchBlock* scratch = gch->gather_scratch(gch->old_gen(), 0); // $$$ To cut a corner, we'll only use the first scratch block, and then // revert to malloc. @@ -200,7 +201,8 @@ // use OopsInGenClosure constructor which takes a generation, // as the Universe has not been created when the static constructors // are run. - follow_root_closure.set_orig_generation(gch->get_gen(level)); + assert(level == 1, "We don't use mark-sweep on young generations"); + follow_root_closure.set_orig_generation(gch->old_gen()); // Need new claim bits before marking starts. ClassLoaderDataGraph::clear_claimed_marks(); @@ -288,7 +290,8 @@ // use OopsInGenClosure constructor which takes a generation, // as the Universe has not been created when the static constructors // are run. - adjust_pointer_closure.set_orig_generation(gch->get_gen(level)); + assert(level == 1, "We don't use mark-sweep on young generations."); + adjust_pointer_closure.set_orig_generation(gch->old_gen()); gch->gen_process_roots(level, false, // Younger gens are not roots. --- old/src/share/vm/memory/generation.cpp 2014-10-17 15:27:19.000000000 +0200 +++ new/src/share/vm/memory/generation.cpp 2014-10-17 15:27:19.000000000 +0200 @@ -161,9 +161,8 @@ Generation* Generation::next_gen() const { GenCollectedHeap* gch = GenCollectedHeap::heap(); - int next = level() + 1; - if (next < gch->_n_gens) { - return gch->get_gen(next); + if (level() == 0) { + return gch->old_gen(); } else { return NULL; } --- old/src/share/vm/memory/space.cpp 2014-10-17 15:27:20.000000000 +0200 +++ new/src/share/vm/memory/space.cpp 2014-10-17 15:27:20.000000000 +0200 @@ -389,7 +389,7 @@ cp->space->set_compaction_top(compact_top); cp->space = cp->space->next_compaction_space(); if (cp->space == NULL) { - cp->gen = GenCollectedHeap::heap()->prev_gen(cp->gen); + cp->gen = GenCollectedHeap::heap()->young_gen(); assert(cp->gen != NULL, "compaction must succeed"); cp->space = cp->gen->first_compaction_space(); assert(cp->space != NULL, "generation must have a first compaction space"); --- old/src/share/vm/runtime/vmStructs.cpp 2014-10-17 15:27:20.000000000 +0200 +++ new/src/share/vm/runtime/vmStructs.cpp 2014-10-17 15:27:20.000000000 +0200 @@ -524,7 +524,6 @@ nonstatic_field(ContiguousSpace, _concurrent_iteration_safe_limit, HeapWord*) \ nonstatic_field(ContiguousSpace, _saved_mark_word, HeapWord*) \ \ - nonstatic_field(DefNewGeneration, _next_gen, Generation*) \ nonstatic_field(DefNewGeneration, _tenuring_threshold, uint) \ nonstatic_field(DefNewGeneration, _age_table, ageTable) \ nonstatic_field(DefNewGeneration, _eden_space, EdenSpace*) \ --- old/src/share/vm/services/memoryService.cpp 2014-10-17 15:27:21.000000000 +0200 +++ new/src/share/vm/services/memoryService.cpp 2014-10-17 15:27:21.000000000 +0200 @@ -160,8 +160,8 @@ _managers_list->append(_minor_gc_manager); _managers_list->append(_major_gc_manager); - add_generation_memory_pool(heap->get_gen(minor), _major_gc_manager, _minor_gc_manager); - add_generation_memory_pool(heap->get_gen(major), _major_gc_manager); + add_generation_memory_pool(heap->young_gen(), _major_gc_manager, _minor_gc_manager); + add_generation_memory_pool(heap->old_gen(), _major_gc_manager); } #if INCLUDE_ALL_GCS --- old/src/share/vm/services/memoryService.hpp 2014-10-17 15:27:22.000000000 +0200 +++ new/src/share/vm/services/memoryService.hpp 2014-10-17 15:27:22.000000000 +0200 @@ -57,13 +57,6 @@ init_code_heap_pools_size = 9 }; - // index for minor and major generations - enum { - minor = 0, - major = 1, - n_gens = 2 - }; - static GrowableArray* _pools_list; static GrowableArray* _managers_list;