hotspot/src/share/vm/gc_implementation/g1/g1RemSetSummary.cpp
changeset 20310 903b398490d9
parent 20305 af013cf4a5e6
child 21117 89fa6b136f85
equal deleted inserted replaced
20309:7445302daff6 20310:903b398490d9
    75   assert(_rs_threads_vtimes != NULL, "just checking");
    75   assert(_rs_threads_vtimes != NULL, "just checking");
    76   assert(thread < _num_vtimes, "just checking");
    76   assert(thread < _num_vtimes, "just checking");
    77   return _rs_threads_vtimes[thread];
    77   return _rs_threads_vtimes[thread];
    78 }
    78 }
    79 
    79 
    80 void G1RemSetSummary::initialize(G1RemSet* remset, uint num_workers) {
    80 void G1RemSetSummary::initialize(G1RemSet* remset) {
    81   assert(_rs_threads_vtimes == NULL, "just checking");
    81   assert(_rs_threads_vtimes == NULL, "just checking");
    82   assert(remset != NULL, "just checking");
    82   assert(remset != NULL, "just checking");
    83 
    83 
    84   _remset = remset;
    84   _remset = remset;
    85   _num_vtimes = num_workers;
    85   _num_vtimes = ConcurrentG1Refine::thread_num();
    86   _rs_threads_vtimes = NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC);
    86   _rs_threads_vtimes = NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC);
    87   memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
    87   memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
    88 
    88 
    89   update();
    89   update();
    90 }
    90 }