< prev index next >

src/hotspot/share/gc/shared/referenceProcessorPhaseTimes.cpp

Print this page
rev 57242 : imported patch 8235341-workerdataarray-cleanup


 160 RefProcPhaseTimeTracker::~RefProcPhaseTimeTracker() {
 161   double elapsed = elapsed_time();
 162   phase_times()->set_phase_time_ms(_phase_number, elapsed);
 163 }
 164 
 165 RefProcTotalPhaseTimesTracker::RefProcTotalPhaseTimesTracker(ReferenceProcessor::RefProcPhases phase_number,
 166                                                              ReferenceProcessorPhaseTimes* phase_times,
 167                                                              ReferenceProcessor* rp) :
 168   RefProcPhaseTimeBaseTracker(phase_enum_2_phase_string(phase_number), phase_number, phase_times), _rp(rp) {
 169 }
 170 
 171 RefProcTotalPhaseTimesTracker::~RefProcTotalPhaseTimesTracker() {
 172   double elapsed = elapsed_time();
 173   phase_times()->set_phase_time_ms(_phase_number, elapsed);
 174 }
 175 
 176 ReferenceProcessorPhaseTimes::ReferenceProcessorPhaseTimes(GCTimer* gc_timer, uint max_gc_threads) :
 177   _processing_is_mt(false), _gc_timer(gc_timer) {
 178 
 179   for (uint i = 0; i < ReferenceProcessor::RefSubPhaseMax; i++) {
 180     _sub_phases_worker_time_sec[i] = new WorkerDataArray<double>(max_gc_threads, SubPhasesParWorkTitle[i]);
 181   }
 182   _phase2_worker_time_sec = new WorkerDataArray<double>(max_gc_threads, Phase2ParWorkTitle);
 183 
 184   reset();
 185 }
 186 
 187 inline int ref_type_2_index(ReferenceType ref_type) {
 188   return ref_type - REF_SOFT;
 189 }
 190 
 191 WorkerDataArray<double>* ReferenceProcessorPhaseTimes::sub_phase_worker_time_sec(ReferenceProcessor::RefProcSubPhases sub_phase) const {
 192   ASSERT_SUB_PHASE(sub_phase);
 193   return _sub_phases_worker_time_sec[sub_phase];
 194 }
 195 
 196 double ReferenceProcessorPhaseTimes::phase_time_ms(ReferenceProcessor::RefProcPhases phase) const {
 197   ASSERT_PHASE(phase);
 198   return _phases_time_ms[phase];
 199 }
 200 
 201 void ReferenceProcessorPhaseTimes::set_phase_time_ms(ReferenceProcessor::RefProcPhases phase,
 202                                                      double phase_time_ms) {




 160 RefProcPhaseTimeTracker::~RefProcPhaseTimeTracker() {
 161   double elapsed = elapsed_time();
 162   phase_times()->set_phase_time_ms(_phase_number, elapsed);
 163 }
 164 
 165 RefProcTotalPhaseTimesTracker::RefProcTotalPhaseTimesTracker(ReferenceProcessor::RefProcPhases phase_number,
 166                                                              ReferenceProcessorPhaseTimes* phase_times,
 167                                                              ReferenceProcessor* rp) :
 168   RefProcPhaseTimeBaseTracker(phase_enum_2_phase_string(phase_number), phase_number, phase_times), _rp(rp) {
 169 }
 170 
 171 RefProcTotalPhaseTimesTracker::~RefProcTotalPhaseTimesTracker() {
 172   double elapsed = elapsed_time();
 173   phase_times()->set_phase_time_ms(_phase_number, elapsed);
 174 }
 175 
 176 ReferenceProcessorPhaseTimes::ReferenceProcessorPhaseTimes(GCTimer* gc_timer, uint max_gc_threads) :
 177   _processing_is_mt(false), _gc_timer(gc_timer) {
 178 
 179   for (uint i = 0; i < ReferenceProcessor::RefSubPhaseMax; i++) {
 180     _sub_phases_worker_time_sec[i] = new WorkerDataArray<double>(SubPhasesParWorkTitle[i], max_gc_threads);
 181   }
 182   _phase2_worker_time_sec = new WorkerDataArray<double>(Phase2ParWorkTitle, max_gc_threads);
 183 
 184   reset();
 185 }
 186 
 187 inline int ref_type_2_index(ReferenceType ref_type) {
 188   return ref_type - REF_SOFT;
 189 }
 190 
 191 WorkerDataArray<double>* ReferenceProcessorPhaseTimes::sub_phase_worker_time_sec(ReferenceProcessor::RefProcSubPhases sub_phase) const {
 192   ASSERT_SUB_PHASE(sub_phase);
 193   return _sub_phases_worker_time_sec[sub_phase];
 194 }
 195 
 196 double ReferenceProcessorPhaseTimes::phase_time_ms(ReferenceProcessor::RefProcPhases phase) const {
 197   ASSERT_PHASE(phase);
 198   return _phases_time_ms[phase];
 199 }
 200 
 201 void ReferenceProcessorPhaseTimes::set_phase_time_ms(ReferenceProcessor::RefProcPhases phase,
 202                                                      double phase_time_ms) {


< prev index next >