--- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-28 22:17:23.147589666 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2017-11-28 22:17:22.707594873 +0100 @@ -1827,6 +1827,16 @@ // values in the heap have been properly initialized. _g1mm = new G1MonitoringSupport(this); + G1StringDedup::initialize(); + + _preserved_marks_set.init(ParallelGCThreads); + + _collection_set.initialize(max_regions()); + + return JNI_OK; +} + +void G1CollectedHeap::initialize_serviceability() { _eden_pool = new G1EdenPool(this); _survivor_pool = new G1SurvivorPool(this); _old_pool = new G1OldGenPool(this); @@ -1838,13 +1848,6 @@ _memory_manager.add_pool(_eden_pool); _memory_manager.add_pool(_survivor_pool); - G1StringDedup::initialize(); - - _preserved_marks_set.init(ParallelGCThreads); - - _collection_set.initialize(max_regions()); - - return JNI_OK; } void G1CollectedHeap::stop() { @@ -1872,6 +1875,7 @@ } void G1CollectedHeap::post_initialize() { + CollectedHeap::post_initialize(); ref_processing_init(); }