8204134: jtreg: Fix RTM abort provoker for various tests after "8149159: Clean up Unsafe"
authorgromero
Sun, 03 Jun 2018 14:21:56 -0700
changeset 50371 72d0baab31bc
parent 50370 676b7c44eeae
child 50372 7a013fbf6fc3
child 56663 e522520c2eb3
8204134: jtreg: Fix RTM abort provoker for various tests after "8149159: Clean up Unsafe" Reviewed-by: kvn, iignatyev
test/hotspot/jtreg/compiler/rtm/locking/TestRTMAbortRatio.java
test/hotspot/jtreg/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java
test/hotspot/jtreg/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java
test/hotspot/jtreg/compiler/rtm/locking/TestRTMLockingThreshold.java
test/hotspot/jtreg/compiler/rtm/locking/TestRTMTotalCountIncrRate.java
test/hotspot/jtreg/compiler/testlibrary/rtm/XAbortProvoker.java
--- a/test/hotspot/jtreg/compiler/rtm/locking/TestRTMAbortRatio.java	Sun Jun 03 19:21:18 2018 +0530
+++ b/test/hotspot/jtreg/compiler/rtm/locking/TestRTMAbortRatio.java	Sun Jun 03 14:21:56 2018 -0700
@@ -136,7 +136,7 @@
         public void lock(boolean abort) {
             synchronized(monitor) {
                 if (abort) {
-                    Test.UNSAFE.addressSize();
+                    Test.UNSAFE.pageSize();
                 }
             }
         }
--- a/test/hotspot/jtreg/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Sun Jun 03 19:21:18 2018 +0530
+++ b/test/hotspot/jtreg/compiler/rtm/locking/TestRTMAfterNonRTMDeopt.java	Sun Jun 03 14:21:56 2018 -0700
@@ -167,7 +167,7 @@
                 synchronized(monitor) {
                     a[0]++;
                     if (abort) {
-                        Test.field = Test.UNSAFE.addressSize();
+                        Test.field = Test.UNSAFE.pageSize();
                     }
                 }
             } catch (Throwable t) {
--- a/test/hotspot/jtreg/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java	Sun Jun 03 19:21:18 2018 +0530
+++ b/test/hotspot/jtreg/compiler/rtm/locking/TestRTMDeoptOnLowAbortRatio.java	Sun Jun 03 14:21:56 2018 -0700
@@ -140,7 +140,7 @@
         public void forceAbort(boolean abort) {
             synchronized(monitor) {
                 if (abort) {
-                    Test.UNSAFE.addressSize();
+                    Test.UNSAFE.pageSize();
                 }
             }
         }
--- a/test/hotspot/jtreg/compiler/rtm/locking/TestRTMLockingThreshold.java	Sun Jun 03 19:21:18 2018 +0530
+++ b/test/hotspot/jtreg/compiler/rtm/locking/TestRTMLockingThreshold.java	Sun Jun 03 14:21:56 2018 -0700
@@ -151,7 +151,7 @@
         public void lock(boolean abort) {
             synchronized(monitor) {
                 if (abort) {
-                    Test.field += Test.UNSAFE.addressSize();
+                    Test.field += Test.UNSAFE.pageSize();
                 }
             }
         }
--- a/test/hotspot/jtreg/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Sun Jun 03 19:21:18 2018 +0530
+++ b/test/hotspot/jtreg/compiler/rtm/locking/TestRTMTotalCountIncrRate.java	Sun Jun 03 14:21:56 2018 -0700
@@ -129,7 +129,7 @@
                     // If an actual JNI call will be replaced by
                     // intrinsic - we'll be in trouble, since xabort
                     // will be no longer called and test may fail.
-                    UNSAFE.addressSize();
+                    UNSAFE.pageSize();
                 }
                 Test.field++;
             }
--- a/test/hotspot/jtreg/compiler/testlibrary/rtm/XAbortProvoker.java	Sun Jun 03 19:21:18 2018 +0530
+++ b/test/hotspot/jtreg/compiler/testlibrary/rtm/XAbortProvoker.java	Sun Jun 03 14:21:56 2018 -0700
@@ -46,7 +46,7 @@
     @Override
     public void forceAbort() {
         synchronized(monitor) {
-            XAbortProvoker.field = UNSAFE.addressSize();
+            XAbortProvoker.field = UNSAFE.pageSize();
         }
     }
 
@@ -54,7 +54,7 @@
     public String[] getMethodsToCompileNames() {
         return new String[] {
                 getMethodWithLockName(),
-                Unsafe.class.getName() + "::addressSize"
+                Unsafe.class.getName() + "::pageSize"
         };
     }
 }