69 }
70
71 void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) {
72 assert(_rs_threads_vtimes != NULL, "just checking");
73 assert(thread < _num_vtimes, "just checking");
74 _rs_threads_vtimes[thread] = value;
75 }
76
77 double G1RemSetSummary::rs_thread_vtime(uint thread) const {
78 assert(_rs_threads_vtimes != NULL, "just checking");
79 assert(thread < _num_vtimes, "just checking");
80 return _rs_threads_vtimes[thread];
81 }
82
83 G1RemSetSummary::G1RemSetSummary() :
84 _rem_set(NULL),
85 _num_conc_refined_cards(0),
86 _num_processed_buf_mutator(0),
87 _num_processed_buf_rs_threads(0),
88 _num_coarsenings(0),
89 _num_vtimes(G1ConcurrentRefine::thread_num()),
90 _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
91 _sampling_thread_vtime(0.0f) {
92
93 memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
94 }
95
96 G1RemSetSummary::G1RemSetSummary(G1RemSet* rem_set) :
97 _rem_set(rem_set),
98 _num_conc_refined_cards(0),
99 _num_processed_buf_mutator(0),
100 _num_processed_buf_rs_threads(0),
101 _num_coarsenings(0),
102 _num_vtimes(G1ConcurrentRefine::thread_num()),
103 _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
104 _sampling_thread_vtime(0.0f) {
105 update();
106 }
107
108 G1RemSetSummary::~G1RemSetSummary() {
109 if (_rs_threads_vtimes) {
110 FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);
111 }
112 }
113
114 void G1RemSetSummary::set(G1RemSetSummary* other) {
115 assert(other != NULL, "just checking");
116 assert(_num_vtimes == other->_num_vtimes, "just checking");
117
118 _num_conc_refined_cards = other->num_conc_refined_cards();
119
120 _num_processed_buf_mutator = other->num_processed_buf_mutator();
121 _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads();
122
|
69 }
70
71 void G1RemSetSummary::set_rs_thread_vtime(uint thread, double value) {
72 assert(_rs_threads_vtimes != NULL, "just checking");
73 assert(thread < _num_vtimes, "just checking");
74 _rs_threads_vtimes[thread] = value;
75 }
76
77 double G1RemSetSummary::rs_thread_vtime(uint thread) const {
78 assert(_rs_threads_vtimes != NULL, "just checking");
79 assert(thread < _num_vtimes, "just checking");
80 return _rs_threads_vtimes[thread];
81 }
82
83 G1RemSetSummary::G1RemSetSummary() :
84 _rem_set(NULL),
85 _num_conc_refined_cards(0),
86 _num_processed_buf_mutator(0),
87 _num_processed_buf_rs_threads(0),
88 _num_coarsenings(0),
89 _num_vtimes(G1ConcurrentRefine::max_num_threads()),
90 _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
91 _sampling_thread_vtime(0.0f) {
92
93 memset(_rs_threads_vtimes, 0, sizeof(double) * _num_vtimes);
94 }
95
96 G1RemSetSummary::G1RemSetSummary(G1RemSet* rem_set) :
97 _rem_set(rem_set),
98 _num_conc_refined_cards(0),
99 _num_processed_buf_mutator(0),
100 _num_processed_buf_rs_threads(0),
101 _num_coarsenings(0),
102 _num_vtimes(G1ConcurrentRefine::max_num_threads()),
103 _rs_threads_vtimes(NEW_C_HEAP_ARRAY(double, _num_vtimes, mtGC)),
104 _sampling_thread_vtime(0.0f) {
105 update();
106 }
107
108 G1RemSetSummary::~G1RemSetSummary() {
109 if (_rs_threads_vtimes) {
110 FREE_C_HEAP_ARRAY(double, _rs_threads_vtimes);
111 }
112 }
113
114 void G1RemSetSummary::set(G1RemSetSummary* other) {
115 assert(other != NULL, "just checking");
116 assert(_num_vtimes == other->_num_vtimes, "just checking");
117
118 _num_conc_refined_cards = other->num_conc_refined_cards();
119
120 _num_processed_buf_mutator = other->num_processed_buf_mutator();
121 _num_processed_buf_rs_threads = other->num_processed_buf_rs_threads();
122
|