8232779: G1 current collection parallel time does not include optional evacuation
authortschatzl
Fri, 25 Oct 2019 12:34:30 +0200
changeset 58796 7608c17b7463
parent 58795 3df2bf731a87
child 58797 f29ca6895893
8232779: G1 current collection parallel time does not include optional evacuation Reviewed-by: kbarrett, sangheki
src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp
src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp	Thu Oct 24 22:41:24 2019 -0700
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp	Fri Oct 25 12:34:30 2019 +0200
@@ -164,7 +164,7 @@
 
 void G1GCPhaseTimes::reset() {
   _cur_collection_initial_evac_time_ms = 0.0;
-  _cur_optional_evac_ms = 0.0;
+  _cur_optional_evac_time_ms = 0.0;
   _cur_collection_code_root_fixup_time_ms = 0.0;
   _cur_strong_code_root_purge_time_ms = 0.0;
   _cur_merge_heap_roots_time_ms = 0.0;
@@ -416,14 +416,14 @@
 }
 
 double G1GCPhaseTimes::print_evacuate_optional_collection_set() const {
-  const double sum_ms = _cur_optional_evac_ms + _cur_optional_merge_heap_roots_time_ms;
+  const double sum_ms = _cur_optional_evac_time_ms + _cur_optional_merge_heap_roots_time_ms;
   if (sum_ms > 0) {
     info_time("Merge Optional Heap Roots", _cur_optional_merge_heap_roots_time_ms);
 
     debug_time("Prepare Optional Merge Heap Roots", _cur_optional_prepare_merge_heap_roots_time_ms);
     debug_phase(_gc_par_phases[OptMergeRS]);
 
-    info_time("Evacuate Optional Collection Set", _cur_optional_evac_ms);
+    info_time("Evacuate Optional Collection Set", _cur_optional_evac_time_ms);
     debug_phase(_gc_par_phases[OptScanHR]);
     debug_phase(_gc_par_phases[OptObjCopy]);
     debug_phase(_gc_par_phases[OptCodeRoots]);
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp	Thu Oct 24 22:41:24 2019 -0700
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp	Fri Oct 25 12:34:30 2019 +0200
@@ -156,7 +156,7 @@
   WorkerDataArray<size_t>* _redirtied_cards;
 
   double _cur_collection_initial_evac_time_ms;
-  double _cur_optional_evac_ms;
+  double _cur_optional_evac_time_ms;
   double _cur_collection_code_root_fixup_time_ms;
   double _cur_strong_code_root_purge_time_ms;
 
@@ -296,7 +296,7 @@
   }
 
   void record_or_add_optional_evac_time(double ms) {
-    _cur_optional_evac_ms += ms;
+    _cur_optional_evac_time_ms += ms;
   }
 
   void record_or_add_code_root_fixup_time(double ms) {
@@ -415,7 +415,7 @@
   }
 
   double cur_collection_par_time_ms() {
-    return _cur_collection_initial_evac_time_ms;
+    return _cur_collection_initial_evac_time_ms + _cur_optional_evac_time_ms;
   }
 
   double cur_clear_ct_time_ms() {