--- old/./b8448a4717da.export 2015-03-25 13:37:38.220882354 +0100 +++ new/./b8448a4717da.export 2015-03-25 13:37:38.140882357 +0100 @@ -330,12 +330,12 @@ /* * @test TestGCLogMessages -- * @bug 8035406 8027295 8035398 8019342 8027959 8048179 -+ * @bug 8035406 8027295 8035398 8019342 8027959 8048179 8027962 +- * @bug 8035406 8027295 8035398 8019342 8027959 ++ * @bug 8035406 8027295 8035398 8019342 8027959 8027962 * @summary Ensure that the PrintGCDetails output for a minor GC with G1 * includes the expected necessary messages. * @key gc -@@ -34,131 +34,159 @@ +@@ -34,128 +34,158 @@ import com.oracle.java.testlibrary.OutputAnalyzer; public class TestGCLogMessages { @@ -373,7 +373,6 @@ - output.shouldNotContain("[String Dedup Fixup"); - output.shouldNotContain("[Young Free CSet"); - output.shouldNotContain("[Non-Young Free CSet"); -- output.shouldNotContain("[Humongous Register"); - output.shouldNotContain("[Humongous Reclaim"); - output.shouldHaveExitValue(0); + private LogMessageWithLevel allLogMessages[] = new LogMessageWithLevel[] { @@ -405,7 +404,6 @@ + new LogMessageWithLevel("Non-Young Free CSet", Level.FINEST), + // Humongous Eager Reclaim + new LogMessageWithLevel("Humongous Reclaim", Level.FINER), -+ new LogMessageWithLevel("Humongous Register", Level.FINER), + }; - pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", @@ -436,10 +434,9 @@ - output.shouldContain("[String Dedup Fixup"); - output.shouldNotContain("[Young Free CSet"); - output.shouldNotContain("[Non-Young Free CSet"); -- output.shouldContain("[Humongous Register"); +- output.shouldContain("[Humongous Reclaim"); - output.shouldNotContain("[Humongous Total"); - output.shouldNotContain("[Humongous Candidate"); -- output.shouldContain("[Humongous Reclaim"); - output.shouldNotContain("[Humongous Reclaimed"); - output.shouldHaveExitValue(0); + private void testNormalLogs() throws Exception { @@ -467,10 +464,9 @@ - output.shouldContain("[String Dedup Fixup"); - output.shouldContain("[Young Free CSet"); - output.shouldContain("[Non-Young Free CSet"); -- output.shouldContain("[Humongous Register"); +- output.shouldContain("[Humongous Reclaim"); - output.shouldContain("[Humongous Total"); - output.shouldContain("[Humongous Candidate"); -- output.shouldContain("[Humongous Reclaim"); - output.shouldContain("[Humongous Reclaimed"); - output.shouldHaveExitValue(0); - } @@ -482,8 +478,8 @@ - private static void testWithToSpaceExhaustionLogs() throws Exception { - ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", -- "-Xmx32M", -- "-Xmn16M", +- "-Xmx10M", +- "-Xmn5M", - "-XX:+PrintGCDetails", - GCTestWithToSpaceExhaustion.class.getName()); + output = new OutputAnalyzer(pb.start()); @@ -504,8 +500,8 @@ + GCTest.class.getName()); - pb = ProcessTools.createJavaProcessBuilder("-XX:+UseG1GC", -- "-Xmx32M", -- "-Xmn16M", +- "-Xmx10M", +- "-Xmn5M", - "-XX:+PrintGCDetails", - "-XX:+UnlockExperimentalVMOptions", - "-XX:G1LogLevel=finest", @@ -567,7 +563,7 @@ - private static byte[] garbage; - private static byte[] largeObject; - public static void main(String [] args) { -- largeObject = new byte[16*1024*1024]; +- largeObject = new byte[5*1024*1024]; - System.out.println("Creating garbage"); - // create 128MB of garbage. This should result in at least one GC, - // some of them with to-space exhaustion.