src/hotspot/share/gc/g1/g1RemSetSummary.cpp
changeset 58652 9b67dd88a931
parent 58508 d6058bd73982
child 58679 9c3209ff7550
child 59114 c545e449137c
equal deleted inserted replaced
58650:d068b1e534de 58652:9b67dd88a931
    79   assert(_rs_threads_vtimes != NULL, "just checking");
    79   assert(_rs_threads_vtimes != NULL, "just checking");
    80   assert(thread < _num_vtimes, "just checking");
    80   assert(thread < _num_vtimes, "just checking");
    81   return _rs_threads_vtimes[thread];
    81   return _rs_threads_vtimes[thread];
    82 }
    82 }
    83 
    83 
    84 G1RemSetSummary::G1RemSetSummary() :
    84 G1RemSetSummary::G1RemSetSummary(bool should_update) :
    85   _rem_set(NULL),
       
    86   _total_mutator_refined_cards(0),
    85   _total_mutator_refined_cards(0),
    87   _total_concurrent_refined_cards(0),
    86   _total_concurrent_refined_cards(0),
    88   _num_coarsenings(0),
    87   _num_coarsenings(0),
    89   _num_vtimes(G1ConcurrentRefine::max_num_threads()),
    88   _num_vtimes(G1ConcurrentRefine::max_num_threads()),
    90   _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
    89   _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
    91   _sampling_thread_vtime(0.0f) {
    90   _sampling_thread_vtime(0.0f) {
    92 
    91 
    93   memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
    92   memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
    94 }
    93 
    95 
    94   if (should_update) {
    96 G1RemSetSummary::G1RemSetSummary(G1RemSet* rem_set) :
    95     update();
    97   _rem_set(rem_set),
    96   }
    98   _total_mutator_refined_cards(0),
       
    99   _total_concurrent_refined_cards(0),
       
   100   _num_coarsenings(0),
       
   101   _num_vtimes(G1ConcurrentRefine::max_num_threads()),
       
   102   _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
       
   103   _sampling_thread_vtime(0.0f) {
       
   104   update();
       
   105 }
    97 }
   106 
    98 
   107 G1RemSetSummary::~G1RemSetSummary() {
    99 G1RemSetSummary::~G1RemSetSummary() {
   108   FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);
   100   FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);
   109 }
   101 }