hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java
changeset 28394 6d382dc493e5
parent 28190 5a6b07edeb21
child 29678 dd2f3932c21e
--- a/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java	Tue Dec 30 11:07:49 2014 +0300
+++ b/hotspot/test/compiler/rtm/locking/TestUseRTMAfterLockInflation.java	Tue Dec 30 11:09:42 2014 +0300
@@ -52,7 +52,7 @@
  * Compiled method invoked {@code AbortProvoker.DEFAULT_ITERATIONS} times before
  * lock inflation and the same amount of times after inflation.
  * As a result total locks count should be equal to
- * {@code 2*AbortProvoker.DEFAULT_ITERATIONS}.
+ * {@code 2 * AbortProvoker.DEFAULT_ITERATIONS}.
  * It is a pretty strict assertion which could fail if some retriable abort
  * happened: it could be {@code AbortType.RETRIABLE} or
  * {@code AbortType.MEM_CONFLICT}, but unfortunately abort can has both these
@@ -101,7 +101,6 @@
     }
 
     public static class Test {
-
         /**
          * Usage:
          * Test <provoker type>
@@ -113,10 +112,12 @@
             AbortProvoker provoker
                     = AbortType.lookup(Integer.valueOf(args[0])).provoker();
             for (int i = 0; i < AbortProvoker.DEFAULT_ITERATIONS; i++) {
+                AbortProvoker.verifyMonitorState(provoker, false /*deflated*/);
                 provoker.forceAbort();
             }
             provoker.inflateMonitor();
             for (int i = 0; i < AbortProvoker.DEFAULT_ITERATIONS; i++) {
+                AbortProvoker.verifyMonitorState(provoker, true /*inflated*/);
                 provoker.forceAbort();
             }
         }