comparison src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 4728:441e946dc1af

7121618: Change type of number of GC workers to unsigned int. Summary: Change variables representing the number of GC workers to uint from int and size_t. Change the parameter in work(int i) to work(uint worker_id). Reviewed-by: brutisso, tonyp
author jmasa
date Wed, 14 Dec 2011 13:34:57 -0800
parents 67fdcb391461
children 1cbe7978b021
comparison
equal deleted inserted replaced
4727:67fdcb391461 4728:441e946dc1af
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