--- old/test/lib/jdk/test/lib/jfr/GCHelper.java 2019-05-10 10:58:33.659357346 -0400 +++ new/test/lib/jdk/test/lib/jfr/GCHelper.java 2019-05-10 10:58:33.348359370 -0400 @@ -80,6 +80,7 @@ public static final String pauseLevelEvent = "GCPhasePauseLevel"; private static final List g1HeapRegionTypes; + private static final List shenandoahHeapRegionStates; private static PrintStream defaultErrorLog = null; public static int getGcId(RecordedEvent event) { @@ -207,6 +208,21 @@ }; g1HeapRegionTypes = Collections.unmodifiableList(Arrays.asList(g1HeapRegionTypeLiterals)); + + String[] shenandoahHeapRegionStateLiterals = new String[] { + "Empty Uncommitted", + "Empty Committed", + "Regular", + "Humongous Start", + "Humongous Continuation", + "Humonguous Start, Pinned", + "Collection Set", + "Pinned", + "Collection Set, Pinned", + "Trash" + }; + + shenandoahHeapRegionStates = Collections.unmodifiableList(Arrays.asList(shenandoahHeapRegionStateLiterals)); } /** @@ -443,6 +459,10 @@ return g1HeapRegionTypes.contains(type); } + public static boolean isValidShenandoahHeapRegionState(final String state) { + return shenandoahHeapRegionStates.contains(state); + } + /** * Helper function to align heap size up. *