test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java

changeset 7798
9041e030d11f
parent 0
f90c822e73f8
     1.1 --- a/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Thu Apr 30 11:47:53 2015 -0700
     1.2 +++ b/test/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Thu Apr 30 12:06:39 2015 -0700
     1.3 @@ -156,10 +156,7 @@
     1.4  
     1.5          @Override
     1.6          public String[] getMethodsToCompileNames() {
     1.7 -            return new String[] {
     1.8 -                getMethodWithLockName(),
     1.9 -                sun.misc.Unsafe.class.getName() + "::forceAbort"
    1.10 -            };
    1.11 +            return new String[] { getMethodWithLockName() };
    1.12          }
    1.13  
    1.14          public void forceAbort(int a[], boolean abort) {
    1.15 @@ -182,13 +179,15 @@
    1.16          public static void main(String args[]) throws Throwable {
    1.17              Test t = new Test();
    1.18  
    1.19 -            if (Boolean.valueOf(args[0])) {
    1.20 +            boolean shouldBeInflated = Boolean.valueOf(args[0]);
    1.21 +            if (shouldBeInflated) {
    1.22                  AbortProvoker.inflateMonitor(t.monitor);
    1.23              }
    1.24  
    1.25              int tmp[] = new int[1];
    1.26  
    1.27              for (int i = 0; i < Test.ITERATIONS; i++ ) {
    1.28 +                AbortProvoker.verifyMonitorState(t.monitor, shouldBeInflated);
    1.29                  if (i == Test.RANGE_CHECK_AT) {
    1.30                      t.forceAbort(new int[0], false);
    1.31                  } else {

mercurial