Mercurial > hg > graal-compiler
diff src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 355:0edda524b58c
6722565: G1: assert !r->is_on_unclean_list() fires
Summary: Under certain circumstances, two cleanup threads can claim and process the same region.
Reviewed-by: apetrusenko, ysr
author | tonyp |
---|---|
date | Wed, 06 Aug 2008 11:57:31 -0400 |
parents | 37f87013dfd8 |
children | ad8c8ca4ab0f |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Wed Jul 30 10:45:52 2008 -0700 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Wed Aug 06 11:57:31 2008 -0400 @@ -2897,7 +2897,8 @@ void work(int i) { ParKnownGarbageHRClosure parKnownGarbageCl(_hrSorted, _chunk_size, i); // Back to zero for the claim value. - _g1->heap_region_par_iterate_chunked(&parKnownGarbageCl, i, 0); + _g1->heap_region_par_iterate_chunked(&parKnownGarbageCl, i, + HeapRegion::InitialClaimValue); jint regions_added = parKnownGarbageCl.marked_regions_added(); _hrSorted->incNumMarkedHeapRegions(regions_added); if (G1PrintParCleanupStats) { @@ -2933,6 +2934,9 @@ ParKnownGarbageTask parKnownGarbageTask(_collectionSetChooser, (int) ChunkSize); _g1->workers()->run_task(&parKnownGarbageTask); + + assert(_g1->check_heap_region_claim_values(HeapRegion::InitialClaimValue), + "sanity check"); } else { KnownGarbageClosure knownGarbagecl(_collectionSetChooser); _g1->heap_region_iterate(&knownGarbagecl);