1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMark.cpp Wed Jul 30 10:45:52 2008 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMark.cpp Wed Aug 06 11:57:31 2008 -0400 1.3 @@ -1423,7 +1423,8 @@ 1.4 NULL /* CO tracker */); 1.5 calccl.no_yield(); 1.6 if (ParallelGCThreads > 0) { 1.7 - _g1h->heap_region_par_iterate_chunked(&calccl, i, 1); 1.8 + _g1h->heap_region_par_iterate_chunked(&calccl, i, 1.9 + HeapRegion::FinalCountClaimValue); 1.10 } else { 1.11 _g1h->heap_region_iterate(&calccl); 1.12 } 1.13 @@ -1502,7 +1503,8 @@ 1.14 &_par_cleanup_thread_state[i]->list, 1.15 i); 1.16 if (ParallelGCThreads > 0) { 1.17 - _g1h->heap_region_par_iterate_chunked(&g1_note_end, i, 2); 1.18 + _g1h->heap_region_par_iterate_chunked(&g1_note_end, i, 1.19 + HeapRegion::NoteEndClaimValue); 1.20 } else { 1.21 _g1h->heap_region_iterate(&g1_note_end); 1.22 } 1.23 @@ -1545,7 +1547,8 @@ 1.24 1.25 void work(int i) { 1.26 if (ParallelGCThreads > 0) { 1.27 - _g1rs->scrub_par(_region_bm, _card_bm, i, 3); 1.28 + _g1rs->scrub_par(_region_bm, _card_bm, i, 1.29 + HeapRegion::ScrubRemSetClaimValue); 1.30 } else { 1.31 _g1rs->scrub(_region_bm, _card_bm); 1.32 } 1.33 @@ -1610,10 +1613,18 @@ 1.34 G1ParFinalCountTask g1_par_count_task(g1h, nextMarkBitMap(), 1.35 &_region_bm, &_card_bm); 1.36 if (ParallelGCThreads > 0) { 1.37 + assert(g1h->check_heap_region_claim_values( 1.38 + HeapRegion::InitialClaimValue), 1.39 + "sanity check"); 1.40 + 1.41 int n_workers = g1h->workers()->total_workers(); 1.42 g1h->set_par_threads(n_workers); 1.43 g1h->workers()->run_task(&g1_par_count_task); 1.44 g1h->set_par_threads(0); 1.45 + 1.46 + assert(g1h->check_heap_region_claim_values( 1.47 + HeapRegion::FinalCountClaimValue), 1.48 + "sanity check"); 1.49 } else { 1.50 g1_par_count_task.work(0); 1.51 } 1.52 @@ -1654,6 +1665,9 @@ 1.53 g1h->set_par_threads(n_workers); 1.54 g1h->workers()->run_task(&g1_par_note_end_task); 1.55 g1h->set_par_threads(0); 1.56 + 1.57 + assert(g1h->check_heap_region_claim_values(HeapRegion::NoteEndClaimValue), 1.58 + "sanity check"); 1.59 } else { 1.60 g1_par_note_end_task.work(0); 1.61 } 1.62 @@ -1665,7 +1679,7 @@ 1.63 (note_end_end - note_end_start)*1000.0); 1.64 } 1.65 1.66 - // Now we "scrub" remembered sets. Note that we must do this before the 1.67 + 1.68 // call below, since it affects the metric by which we sort the heap 1.69 // regions. 1.70 if (G1ScrubRemSets) { 1.71 @@ -1676,6 +1690,10 @@ 1.72 g1h->set_par_threads(n_workers); 1.73 g1h->workers()->run_task(&g1_par_scrub_rs_task); 1.74 g1h->set_par_threads(0); 1.75 + 1.76 + assert(g1h->check_heap_region_claim_values( 1.77 + HeapRegion::ScrubRemSetClaimValue), 1.78 + "sanity check"); 1.79 } else { 1.80 g1_par_scrub_rs_task.work(0); 1.81 }