466 accounted_ms += print_pre_evacuate_collection_set();
467 accounted_ms += print_evacuate_collection_set();
468 accounted_ms += print_post_evacuate_collection_set();
469 print_other(accounted_ms);
470
471 if (_cur_verify_after_time_ms > 0.0) {
472 debug_time("Verify After", _cur_verify_after_time_ms);
473 }
474 }
475
476 G1EvacPhaseWithTrimTimeTracker::G1EvacPhaseWithTrimTimeTracker(G1ParScanThreadState* pss, Tickspan& total_time, Tickspan& trim_time) :
477 _pss(pss),
478 _start(Ticks::now()),
479 _total_time(total_time),
480 _trim_time(trim_time) {
481
482 assert(_pss->trim_ticks().value() == 0, "Possibly remaining trim ticks left over from previous use");
483 }
484
485 G1EvacPhaseWithTrimTimeTracker::~G1EvacPhaseWithTrimTimeTracker() {
486 _total_time += (Ticks::now() - _start) + _pss->trim_ticks();
487 _trim_time += _pss->trim_ticks();
488 _pss->reset_trim_ticks();
489 }
490
491 G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id) :
492 _phase_times(phase_times), _phase(phase), _worker_id(worker_id) {
493 if (_phase_times != NULL) {
494 _start_time = os::elapsedTime();
495 }
496 }
497
498 G1GCParPhaseTimesTracker::~G1GCParPhaseTimesTracker() {
499 if (_phase_times != NULL) {
500 _phase_times->record_time_secs(_phase, _worker_id, os::elapsedTime() - _start_time);
501 }
502 }
503
504 G1EvacPhaseTimesTracker::G1EvacPhaseTimesTracker(G1GCPhaseTimes* phase_times,
505 G1ParScanThreadState* pss,
506 G1GCPhaseTimes::GCParPhases phase,
507 uint worker_id) :
508 G1GCParPhaseTimesTracker(phase_times, phase, worker_id),
509 _total_time(),
510 _trim_time(),
511 _trim_tracker(pss, _total_time, _trim_time) {
512 }
513
514 G1EvacPhaseTimesTracker::~G1EvacPhaseTimesTracker() {
515 if (_phase_times != NULL) {
516 _start_time += TicksToTimeHelper::seconds(_trim_time);
517 _phase_times->record_or_add_objcopy_time_secs(_worker_id, TicksToTimeHelper::seconds(_trim_time));
518 }
519 }
520
|
466 accounted_ms += print_pre_evacuate_collection_set();
467 accounted_ms += print_evacuate_collection_set();
468 accounted_ms += print_post_evacuate_collection_set();
469 print_other(accounted_ms);
470
471 if (_cur_verify_after_time_ms > 0.0) {
472 debug_time("Verify After", _cur_verify_after_time_ms);
473 }
474 }
475
476 G1EvacPhaseWithTrimTimeTracker::G1EvacPhaseWithTrimTimeTracker(G1ParScanThreadState* pss, Tickspan& total_time, Tickspan& trim_time) :
477 _pss(pss),
478 _start(Ticks::now()),
479 _total_time(total_time),
480 _trim_time(trim_time) {
481
482 assert(_pss->trim_ticks().value() == 0, "Possibly remaining trim ticks left over from previous use");
483 }
484
485 G1EvacPhaseWithTrimTimeTracker::~G1EvacPhaseWithTrimTimeTracker() {
486 _total_time += (Ticks::now() - _start) - _pss->trim_ticks();
487 _trim_time += _pss->trim_ticks();
488 _pss->reset_trim_ticks();
489 }
490
491 G1GCParPhaseTimesTracker::G1GCParPhaseTimesTracker(G1GCPhaseTimes* phase_times, G1GCPhaseTimes::GCParPhases phase, uint worker_id) :
492 _phase_times(phase_times), _phase(phase), _worker_id(worker_id) {
493 if (_phase_times != NULL) {
494 _start_time = Ticks::now();
495 }
496 }
497
498 G1GCParPhaseTimesTracker::~G1GCParPhaseTimesTracker() {
499 if (_phase_times != NULL) {
500 _phase_times->record_time_secs(_phase, _worker_id, TicksToTimeHelper::seconds(Ticks::now() - _start_time));
501 }
502 }
503
504 G1EvacPhaseTimesTracker::G1EvacPhaseTimesTracker(G1GCPhaseTimes* phase_times,
505 G1ParScanThreadState* pss,
506 G1GCPhaseTimes::GCParPhases phase,
507 uint worker_id) :
508 G1GCParPhaseTimesTracker(phase_times, phase, worker_id),
509 _total_time(),
510 _trim_time(),
511 _trim_tracker(pss, _total_time, _trim_time) {
512 }
513
514 G1EvacPhaseTimesTracker::~G1EvacPhaseTimesTracker() {
515 if (_phase_times != NULL) {
516 // Exclude trim time by increasing the start time.
517 _start_time += _trim_time;
518 _phase_times->record_or_add_objcopy_time_secs(_worker_id, TicksToTimeHelper::seconds(_trim_time));
519 }
520 }
521
|