< prev index next >

test/compiler/c2/Test6912517.java

Print this page
rev 11557 : 8132919: use package in compiler tests
Reviewed-by: duke

*** 24,50 **** /** * @test * @bug 6912517 * @summary JIT bug compiles out (and stops running) code that needs to be run. Causes NPE. * ! * @run main/othervm -Xbatch -XX:CompileThreshold=100 -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops Test */ /** * Highlights a bug with the JIT compiler. * @author Matt Bruce m b r u c e __\at/__ g m a i l DOT c o m */ ! public class Test implements Runnable { private final Thread myThread; private Thread myInitialThread; private boolean myShouldCheckThreads; /** * Sets up the running thread, and starts it. */ ! public Test(int id) { myThread = new Thread(this); myThread.setName("Runner: " + id); myThread.start(); myShouldCheckThreads = false; --- 24,53 ---- /** * @test * @bug 6912517 * @summary JIT bug compiles out (and stops running) code that needs to be run. Causes NPE. * ! * @run main/othervm -Xbatch -XX:CompileThreshold=100 -XX:+IgnoreUnrecognizedVMOptions -XX:-UseCompressedOops ! * compiler.c2.Test6912517 */ + package compiler.c2; + /** * Highlights a bug with the JIT compiler. * @author Matt Bruce m b r u c e __\at/__ g m a i l DOT c o m */ ! public class Test6912517 implements Runnable { private final Thread myThread; private Thread myInitialThread; private boolean myShouldCheckThreads; /** * Sets up the running thread, and starts it. */ ! public Test6912517(int id) { myThread = new Thread(this); myThread.setName("Runner: " + id); myThread.start(); myShouldCheckThreads = false;
*** 67,77 **** public static void main(String[] args) throws InterruptedException { // let this run for a bit, so the "run" below is JITTed. for (int id = 0; id < 20; id++) { System.out.println("Starting thread: " + id); ! Test bug = new Test(id); bug.setShouldCheckThreads(true); Thread.sleep(2500); } } --- 70,80 ---- public static void main(String[] args) throws InterruptedException { // let this run for a bit, so the "run" below is JITTed. for (int id = 0; id < 20; id++) { System.out.println("Starting thread: " + id); ! Test6912517 bug = new Test6912517(id); bug.setShouldCheckThreads(true); Thread.sleep(2500); } }
< prev index next >