Skip to content

Commit

Permalink
8291794: [11u] Corrections after backport of JDK-8212028
Browse files Browse the repository at this point in the history
Reviewed-by: clanger
Backport-of: 03a8cde
  • Loading branch information
gdams authored and RealCLanger committed Aug 4, 2022
1 parent 4046ee2 commit 761e568
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 41 deletions.
55 changes: 15 additions & 40 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -32,43 +32,6 @@ include FindTests.gmk
# We will always run multiple tests serially
.NOTPARALLEL:

################################################################################
# Setup global test running parameters
################################################################################

# Each factor variable comes in 3 variants. The first one is reserved for users
# to use on command line. The other two are for predifined configurations in JDL
# and for machine specific configurations respectively.
TEST_JOBS_FACTOR ?= 1
TEST_JOBS_FACTOR_JDL ?= 1
TEST_JOBS_FACTOR_MACHINE ?= 1

ifeq ($(TEST_JOBS), 0)
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
MEMORY_DIVIDER := 2048
TEST_JOBS := $(shell $(AWK) \
'BEGIN { \
c = $(NUM_CORES) / $(CORES_DIVIDER); \
m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
if (c > m) c = m; \
c = c * $(TEST_JOBS_FACTOR); \
c = c * $(TEST_JOBS_FACTOR_JDL); \
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
if (c < 1) c = 1; \
printf "%.0f", c; \
}')
endif

################################################################################
# Parse global control variables
################################################################################
Expand Down Expand Up @@ -241,11 +204,23 @@ TEST_JOBS_FACTOR_JDL ?= 1
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
MEMORY_DIVIDER := 2048
TEST_JOBS := $(shell $(AWK) \
'BEGIN { \
c = $(NUM_CORES) / 2; \
if (c > 12) c = 12; \
c = $(NUM_CORES) / $(CORES_DIVIDER); \
m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
if (c > m) c = m; \
c = c * $(TEST_JOBS_FACTOR); \
c = c * $(TEST_JOBS_FACTOR_JDL); \
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* sun.hotspot.WhiteBox$WhiteBoxPermission
* @run driver/timeout=300 compiler.jsr292.ContinuousCallSiteTargetChange
* @run driver compiler.jsr292.ContinuousCallSiteTargetChange
*/

package compiler.jsr292;
Expand Down

1 comment on commit 761e568

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.