< prev index next >

test/gc/g1/TestPLABOutput.java

Print this page

        

*** 52,74 **** "-XX:+UnlockExperimentalVMOptions", "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:+UseG1GC", "-Xmx10M", ! "-XX:+PrintGC", ! "-XX:+PrintPLAB", GCTest.class.getName() }; ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(arguments); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldHaveExitValue(0); System.out.println(output.getStdout()); ! String pattern = "#0:.*allocated = (\\d+).*"; Pattern r = Pattern.compile(pattern); Matcher m = r.matcher(output.getStdout()); if (!m.find()) { throw new RuntimeException("Could not find any PLAB statistics output"); --- 52,73 ---- "-XX:+UnlockExperimentalVMOptions", "-XX:+UnlockDiagnosticVMOptions", "-XX:+WhiteBoxAPI", "-XX:+UseG1GC", "-Xmx10M", ! "-Xlog:gc+plab=debug", GCTest.class.getName() }; ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(arguments); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldHaveExitValue(0); System.out.println(output.getStdout()); ! String pattern = ".*GC\\(0\\) .*allocated = (\\d+).*"; Pattern r = Pattern.compile(pattern); Matcher m = r.matcher(output.getStdout()); if (!m.find()) { throw new RuntimeException("Could not find any PLAB statistics output");
< prev index next >