62
63 static IntHistogram card_repeat_count(10, 10);
64
65 void ct_freq_update_histo_and_reset() {
66 for (size_t j = 0; j < ct_freq_sz; j++) {
67 card_repeat_count.add_entry(ct_freq[j]);
68 ct_freq[j] = 0;
69 }
70
71 }
72 #endif
73
74 G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs)
75 : _g1(g1), _conc_refine_cards(0),
76 _ct_bs(ct_bs), _g1p(_g1->g1_policy()),
77 _cg1r(g1->concurrent_g1_refine()),
78 _cset_rs_update_cl(NULL),
79 _cards_scanned(NULL), _total_cards_scanned(0),
80 _prev_period_summary()
81 {
82 _seq_task = new SubTasksDone(NumSeqTasks);
83 _cset_rs_update_cl = NEW_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, n_workers(), mtGC);
84 for (uint i = 0; i < n_workers(); i++) {
85 _cset_rs_update_cl[i] = NULL;
86 }
87 if (G1SummarizeRSetStats) {
88 _prev_period_summary.initialize(this);
89 }
90 }
91
92 G1RemSet::~G1RemSet() {
93 delete _seq_task;
94 for (uint i = 0; i < n_workers(); i++) {
95 assert(_cset_rs_update_cl[i] == NULL, "it should be");
96 }
97 FREE_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, _cset_rs_update_cl);
98 }
99
100 class ScanRSClosure : public HeapRegionClosure {
101 size_t _cards_done, _cards;
102 G1CollectedHeap* _g1h;
103
104 G1ParPushHeapRSClosure* _oc;
105 CodeBlobClosure* _code_root_cl;
106
107 G1BlockOffsetSharedArray* _bot_shared;
108 G1SATBCardTableModRefBS *_ct_bs;
109
110 double _strong_code_root_scan_time_sec;
111 uint _worker_i;
112 int _block_size;
113 bool _try_claimed;
|
62
63 static IntHistogram card_repeat_count(10, 10);
64
65 void ct_freq_update_histo_and_reset() {
66 for (size_t j = 0; j < ct_freq_sz; j++) {
67 card_repeat_count.add_entry(ct_freq[j]);
68 ct_freq[j] = 0;
69 }
70
71 }
72 #endif
73
74 G1RemSet::G1RemSet(G1CollectedHeap* g1, CardTableModRefBS* ct_bs)
75 : _g1(g1), _conc_refine_cards(0),
76 _ct_bs(ct_bs), _g1p(_g1->g1_policy()),
77 _cg1r(g1->concurrent_g1_refine()),
78 _cset_rs_update_cl(NULL),
79 _cards_scanned(NULL), _total_cards_scanned(0),
80 _prev_period_summary()
81 {
82 _cset_rs_update_cl = NEW_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, n_workers(), mtGC);
83 for (uint i = 0; i < n_workers(); i++) {
84 _cset_rs_update_cl[i] = NULL;
85 }
86 if (G1SummarizeRSetStats) {
87 _prev_period_summary.initialize(this);
88 }
89 }
90
91 G1RemSet::~G1RemSet() {
92 for (uint i = 0; i < n_workers(); i++) {
93 assert(_cset_rs_update_cl[i] == NULL, "it should be");
94 }
95 FREE_C_HEAP_ARRAY(G1ParPushHeapRSClosure*, _cset_rs_update_cl);
96 }
97
98 class ScanRSClosure : public HeapRegionClosure {
99 size_t _cards_done, _cards;
100 G1CollectedHeap* _g1h;
101
102 G1ParPushHeapRSClosure* _oc;
103 CodeBlobClosure* _code_root_cl;
104
105 G1BlockOffsetSharedArray* _bot_shared;
106 G1SATBCardTableModRefBS *_ct_bs;
107
108 double _strong_code_root_scan_time_sec;
109 uint _worker_i;
110 int _block_size;
111 bool _try_claimed;
|