test/TestCommon.gmk
changeset 48693 a2d550f08617
parent 48677 62b6e9b1dfdc
child 48980 ab7784555b4c
equal deleted inserted replaced
48692:60c19c384333 48693:a2d550f08617
   356 ifndef CONCURRENCY_FACTOR
   356 ifndef CONCURRENCY_FACTOR
   357   CONCURRENCY_FACTOR = 1
   357   CONCURRENCY_FACTOR = 1
   358 endif
   358 endif
   359 
   359 
   360 # Concurrency based on min(cores / 2, 12) * CONCURRENCY_FACTOR
   360 # Concurrency based on min(cores / 2, 12) * CONCURRENCY_FACTOR
   361 CONCURRENCY := $(shell awk \
   361 CONCURRENCY := $(shell $(AWK) \
   362   'BEGIN { \
   362   'BEGIN { \
   363     c = $(NUM_CORES) / 2; \
   363     c = $(NUM_CORES) / 2; \
   364     if (c > 12) c = 12; \
   364     if (c > 12) c = 12; \
   365     c = c * $(CONCURRENCY_FACTOR); \
   365     c = c * $(CONCURRENCY_FACTOR); \
   366     if (c < 1) c = 1; \
   366     if (c < 1) c = 1; \
   367     printf "%.0f", c; \
   367     printf "%.0f", c; \
   368   }')
   368   }')
   369 JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY)
   369 JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY)
   370 
   370 
   371 # Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since we may end up with a lot of JVM's
   371 # Make sure MaxRAMPercentage is low enough to not cause OOM or swapping since
   372 JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(shell expr 25 / $(CONCURRENCY))
   372 # we may end up with a lot of JVM's
       
   373 MAX_RAM_PERCENTAGE := $(shell expr 25 / $(CONCURRENCY))
       
   374 JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(MAX_RAM_PERCENTAGE)
   373 
   375 
   374 ifdef EXTRA_JTREG_OPTIONS
   376 ifdef EXTRA_JTREG_OPTIONS
   375   JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
   377   JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
   376 endif
   378 endif
   377 
   379