< prev index next >

test/lib/jdk/test/lib/jfr/GCHelper.java

Print this page

        

*** 78,87 **** --- 78,88 ---- public static final String gcPSMarkSweep = "PSMarkSweep"; public static final String gcParallelOld = "ParallelOld"; public static final String pauseLevelEvent = "GCPhasePauseLevel"; private static final List<String> g1HeapRegionTypes; + private static final List<String> shenandoahHeapRegionStates; private static PrintStream defaultErrorLog = null; public static int getGcId(RecordedEvent event) { return Events.assertField(event, "gcId").getValue(); }
*** 205,214 **** --- 206,230 ---- "Old", "Archive" }; g1HeapRegionTypes = Collections.unmodifiableList(Arrays.asList(g1HeapRegionTypeLiterals)); + + String[] shenandoahHeapRegionStateLiterals = new String[] { + "Empty Uncommitted", + "Empty Committed", + "Regular", + "Humongous Start", + "Humongous Continuation", + "Humongous Start, Pinned", + "Collection Set", + "Pinned", + "Collection Set, Pinned", + "Trash" + }; + + shenandoahHeapRegionStates = Collections.unmodifiableList(Arrays.asList(shenandoahHeapRegionStateLiterals)); } /** * Contains all GC events belonging to the same GC (same gcId). */
*** 441,450 **** --- 457,473 ---- public static boolean isValidG1HeapRegionType(final String type) { return g1HeapRegionTypes.contains(type); } + public static boolean assertIsValidShenandoahHeapRegionState(final String state) { + if (!shenandoahHeapRegionStates.contains(state)) { + throw new AssertionError("Unknown state '" + state + "', valid heap region states are " + shenandoahHeapRegionStates); + } + return true; + } + /** * Helper function to align heap size up. * * @param value * @param alignment
< prev index next >