8196524: Align MaxRAMPercentage settings between open and closed
authorerikj
Thu, 01 Feb 2018 09:07:25 -0800
changeset 48693 a2d550f08617
parent 48692 60c19c384333
child 48694 b0a54e2ba484
8196524: Align MaxRAMPercentage settings between open and closed Reviewed-by: dholmes, tbell
test/TestCommon.gmk
--- a/test/TestCommon.gmk	Wed Jan 31 15:15:09 2018 -0800
+++ b/test/TestCommon.gmk	Thu Feb 01 09:07:25 2018 -0800
@@ -358,7 +358,7 @@
 endif
 
 # Concurrency based on min(cores / 2, 12) * CONCURRENCY_FACTOR
-CONCURRENCY := $(shell awk \
+CONCURRENCY := $(shell $(AWK) \
   'BEGIN { \
     c = $(NUM_CORES) / 2; \
     if (c > 12) c = 12; \
@@ -368,8 +368,10 @@
   }')
 JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY)
 
-# Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since we may end up with a lot of JVM's
-JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(shell expr 25 / $(CONCURRENCY))
+# Make sure MaxRAMPercentage is low enough to not cause OOM or swapping since
+# we may end up with a lot of JVM's
+MAX_RAM_PERCENTAGE := $(shell expr 25 / $(CONCURRENCY))
+JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(MAX_RAM_PERCENTAGE)
 
 ifdef EXTRA_JTREG_OPTIONS
   JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)