--- old/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-03-02 17:11:33.219356489 +0100 +++ new/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp 2015-03-02 17:11:33.119356493 +0100 @@ -1076,7 +1076,7 @@ if (update_stats) { double cost_per_card_ms = 0.0; if (_pending_cards > 0) { - cost_per_card_ms = phase_times()->average_time(G1GCPhaseTimes::UpdateRS) / (double) _pending_cards; + cost_per_card_ms = phase_times()->average_time_ms(G1GCPhaseTimes::UpdateRS) / (double) _pending_cards; _cost_per_card_ms_seq->add(cost_per_card_ms); } @@ -1084,7 +1084,7 @@ double cost_per_entry_ms = 0.0; if (cards_scanned > 10) { - cost_per_entry_ms = phase_times()->average_time(G1GCPhaseTimes::ScanRS) / (double) cards_scanned; + cost_per_entry_ms = phase_times()->average_time_ms(G1GCPhaseTimes::ScanRS) / (double) cards_scanned; if (_last_gc_was_young) { _cost_per_entry_ms_seq->add(cost_per_entry_ms); } else { @@ -1126,7 +1126,7 @@ double cost_per_byte_ms = 0.0; if (copied_bytes > 0) { - cost_per_byte_ms = phase_times()->average_time(G1GCPhaseTimes::ObjCopy) / (double) copied_bytes; + cost_per_byte_ms = phase_times()->average_time_ms(G1GCPhaseTimes::ObjCopy) / (double) copied_bytes; if (_in_marking_window) { _cost_per_byte_ms_during_cm_seq->add(cost_per_byte_ms); } else { @@ -1135,8 +1135,8 @@ } double all_other_time_ms = pause_time_ms - - (phase_times()->average_time(G1GCPhaseTimes::UpdateRS) + phase_times()->average_time(G1GCPhaseTimes::ScanRS) - + phase_times()->average_time(G1GCPhaseTimes::ObjCopy) + phase_times()->average_time(G1GCPhaseTimes::Termination)); + (phase_times()->average_time_ms(G1GCPhaseTimes::UpdateRS) + phase_times()->average_time_ms(G1GCPhaseTimes::ScanRS) + + phase_times()->average_time_ms(G1GCPhaseTimes::ObjCopy) + phase_times()->average_time_ms(G1GCPhaseTimes::Termination)); double young_other_time_ms = 0.0; if (young_cset_region_length() > 0) { @@ -1177,7 +1177,7 @@ // Note that _mmu_tracker->max_gc_time() returns the time in seconds. double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0; - adjust_concurrent_refinement(phase_times()->average_time(G1GCPhaseTimes::UpdateRS), + adjust_concurrent_refinement(phase_times()->average_time_ms(G1GCPhaseTimes::UpdateRS), phase_times()->sub_count_sum(G1GCPhaseTimes::UpdateRS), update_rs_time_goal_ms); _collectionSetChooser->verify(); @@ -2120,19 +2120,19 @@ _other.add(pause_time_ms - phase_times->accounted_time_ms()); _root_region_scan_wait.add(phase_times->root_region_scan_wait_time_ms()); _parallel.add(phase_times->cur_collection_par_time_ms()); - _ext_root_scan.add(phase_times->average_time(G1GCPhaseTimes::ExtRootScan)); - _satb_filtering.add(phase_times->average_time(G1GCPhaseTimes::SATBFiltering)); - _update_rs.add(phase_times->average_time(G1GCPhaseTimes::UpdateRS)); - _scan_rs.add(phase_times->average_time(G1GCPhaseTimes::ScanRS)); - _obj_copy.add(phase_times->average_time(G1GCPhaseTimes::ObjCopy)); - _termination.add(phase_times->average_time(G1GCPhaseTimes::Termination)); - - double parallel_known_time = phase_times->average_time(G1GCPhaseTimes::ExtRootScan) + - phase_times->average_time(G1GCPhaseTimes::SATBFiltering) + - phase_times->average_time(G1GCPhaseTimes::UpdateRS) + - phase_times->average_time(G1GCPhaseTimes::ScanRS) + - phase_times->average_time(G1GCPhaseTimes::ObjCopy) + - phase_times->average_time(G1GCPhaseTimes::Termination); + _ext_root_scan.add(phase_times->average_time_ms(G1GCPhaseTimes::ExtRootScan)); + _satb_filtering.add(phase_times->average_time_ms(G1GCPhaseTimes::SATBFiltering)); + _update_rs.add(phase_times->average_time_ms(G1GCPhaseTimes::UpdateRS)); + _scan_rs.add(phase_times->average_time_ms(G1GCPhaseTimes::ScanRS)); + _obj_copy.add(phase_times->average_time_ms(G1GCPhaseTimes::ObjCopy)); + _termination.add(phase_times->average_time_ms(G1GCPhaseTimes::Termination)); + + double parallel_known_time = phase_times->average_time_ms(G1GCPhaseTimes::ExtRootScan) + + phase_times->average_time_ms(G1GCPhaseTimes::SATBFiltering) + + phase_times->average_time_ms(G1GCPhaseTimes::UpdateRS) + + phase_times->average_time_ms(G1GCPhaseTimes::ScanRS) + + phase_times->average_time_ms(G1GCPhaseTimes::ObjCopy) + + phase_times->average_time_ms(G1GCPhaseTimes::Termination); double parallel_other_time = phase_times->cur_collection_par_time_ms() - parallel_known_time; _parallel_other.add(parallel_other_time);