--- old/compiler/6434117/TestNativeRevocation.java Tue Jan 6 17:23:14 2009 +++ new/compiler/6434117/TestNativeRevocation.java Tue Jan 6 17:23:14 2009 @@ -2,7 +2,7 @@ * @test * @bug 6434117 * @summary debug info for native methods illegally references register - * @run main/othervm -server -XX:+UseBiasedLocking TestNativeRevocation + * @run main/othervm -server -XX:+UseBiasedLocking -XX:BiasedLockingStartupDelay=50 TestNativeRevocation */ import java.util.*; @@ -18,12 +18,15 @@ while (cont) { synchronized (queue) { if (queue.size() > 0) { - Throwable t = (Throwable) queue.remove(0); + // Remove element from the end of the list to keep + // the list small (avoid elements shift to keep up + // with queue.add(t)). + Throwable t = (Throwable) queue.remove(queue.size()-1); synchronized (t) { tmp = t.getMessage(); } } - while (queue.size() == 0) { + while (cont && queue.size() == 0) { try { queue.wait(); } catch (InterruptedException e) {