8219369: Add named constants for iterating ExtRootScan phases
authortschatzl
Mon, 04 Mar 2019 11:49:16 +0100
changeset 53984 31884d19e945
parent 53983 7935353a466a
child 53985 0da5c17f5e43
8219369: Add named constants for iterating ExtRootScan phases 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	Mon Mar 04 11:49:16 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp	Mon Mar 04 11:49:16 2019 +0100
@@ -385,7 +385,7 @@
 
   trace_phase(_gc_par_phases[GCWorkerStart], false);
   debug_phase(_gc_par_phases[ExtRootScan]);
-  for (int i = ThreadRoots; i <= SATBFiltering; i++) {
+  for (int i = ExtRootScanSubPhasesStart; i <= ExtRootScanSubPhasesEnd; i++) {
     trace_phase(_gc_par_phases[i]);
   }
   if (G1HotCardCache::default_use_cache()) {
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp	Mon Mar 04 11:49:16 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.hpp	Mon Mar 04 11:49:16 2019 +0100
@@ -81,6 +81,9 @@
     GCParPhasesSentinel
   };
 
+  static const GCParPhases ExtRootScanSubPhasesStart = ThreadRoots;
+  static const GCParPhases ExtRootScanSubPhasesEnd = SATBFiltering;
+
   enum GCScanRSWorkItems {
     ScanRSScannedCards,
     ScanRSClaimedCards,