8219369: Add named constants for iterating ExtRootScan phases
Reviewed-by: kbarrett, sangheki
--- 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,