581 } |
581 } |
582 |
582 |
583 G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id) : |
583 G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id) : |
584 _phase_times(phase_times), _phase(phase), _worker_id(worker_id) { |
584 _phase_times(phase_times), _phase(phase), _worker_id(worker_id) { |
585 if (_phase_times != NULL) { |
585 if (_phase_times != NULL) { |
586 _start_time = os::elapsedTime(); |
586 _start_time = Ticks::now(); |
587 } |
587 } |
588 } |
588 } |
589 |
589 |
590 G1GCParPhaseTimesTracker::~G1GCParPhaseTimesTracker() { |
590 G1GCParPhaseTimesTracker::~G1GCParPhaseTimesTracker() { |
591 if (_phase_times != NULL) { |
591 if (_phase_times != NULL) { |
592 _phase_times->record_time_secs(_phase, _worker_id, os::elapsedTime() - _start_time); |
592 _phase_times->record_time_secs(_phase, _worker_id, (Ticks::now() - _start_time).seconds()); |
593 } |
593 } |
594 } |
594 } |
595 |
|