229 ReferenceProcessorPhaseTimes::~ReferenceProcessorPhaseTimes() {
230 for (int i = 0; i < ReferenceProcessor::RefSubPhaseMax; i++) {
231 delete _sub_phases_worker_time_sec[i];
232 }
233 delete _phase2_worker_time_sec;
234 }
235
236 double ReferenceProcessorPhaseTimes::sub_phase_total_time_ms(ReferenceProcessor::RefProcSubPhases sub_phase) const {
237 ASSERT_SUB_PHASE(sub_phase);
238 return _sub_phases_total_time_ms[sub_phase];
239 }
240
241 void ReferenceProcessorPhaseTimes::set_sub_phase_total_phase_time_ms(ReferenceProcessor::RefProcSubPhases sub_phase,
242 double time_ms) {
243 ASSERT_SUB_PHASE(sub_phase);
244 _sub_phases_total_time_ms[sub_phase] = time_ms;
245 }
246
247 void ReferenceProcessorPhaseTimes::add_ref_cleared(ReferenceType ref_type, size_t count) {
248 ASSERT_REF_TYPE(ref_type);
249 Atomic::add(count, &_ref_cleared[ref_type_2_index(ref_type)]);
250 }
251
252 void ReferenceProcessorPhaseTimes::set_ref_discovered(ReferenceType ref_type, size_t count) {
253 ASSERT_REF_TYPE(ref_type);
254 _ref_discovered[ref_type_2_index(ref_type)] = count;
255 }
256
257 double ReferenceProcessorPhaseTimes::balance_queues_time_ms(ReferenceProcessor::RefProcPhases phase) const {
258 ASSERT_PHASE(phase);
259 return _balance_queues_time_ms[phase];
260 }
261
262 void ReferenceProcessorPhaseTimes::set_balance_queues_time_ms(ReferenceProcessor::RefProcPhases phase, double time_ms) {
263 ASSERT_PHASE(phase);
264 _balance_queues_time_ms[phase] = time_ms;
265 }
266
267 #define TIME_FORMAT "%.1lfms"
268
269 void ReferenceProcessorPhaseTimes::print_all_references(uint base_indent, bool print_total) const {
|
229 ReferenceProcessorPhaseTimes::~ReferenceProcessorPhaseTimes() {
230 for (int i = 0; i < ReferenceProcessor::RefSubPhaseMax; i++) {
231 delete _sub_phases_worker_time_sec[i];
232 }
233 delete _phase2_worker_time_sec;
234 }
235
236 double ReferenceProcessorPhaseTimes::sub_phase_total_time_ms(ReferenceProcessor::RefProcSubPhases sub_phase) const {
237 ASSERT_SUB_PHASE(sub_phase);
238 return _sub_phases_total_time_ms[sub_phase];
239 }
240
241 void ReferenceProcessorPhaseTimes::set_sub_phase_total_phase_time_ms(ReferenceProcessor::RefProcSubPhases sub_phase,
242 double time_ms) {
243 ASSERT_SUB_PHASE(sub_phase);
244 _sub_phases_total_time_ms[sub_phase] = time_ms;
245 }
246
247 void ReferenceProcessorPhaseTimes::add_ref_cleared(ReferenceType ref_type, size_t count) {
248 ASSERT_REF_TYPE(ref_type);
249 Atomic::add(&_ref_cleared[ref_type_2_index(ref_type)], count);
250 }
251
252 void ReferenceProcessorPhaseTimes::set_ref_discovered(ReferenceType ref_type, size_t count) {
253 ASSERT_REF_TYPE(ref_type);
254 _ref_discovered[ref_type_2_index(ref_type)] = count;
255 }
256
257 double ReferenceProcessorPhaseTimes::balance_queues_time_ms(ReferenceProcessor::RefProcPhases phase) const {
258 ASSERT_PHASE(phase);
259 return _balance_queues_time_ms[phase];
260 }
261
262 void ReferenceProcessorPhaseTimes::set_balance_queues_time_ms(ReferenceProcessor::RefProcPhases phase, double time_ms) {
263 ASSERT_PHASE(phase);
264 _balance_queues_time_ms[phase] = time_ms;
265 }
266
267 #define TIME_FORMAT "%.1lfms"
268
269 void ReferenceProcessorPhaseTimes::print_all_references(uint base_indent, bool print_total) const {
|