< prev index next >

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

Print this page

        

@@ -1074,19 +1074,19 @@
   // Do that for any other surv rate groups
 
   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);
     }
 
     size_t cards_scanned = _g1->cards_scanned();
 
     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 {
         _mixed_cost_per_entry_ms_seq->add(cost_per_entry_ms);
       }

@@ -1124,21 +1124,21 @@
     size_t freed_bytes = _heap_used_bytes_before_gc - cur_used_bytes;
     size_t copied_bytes = _collection_set_bytes_used_before - freed_bytes;
     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 {
         _cost_per_byte_ms_seq->add(cost_per_byte_ms);
       }
     }
 
     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) {
       young_other_time_ms =
         phase_times()->young_cset_choice_time_ms() +

@@ -1175,11 +1175,11 @@
   _free_regions_at_end_of_collection = _g1->num_free_regions();
   update_young_list_target_length();
 
   // 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();
 }
 

@@ -2118,23 +2118,23 @@
   if(TraceYoungGenTime) {
     _total.add(pause_time_ms);
     _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);
     _clear_ct.add(phase_times->cur_clear_ct_time_ms());
   }
< prev index next >