hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
changeset 11396 917d8673b5ef
parent 11395 33260c27554b
child 11397 7dc5c8f572b0
equal deleted inserted replaced
11395:33260c27554b 11396:917d8673b5ef
  2330     AbstractGangTask("ParKnownGarbageTask"),
  2330     AbstractGangTask("ParKnownGarbageTask"),
  2331     _hrSorted(hrSorted), _chunk_size(chunk_size),
  2331     _hrSorted(hrSorted), _chunk_size(chunk_size),
  2332     _g1(G1CollectedHeap::heap())
  2332     _g1(G1CollectedHeap::heap())
  2333   {}
  2333   {}
  2334 
  2334 
  2335   void work(int i) {
  2335   void work(uint worker_id) {
  2336     ParKnownGarbageHRClosure parKnownGarbageCl(_hrSorted, _chunk_size, i);
  2336     ParKnownGarbageHRClosure parKnownGarbageCl(_hrSorted,
       
  2337                                                _chunk_size,
       
  2338                                                worker_id);
  2337     // Back to zero for the claim value.
  2339     // Back to zero for the claim value.
  2338     _g1->heap_region_par_iterate_chunked(&parKnownGarbageCl, i,
  2340     _g1->heap_region_par_iterate_chunked(&parKnownGarbageCl, worker_id,
  2339                                          _g1->workers()->active_workers(),
  2341                                          _g1->workers()->active_workers(),
  2340                                          HeapRegion::InitialClaimValue);
  2342                                          HeapRegion::InitialClaimValue);
  2341     jint regions_added = parKnownGarbageCl.marked_regions_added();
  2343     jint regions_added = parKnownGarbageCl.marked_regions_added();
  2342     _hrSorted->incNumMarkedHeapRegions(regions_added);
  2344     _hrSorted->incNumMarkedHeapRegions(regions_added);
  2343     if (G1PrintParCleanupStats) {
  2345     if (G1PrintParCleanupStats) {
  2344       gclog_or_tty->print_cr("     Thread %d called %d times, added %d regions to list.",
  2346       gclog_or_tty->print_cr("     Thread %d called %d times, added %d regions to list.",
  2345                  i, parKnownGarbageCl.invokes(), regions_added);
  2347                  worker_id, parKnownGarbageCl.invokes(), regions_added);
  2346     }
  2348     }
  2347   }
  2349   }
  2348 };
  2350 };
  2349 
  2351 
  2350 void
  2352 void