test/compiler/whitebox/BlockingCompilation.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff test/compiler/whitebox/BlockingCompilation.java

test/compiler/whitebox/BlockingCompilation.java

Print this page
rev 10831 : 8153013: BlockingCompilation test times out
Summary: Task has no invocation count and get stale at once
Reviewed-by: kvn

*** 26,52 **** * @bug 8150646 * @summary Add support for blocking compiles through whitebox API * @library /testlibrary /test/lib / * @build sun.hotspot.WhiteBox * compiler.testlibrary.CompilerUtils ! * @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission - * * @run main/othervm/timeout=60 * -Xbootclasspath/a:. * -Xmixed * -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI * -XX:+PrintCompilation * BlockingCompilation */ import java.lang.reflect.Method; import java.util.Random; - import sun.hotspot.WhiteBox; - import compiler.testlibrary.CompilerUtils; public class BlockingCompilation { private static final WhiteBox WB = WhiteBox.getWhiteBox(); private static final Random RANDOM = new Random(); --- 26,50 ---- * @bug 8150646 * @summary Add support for blocking compiles through whitebox API * @library /testlibrary /test/lib / * @build sun.hotspot.WhiteBox * compiler.testlibrary.CompilerUtils ! * @run driver ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission * @run main/othervm/timeout=60 * -Xbootclasspath/a:. * -Xmixed * -XX:+UnlockDiagnosticVMOptions * -XX:+WhiteBoxAPI * -XX:+PrintCompilation * BlockingCompilation */ + import compiler.testlibrary.CompilerUtils; import java.lang.reflect.Method; import java.util.Random; import sun.hotspot.WhiteBox; public class BlockingCompilation { private static final WhiteBox WB = WhiteBox.getWhiteBox(); private static final Random RANDOM = new Random();
*** 75,85 **** // Try compiling on highest available comp level. // If the compiles are blocking, this call will block until the test time out, // Progress == success // (Don't run with -Xcomp since that can cause long timeouts due to many compiles) ! WB.enqueueMethodForCompilation(m, highest_level); // restore state WB.unlockCompilation(); while (!WB.isMethodCompiled(m)) { Thread.sleep(100); --- 73,89 ---- // Try compiling on highest available comp level. // If the compiles are blocking, this call will block until the test time out, // Progress == success // (Don't run with -Xcomp since that can cause long timeouts due to many compiles) ! if (!WB.enqueueMethodForCompilation(m, highest_level)) { ! throw new Exception("Failed to enqueue method on level: " + highest_level); ! } ! ! if (!WB.isMethodQueuedForCompilation(m)) { ! throw new Exception("Must be enqueued because of locked compilation"); ! } // restore state WB.unlockCompilation(); while (!WB.isMethodCompiled(m)) { Thread.sleep(100);
test/compiler/whitebox/BlockingCompilation.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File