< prev index next >

test/compiler/rtm/locking/TestRTMAbortRatio.java

Print this page
rev 7600 : 8050486: compiler/rtm/ tests fail due to monitor deflation at safepoint synchronization
Reviewed-by:

*** 125,138 **** return this.getClass().getName() + "::lock"; } @Override public String[] getMethodsToCompileNames() { ! return new String[] { ! getMethodWithLockName(), ! Unsafe.class.getName() + "::addressSize" ! }; } public void lock(boolean abort) { synchronized(monitor) { if (abort) { --- 125,135 ---- return this.getClass().getName() + "::lock"; } @Override public String[] getMethodsToCompileNames() { ! return new String[] { getMethodWithLockName() }; } public void lock(boolean abort) { synchronized(monitor) { if (abort) {
*** 146,159 **** * Test &lt;inflate monitor&gt; */ public static void main(String args[]) throws Throwable { Asserts.assertGTE(args.length, 1, "One argument required."); Test t = new Test(); ! if (Boolean.valueOf(args[0])) { AbortProvoker.inflateMonitor(t.monitor); } for (int i = 0; i < Test.TOTAL_ITERATIONS; i++) { t.lock(i >= Test.WARMUP_ITERATIONS); } } } --- 143,158 ---- * Test &lt;inflate monitor&gt; */ public static void main(String args[]) throws Throwable { Asserts.assertGTE(args.length, 1, "One argument required."); Test t = new Test(); ! boolean shouldBeInflated = Boolean.valueOf(args[0]); ! if (shouldBeInflated) { AbortProvoker.inflateMonitor(t.monitor); } for (int i = 0; i < Test.TOTAL_ITERATIONS; i++) { + AbortProvoker.verifyMonitorState(t.monitor, shouldBeInflated); t.lock(i >= Test.WARMUP_ITERATIONS); } } }
< prev index next >