< prev index next >

test/gc/logging/TestGCId.java

Print this page

        

*** 43,52 **** --- 43,55 ---- testGCId("UseConcMarkSweepGC", "PrintGC"); testGCId("UseConcMarkSweepGC", "PrintGCDetails"); testGCId("UseSerialGC", "PrintGC"); testGCId("UseSerialGC", "PrintGCDetails"); + + testGCId("UseShenandoahGC", "PrintGC"); + testGCId("UseShenandoahGC", "PrintGCDetails"); } private static void verifyContainsGCIDs(OutputAnalyzer output) { output.shouldMatch("^#0: \\["); output.shouldMatch("^#1: \\[");
*** 59,79 **** } private static void testGCId(String gcFlag, String logFlag) throws Exception { // GCID logging enabled ProcessBuilder pb_enabled = ! ProcessTools.createJavaProcessBuilder("-XX:+" + gcFlag, "-XX:+" + logFlag, "-Xmx10M", "-XX:+PrintGCID", GCTest.class.getName()); verifyContainsGCIDs(new OutputAnalyzer(pb_enabled.start())); // GCID logging disabled ProcessBuilder pb_disabled = ! ProcessTools.createJavaProcessBuilder("-XX:+" + gcFlag, "-XX:+" + logFlag, "-Xmx10M", "-XX:-PrintGCID", GCTest.class.getName()); verifyContainsNoGCIDs(new OutputAnalyzer(pb_disabled.start())); // GCID logging default ProcessBuilder pb_default = ! ProcessTools.createJavaProcessBuilder("-XX:+" + gcFlag, "-XX:+" + logFlag, "-Xmx10M", GCTest.class.getName()); verifyContainsNoGCIDs(new OutputAnalyzer(pb_default.start())); } static class GCTest { private static byte[] garbage; --- 62,82 ---- } private static void testGCId(String gcFlag, String logFlag) throws Exception { // GCID logging enabled ProcessBuilder pb_enabled = ! ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions", "-XX:+" + gcFlag, "-XX:+" + logFlag, "-Xmx10M", "-XX:+PrintGCID", GCTest.class.getName()); verifyContainsGCIDs(new OutputAnalyzer(pb_enabled.start())); // GCID logging disabled ProcessBuilder pb_disabled = ! ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions", "-XX:+" + gcFlag, "-XX:+" + logFlag, "-Xmx10M", "-XX:-PrintGCID", GCTest.class.getName()); verifyContainsNoGCIDs(new OutputAnalyzer(pb_disabled.start())); // GCID logging default ProcessBuilder pb_default = ! ProcessTools.createJavaProcessBuilder("-XX:+UnlockExperimentalVMOptions", "-XX:+" + gcFlag, "-XX:+" + logFlag, "-Xmx10M", GCTest.class.getName()); verifyContainsNoGCIDs(new OutputAnalyzer(pb_default.start())); } static class GCTest { private static byte[] garbage;
< prev index next >