813 G1GCPhaseTimes::GCParPhases _code_roots_phase;
814
815 uint _worker_id;
816
817 size_t _opt_refs_scanned;
818 size_t _opt_refs_memory_used;
819
820 Tickspan _strong_code_root_scan_time;
821 Tickspan _strong_code_trim_partially_time;
822
823 Tickspan _rem_set_opt_root_scan_time;
824 Tickspan _rem_set_opt_trim_partially_time;
825
826 void scan_opt_rem_set_roots(HeapRegion* r) {
827 EventGCPhaseParallel event;
828
829 G1OopStarChunkedList* opt_rem_set_list = _pss->oops_into_optional_region(r);
830
831 G1ScanCardClosure scan_cl(G1CollectedHeap::heap(), _pss);
832 G1ScanRSForOptionalClosure cl(G1CollectedHeap::heap(), &scan_cl);
833 _opt_refs_scanned += opt_rem_set_list->oops_do(&cl, _pss->closures()->raw_strong_oops());
834 _opt_refs_memory_used += opt_rem_set_list->used_memory();
835
836 event.commit(GCId::current(), _worker_id, G1GCPhaseTimes::phase_name(_scan_phase));
837 }
838
839 public:
840 G1ScanCollectionSetRegionClosure(G1RemSetScanState* scan_state,
841 G1ParScanThreadState* pss,
842 uint worker_i,
843 G1GCPhaseTimes::GCParPhases scan_phase,
844 G1GCPhaseTimes::GCParPhases code_roots_phase) :
845 _pss(pss),
846 _scan_state(scan_state),
847 _scan_phase(scan_phase),
848 _code_roots_phase(code_roots_phase),
849 _worker_id(worker_i),
850 _opt_refs_scanned(0),
851 _opt_refs_memory_used(0),
852 _strong_code_root_scan_time(),
853 _strong_code_trim_partially_time(),
|
813 G1GCPhaseTimes::GCParPhases _code_roots_phase;
814
815 uint _worker_id;
816
817 size_t _opt_refs_scanned;
818 size_t _opt_refs_memory_used;
819
820 Tickspan _strong_code_root_scan_time;
821 Tickspan _strong_code_trim_partially_time;
822
823 Tickspan _rem_set_opt_root_scan_time;
824 Tickspan _rem_set_opt_trim_partially_time;
825
826 void scan_opt_rem_set_roots(HeapRegion* r) {
827 EventGCPhaseParallel event;
828
829 G1OopStarChunkedList* opt_rem_set_list = _pss->oops_into_optional_region(r);
830
831 G1ScanCardClosure scan_cl(G1CollectedHeap::heap(), _pss);
832 G1ScanRSForOptionalClosure cl(G1CollectedHeap::heap(), &scan_cl);
833 _opt_refs_scanned += opt_rem_set_list->oops_do(&cl, _pss->closures()->strong_oops());
834 _opt_refs_memory_used += opt_rem_set_list->used_memory();
835
836 event.commit(GCId::current(), _worker_id, G1GCPhaseTimes::phase_name(_scan_phase));
837 }
838
839 public:
840 G1ScanCollectionSetRegionClosure(G1RemSetScanState* scan_state,
841 G1ParScanThreadState* pss,
842 uint worker_i,
843 G1GCPhaseTimes::GCParPhases scan_phase,
844 G1GCPhaseTimes::GCParPhases code_roots_phase) :
845 _pss(pss),
846 _scan_state(scan_state),
847 _scan_phase(scan_phase),
848 _code_roots_phase(code_roots_phase),
849 _worker_id(worker_i),
850 _opt_refs_scanned(0),
851 _opt_refs_memory_used(0),
852 _strong_code_root_scan_time(),
853 _strong_code_trim_partially_time(),
|