changeset 51822:959dbf7e96d0

8205390: jtreg: Fix failing TestRTMSpinLoopCount on PPC64 Reviewed-by: kvn, iignatyev
author gromero
date Sat, 23 Jun 2018 18:02:46 -0400
parents a1a53d240353
children a2a25f5bfd18
files test/hotspot/jtreg/compiler/rtm/locking/TestRTMSpinLoopCount.java
diffstat 1 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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]);