src/hotspot/share/gc/g1/g1RemSetSummary.cpp
changeset 58652 9b67dd88a931
parent 58508 d6058bd73982
child 58679 9c3209ff7550
child 59114 c545e449137c
--- a/src/hotspot/share/gc/g1/g1RemSetSummary.cpp	Wed Oct 16 16:54:56 2019 +0200
+++ b/src/hotspot/share/gc/g1/g1RemSetSummary.cpp	Mon Oct 14 18:48:10 2019 -0700
@@ -81,8 +81,7 @@
   return _rs_threads_vtimes[thread];
 }
 
-G1RemSetSummary::G1RemSetSummary() :
-  _rem_set(NULL),
+G1RemSetSummary::G1RemSetSummary(bool should_update) :
   _total_mutator_refined_cards(0),
   _total_concurrent_refined_cards(0),
   _num_coarsenings(0),
@@ -91,17 +90,10 @@
   _sampling_thread_vtime(0.0f) {
 
   memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
-}
 
-G1RemSetSummary::G1RemSetSummary(G1RemSet* rem_set) :
-  _rem_set(rem_set),
-  _total_mutator_refined_cards(0),
-  _total_concurrent_refined_cards(0),
-  _num_coarsenings(0),
-  _num_vtimes(G1ConcurrentRefine::max_num_threads()),
-  _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
-  _sampling_thread_vtime(0.0f) {
-  update();
+  if (should_update) {
+    update();
+  }
 }
 
 G1RemSetSummary::~G1RemSetSummary() {