8205390: jtreg: Fix failing TestRTMSpinLoopCount on PPC64
authorgromero
Sat, 23 Jun 2018 18:02:46 -0400
changeset 51148 959dbf7e96d0
parent 51147 a1a53d240353
child 51149 a2a25f5bfd18
8205390: jtreg: Fix failing TestRTMSpinLoopCount on PPC64 Reviewed-by: kvn, iignatyev
test/hotspot/jtreg/compiler/rtm/locking/TestRTMSpinLoopCount.java
--- a/test/hotspot/jtreg/compiler/rtm/locking/TestRTMSpinLoopCount.java	Fri Jul 06 16:25:07 2018 -0400
+++ b/test/hotspot/jtreg/compiler/rtm/locking/TestRTMSpinLoopCount.java	Sat Jun 23 18:02:46 2018 -0400
@@ -47,6 +47,7 @@
 import jdk.test.lib.Asserts;
 import jdk.test.lib.process.OutputAnalyzer;
 import jdk.test.lib.cli.CommandLineOptionTest;
+import jdk.test.lib.Platform;
 
 import java.util.List;
 
@@ -59,11 +60,18 @@
     private static final int RTM_RETRY_COUNT = 1000;
     private static final boolean INFLATE_MONITOR = true;
     private static final long MAX_ABORTS = RTM_RETRY_COUNT + 1L;
-    private static final int[] SPIN_LOOP_COUNTS
-            = new int[] { 0, 100, 1_000, 10_000, 100_000 };
+    private static int[] SPIN_LOOP_COUNTS;
 
     protected void runTestCases() throws Throwable {
+
+        if (Platform.isPPC()) {
+            SPIN_LOOP_COUNTS = new int[] { 0, 10, 100, 1_000, 10_000 };
+        } else {
+            SPIN_LOOP_COUNTS = new int[] { 0, 100, 1_000, 10_000, 100_000 };
+        }
+
         long[] aborts = new long[TestRTMSpinLoopCount.SPIN_LOOP_COUNTS.length];
+
         for (int i = 0; i < TestRTMSpinLoopCount.SPIN_LOOP_COUNTS.length; i++) {
             aborts[i] = getAbortsCountOnLockBusy(
                     TestRTMSpinLoopCount.SPIN_LOOP_COUNTS[i]);