make/RunTests.gmk
changeset 52556 6b05634db714
parent 52396 e292e94b448a
child 52593 8c887dcd5d90
--- 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