# HG changeset patch # User rprotacio # Date 1447283073 18000 # Node ID ddcf152b170f2f672de3cdbf5d94d4d545c686e6 # Parent 56c4a2d19ee13fb37a962196b511a185cce86057 8142437: SafepointTest.java is occasionally failing in JPRT Summary: A method compilation causing a specific log message to print has been removed because it was not always being compiled. Reviewed-by: coleenp, dholmes diff -r 56c4a2d19ee1 -r ddcf152b170f hotspot/test/runtime/logging/SafepointTest.java --- a/hotspot/test/runtime/logging/SafepointTest.java Wed Nov 11 14:57:27 2015 -0800 +++ b/hotspot/test/runtime/logging/SafepointTest.java Wed Nov 11 18:04:33 2015 -0500 @@ -41,11 +41,9 @@ "-Xlog:safepoint=trace", "SafepointTestMain"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("Safepoint synchronization initiated. ("); - output.shouldContain(" thread(s) to block"); output.shouldContain("Entering safepoint region: "); output.shouldContain("Leaving safepoint region"); output.shouldContain("_at_poll_safepoint"); - output.shouldContain("... found polling page "); output.shouldHaveExitValue(0); } } diff -r 56c4a2d19ee1 -r ddcf152b170f hotspot/test/runtime/logging/SafepointTestMain.java --- a/hotspot/test/runtime/logging/SafepointTestMain.java Wed Nov 11 14:57:27 2015 -0800 +++ b/hotspot/test/runtime/logging/SafepointTestMain.java Wed Nov 11 18:04:33 2015 -0500 @@ -24,21 +24,6 @@ import java.lang.ref.WeakReference; public class SafepointTestMain { - public static class B { - static int count = 0; - public static volatile boolean stop = false; - static void localSleep(int time) { - try{ - Thread.currentThread().sleep(time); - } catch(InterruptedException ie) { - } - } - - public static void infinite() { - while (!stop) { count++; } - } - } - public static byte[] garbage; public static volatile WeakReference weakref; @@ -48,16 +33,7 @@ } public static void main(String[] args) throws Exception { - // Run function in separate thread to force compilation and pint safepoint - // message for compiled method - new Thread() { - public void run() { - B.infinite(); - } - }.start(); - B.localSleep(1000); - // Cause several safepoints to run GC while the compiled method is running, - // to see safepoint messages + // Cause several safepoints to run GC to see safepoint messages for (int i = 0; i < 2; i++) { createweakref(); while(weakref.get() != null) { @@ -65,6 +41,5 @@ System.gc(); } } - B.stop = true; } }