hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java
changeset 28394 6d382dc493e5
parent 28190 5a6b07edeb21
child 28500 8cab8bd43b39
--- a/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java	Tue Dec 30 11:07:49 2014 +0300
+++ b/hotspot/test/compiler/rtm/locking/TestRTMLockingThreshold.java	Tue Dec 30 11:09:42 2014 +0300
@@ -143,10 +143,7 @@
 
         @Override
         public String[] getMethodsToCompileNames() {
-            return new String[] {
-                getMethodWithLockName(),
-                sun.misc.Unsafe.class.getName() + "::addressSize"
-            };
+            return new String[] { getMethodWithLockName() };
         }
 
         public void lock(boolean abort) {
@@ -164,11 +161,12 @@
         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])) {
+            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 % 2 == 1);
             }
         }