--- old/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-04-01 13:10:13.383837444 +0200 +++ new/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp 2015-04-01 13:10:13.259837449 +0200 @@ -2036,6 +2036,11 @@ return HeapRegion::max_region_size(); } +void G1CollectedHeap::post_initialize() { + CollectedHeap::post_initialize(); + ref_processing_init(); +} + void G1CollectedHeap::ref_processing_init() { // Reference processing in G1 currently works as follows: // @@ -2072,7 +2077,6 @@ // * Discovery is atomic - i.e. not concurrent. // * Reference discovery will not need a barrier. - SharedHeap::ref_processing_init(); MemRegion mr = reserved_region(); // Concurrent Mark ref processor --- old/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2015-04-01 13:10:13.639837433 +0200 +++ new/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp 2015-04-01 13:10:13.523837438 +0200 @@ -1000,6 +1000,9 @@ // Return the (conservative) maximum heap alignment for any G1 heap static size_t conservative_max_heap_alignment(); + // Does operations required after initialization has been done. + void post_initialize(); + // Initialize weak reference processing. virtual void ref_processing_init(); --- old/src/share/vm/gc_interface/collectedHeap.hpp 2015-04-01 13:10:13.855837424 +0200 +++ new/src/share/vm/gc_interface/collectedHeap.hpp 2015-04-01 13:10:13.739837429 +0200 @@ -207,7 +207,7 @@ // In many heaps, there will be a need to perform some initialization activities // after the Universe is fully formed, but before general heap allocation is allowed. // This is the correct place to place such initialization methods. - virtual void post_initialize() = 0; + virtual void post_initialize(); // Stop any onging concurrent work and prepare for exit. virtual void stop() {} --- old/src/share/vm/memory/genCollectedHeap.cpp 2015-04-01 13:10:14.067837415 +0200 +++ new/src/share/vm/memory/genCollectedHeap.cpp 2015-04-01 13:10:13.951837420 +0200 @@ -167,7 +167,8 @@ } void GenCollectedHeap::post_initialize() { - SharedHeap::post_initialize(); + CollectedHeap::post_initialize(); + ref_processing_init(); GenCollectorPolicy *policy = (GenCollectorPolicy *)collector_policy(); guarantee(policy->is_generation_policy(), "Illegal policy type"); assert((_young_gen->kind() == Generation::DefNew) || @@ -186,7 +187,6 @@ } void GenCollectedHeap::ref_processing_init() { - SharedHeap::ref_processing_init(); _young_gen->ref_processor_init(); _old_gen->ref_processor_init(); } --- old/src/share/vm/memory/sharedHeap.cpp 2015-04-01 13:10:14.283837406 +0200 +++ new/src/share/vm/memory/sharedHeap.cpp 2015-04-01 13:10:14.171837411 +0200 @@ -69,10 +69,3 @@ SharedHeap::StrongRootsScope::~StrongRootsScope() { Threads::assert_all_threads_claimed(); } - -void SharedHeap::post_initialize() { - CollectedHeap::post_initialize(); - ref_processing_init(); -} - -void SharedHeap::ref_processing_init() {} --- old/src/share/vm/memory/sharedHeap.hpp 2015-04-01 13:10:14.479837398 +0200 +++ new/src/share/vm/memory/sharedHeap.hpp 2015-04-01 13:10:14.371837402 +0200 @@ -113,12 +113,6 @@ SharedHeap(); public: - // Does operations required after initialization has been done. - virtual void post_initialize(); - - // Initialization of ("weak") reference processing support - virtual void ref_processing_init(); - // Iteration functions. void oop_iterate(ExtendedOopClosure* cl) = 0;