365 _scan_state->add_dirty_region(card_region->hrm_index());
366
367 // If the card is dirty, then we will scan it during updateRS.
368 if (!card_region->in_collection_set() &&
369 !_ct_bs->is_card_dirty(card_index)) {
370 scan_card(card_index, card_region);
371 }
372 }
373 if (_scan_state->set_iter_complete(region_idx)) {
374 // Scan the strong code root list attached to the current region
375 scan_strong_code_roots(r);
376 }
377 return false;
378 }
379
380 size_t G1RemSet::scan_rem_set(G1ParPushHeapRSClosure* oops_in_heap_closure,
381 CodeBlobClosure* heap_region_codeblobs,
382 uint worker_i) {
383 double rs_time_start = os::elapsedTime();
384
385 HeapRegion *startRegion = _g1->start_cset_region_for_worker(worker_i);
386
387 G1ScanRSClosure cl(_scan_state, oops_in_heap_closure, heap_region_codeblobs, worker_i);
388 _g1->collection_set_iterate_from(startRegion, &cl);
389
390 double scan_rs_time_sec = (os::elapsedTime() - rs_time_start) -
391 cl.strong_code_root_scan_time_sec();
392
393 _g1p->phase_times()->record_time_secs(G1GCPhaseTimes::ScanRS, worker_i, scan_rs_time_sec);
394 _g1p->phase_times()->record_time_secs(G1GCPhaseTimes::CodeRoots, worker_i, cl.strong_code_root_scan_time_sec());
395
396 return cl.cards_done();
397 }
398
399 // Closure used for updating RSets and recording references that
400 // point into the collection set. Only called during an
401 // evacuation pause.
402
403 class RefineRecordRefsIntoCSCardTableEntryClosure: public CardTableEntryClosure {
404 G1RemSet* _g1rs;
405 DirtyCardQueue* _into_cset_dcq;
406 G1ParPushHeapRSClosure* _cl;
407 public:
408 RefineRecordRefsIntoCSCardTableEntryClosure(G1CollectedHeap* g1h,
|
365 _scan_state->add_dirty_region(card_region->hrm_index());
366
367 // If the card is dirty, then we will scan it during updateRS.
368 if (!card_region->in_collection_set() &&
369 !_ct_bs->is_card_dirty(card_index)) {
370 scan_card(card_index, card_region);
371 }
372 }
373 if (_scan_state->set_iter_complete(region_idx)) {
374 // Scan the strong code root list attached to the current region
375 scan_strong_code_roots(r);
376 }
377 return false;
378 }
379
380 size_t G1RemSet::scan_rem_set(G1ParPushHeapRSClosure* oops_in_heap_closure,
381 CodeBlobClosure* heap_region_codeblobs,
382 uint worker_i) {
383 double rs_time_start = os::elapsedTime();
384
385 G1ScanRSClosure cl(_scan_state, oops_in_heap_closure, heap_region_codeblobs, worker_i);
386 _g1->collection_set_iterate_from(&cl, worker_i);
387
388 double scan_rs_time_sec = (os::elapsedTime() - rs_time_start) -
389 cl.strong_code_root_scan_time_sec();
390
391 _g1p->phase_times()->record_time_secs(G1GCPhaseTimes::ScanRS, worker_i, scan_rs_time_sec);
392 _g1p->phase_times()->record_time_secs(G1GCPhaseTimes::CodeRoots, worker_i, cl.strong_code_root_scan_time_sec());
393
394 return cl.cards_done();
395 }
396
397 // Closure used for updating RSets and recording references that
398 // point into the collection set. Only called during an
399 // evacuation pause.
400
401 class RefineRecordRefsIntoCSCardTableEntryClosure: public CardTableEntryClosure {
402 G1RemSet* _g1rs;
403 DirtyCardQueue* _into_cset_dcq;
404 G1ParPushHeapRSClosure* _cl;
405 public:
406 RefineRecordRefsIntoCSCardTableEntryClosure(G1CollectedHeap* g1h,
|