test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
Print this page
@@ -154,14 +154,11 @@
return this.getClass().getName() + "::forceAbort";
}
@Override
public String[] getMethodsToCompileNames() {
- return new String[] {
- getMethodWithLockName(),
- sun.misc.Unsafe.class.getName() + "::forceAbort"
- };
+ return new String[] { getMethodWithLockName() };
}
public void forceAbort(int a[], boolean abort) {
try {
synchronized(monitor) {
@@ -180,17 +177,19 @@
* Test <inflate monitor>
*/
public static void main(String args[]) throws Throwable {
Test t = new Test();
- if (Boolean.valueOf(args[0])) {
+ boolean shouldBeInflated = Boolean.valueOf(args[0]);
+ if (shouldBeInflated) {
AbortProvoker.inflateMonitor(t.monitor);
}
int tmp[] = new int[1];
for (int i = 0; i < Test.ITERATIONS; i++ ) {
+ AbortProvoker.verifyMonitorState(t.monitor, shouldBeInflated);
if (i == Test.RANGE_CHECK_AT) {
t.forceAbort(new int[0], false);
} else {
boolean isThreshold
= (i == TestRTMAfterNonRTMDeopt.ABORT_THRESHOLD);