src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp

changeset 9858
b985cbb00e68
parent 9478
f3108e56b502
child 9931
fd44df5e3bc3
equal deleted inserted replaced
9727:c7a3e57fdf4a 9858:b985cbb00e68
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

mercurial