8211727: Adjust default concurrency settings for running tests on Sparc
authorerikj
Wed, 14 Nov 2018 09:26:28 -0800
changeset 52556 6b05634db714
parent 52555 3b2d22602c16
child 52557 2f6f97629aa7
8211727: Adjust default concurrency settings for running tests on Sparc Reviewed-by: ctornqvi, tbell, mikael
make/RunTests.gmk
test/hotspot/jtreg/compiler/jsr292/ContinuousCallSiteTargetChange.java
--- a/make/RunTests.gmk	Wed Nov 14 09:50:01 2018 -0500
+++ b/make/RunTests.gmk	Wed Nov 14 09:26:28 2018 -0800
@@ -203,11 +203,20 @@
 TEST_JOBS_FACTOR_MACHINE ?= 1
 
 ifeq ($(TEST_JOBS), 0)
-  # Concurrency based on min(cores / 2, 12) * TEST_JOBS_FACTOR
+  CORES_DIVIDER := 2
+  ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+    # For smaller SPARC machines we see reasonable scaling of throughput up to
+    # cpus/4 without affecting test reliability. On the bigger machines, cpus/4
+    # causes intermittent timeouts.
+    ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1)
+      CORES_DIVIDER := 5
+    else
+      CORES_DIVIDER := 4
+    endif
+  endif
   TEST_JOBS := $(shell $(AWK) \
     'BEGIN { \
-      c = $(NUM_CORES) / 2; \
-      if (c > 12) c = 12; \
+      c = $(NUM_CORES) / $(CORES_DIVIDER); \
       c = c * $(TEST_JOBS_FACTOR); \
       c = c * $(TEST_JOBS_FACTOR_JDL); \
       c = c * $(TEST_JOBS_FACTOR_MACHINE); \
@@ -621,7 +630,12 @@
   # we may end up with a lot of JVM's
   $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS))
 
-  JTREG_TIMEOUT_FACTOR ?= 4
+  # SPARC is in general slower per core so need to scale up timeouts a bit.
+  ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+    JTREG_TIMEOUT_FACTOR ?= 8
+  else
+    JTREG_TIMEOUT_FACTOR ?= 4
+  endif
   JTREG_VERBOSE ?= fail,error,summary
   JTREG_RETAIN ?= fail,error
 
--- a/test/hotspot/jtreg/compiler/jsr292/ContinuousCallSiteTargetChange.java	Wed Nov 14 09:50:01 2018 -0500
+++ b/test/hotspot/jtreg/compiler/jsr292/ContinuousCallSiteTargetChange.java	Wed Nov 14 09:26:28 2018 -0800
@@ -25,7 +25,7 @@
  * @test
  * @library /test/lib /
  *
- * @run driver/timeout=300 compiler.jsr292.ContinuousCallSiteTargetChange
+ * @run driver compiler.jsr292.ContinuousCallSiteTargetChange
  */
 
 package compiler.jsr292;