equal
deleted
inserted
replaced
232 void G1RemSet::scanRS(OopsInHeapRegionClosure* oc, int worker_i) { |
232 void G1RemSet::scanRS(OopsInHeapRegionClosure* oc, int worker_i) { |
233 double rs_time_start = os::elapsedTime(); |
233 double rs_time_start = os::elapsedTime(); |
234 HeapRegion *startRegion = calculateStartRegion(worker_i); |
234 HeapRegion *startRegion = calculateStartRegion(worker_i); |
235 |
235 |
236 ScanRSClosure scanRScl(oc, worker_i); |
236 ScanRSClosure scanRScl(oc, worker_i); |
|
237 |
237 _g1->collection_set_iterate_from(startRegion, &scanRScl); |
238 _g1->collection_set_iterate_from(startRegion, &scanRScl); |
238 scanRScl.set_try_claimed(); |
239 scanRScl.set_try_claimed(); |
239 _g1->collection_set_iterate_from(startRegion, &scanRScl); |
240 _g1->collection_set_iterate_from(startRegion, &scanRScl); |
240 |
241 |
241 double scan_rs_time_sec = os::elapsedTime() - rs_time_start; |
242 double scan_rs_time_sec = os::elapsedTime() - rs_time_start; |
281 |
282 |
282 void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, int worker_i) { |
283 void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, int worker_i) { |
283 double start = os::elapsedTime(); |
284 double start = os::elapsedTime(); |
284 // Apply the given closure to all remaining log entries. |
285 // Apply the given closure to all remaining log entries. |
285 RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq); |
286 RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq); |
|
287 |
286 _g1->iterate_dirty_card_closure(&into_cset_update_rs_cl, into_cset_dcq, false, worker_i); |
288 _g1->iterate_dirty_card_closure(&into_cset_update_rs_cl, into_cset_dcq, false, worker_i); |
287 |
289 |
288 // Now there should be no dirty cards. |
290 // Now there should be no dirty cards. |
289 if (G1RSLogCheckCardTable) { |
291 if (G1RSLogCheckCardTable) { |
290 CountNonCleanMemRegionClosure cl(_g1); |
292 CountNonCleanMemRegionClosure cl(_g1); |
464 // Scan oops in the card looking for references into the collection set |
466 // Scan oops in the card looking for references into the collection set |
465 HeapWord* end = _ct_bs->addr_for(card_ptr + 1); |
467 HeapWord* end = _ct_bs->addr_for(card_ptr + 1); |
466 MemRegion scanRegion(start, end); |
468 MemRegion scanRegion(start, end); |
467 |
469 |
468 UpdateRSetImmediate update_rs_cl(_g1->g1_rem_set()); |
470 UpdateRSetImmediate update_rs_cl(_g1->g1_rem_set()); |
469 FilterIntoCSClosure update_rs_cset_oop_cl(NULL, _g1, &update_rs_cl); |
471 FilterIntoCSClosure update_rs_cset_oop_cl(NULL, _g1, &update_rs_cl, NULL /* rp */); |
470 FilterOutOfRegionClosure filter_then_update_rs_cset_oop_cl(r, &update_rs_cset_oop_cl); |
472 FilterOutOfRegionClosure filter_then_update_rs_cset_oop_cl(r, &update_rs_cset_oop_cl); |
471 |
473 |
472 // We can pass false as the "filter_young" parameter here as: |
474 // We can pass false as the "filter_young" parameter here as: |
473 // * we should be in a STW pause, |
475 // * we should be in a STW pause, |
474 // * the DCQS to which this closure is applied is used to hold |
476 // * the DCQS to which this closure is applied is used to hold |
640 check_for_refs_into_cset, |
642 check_for_refs_into_cset, |
641 worker_i); |
643 worker_i); |
642 update_rs_oop_cl.set_from(r); |
644 update_rs_oop_cl.set_from(r); |
643 |
645 |
644 TriggerClosure trigger_cl; |
646 TriggerClosure trigger_cl; |
645 FilterIntoCSClosure into_cs_cl(NULL, _g1, &trigger_cl); |
647 FilterIntoCSClosure into_cs_cl(NULL, _g1, &trigger_cl, NULL /* rp */); |
646 InvokeIfNotTriggeredClosure invoke_cl(&trigger_cl, &into_cs_cl); |
648 InvokeIfNotTriggeredClosure invoke_cl(&trigger_cl, &into_cs_cl); |
647 Mux2Closure mux(&invoke_cl, &update_rs_oop_cl); |
649 Mux2Closure mux(&invoke_cl, &update_rs_oop_cl); |
648 |
650 |
649 FilterOutOfRegionClosure filter_then_update_rs_oop_cl(r, |
651 FilterOutOfRegionClosure filter_then_update_rs_oop_cl(r, |
650 (check_for_refs_into_cset ? |
652 (check_for_refs_into_cset ? |