--- old/src/share/vm/gc/g1/g1RemSetSummary.cpp 2017-07-10 14:17:04.509603517 +0200 +++ new/src/share/vm/gc/g1/g1RemSetSummary.cpp 2017-07-10 14:17:04.412600509 +0200 @@ -51,6 +51,10 @@ } }; +G1RemSet* G1RemSetSummary::remset() const { + return G1CollectedHeap::heap()->g1_rem_set(); +} + void G1RemSetSummary::update() { _num_conc_refined_cards = remset()->num_conc_refined_cards(); DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); @@ -79,27 +83,16 @@ return _rs_threads_vtimes[thread]; } -void G1RemSetSummary::initialize(G1RemSet* remset) { - assert(_rs_threads_vtimes == NULL, "just checking"); - assert(remset != NULL, "just checking"); - - _remset = remset; - _num_vtimes = ConcurrentG1Refine::thread_num(); - _rs_threads_vtimes = NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC); - memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes); - - update(); -} - G1RemSetSummary::G1RemSetSummary() : - _remset(NULL), _num_conc_refined_cards(0), _num_processed_buf_mutator(0), _num_processed_buf_rs_threads(0), _num_coarsenings(0), - _rs_threads_vtimes(NULL), - _num_vtimes(0), + _num_vtimes(ConcurrentG1Refine::thread_num()), + _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)), _sampling_thread_vtime(0.0f) { + + memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes); } G1RemSetSummary::~G1RemSetSummary() {