< prev index next >

make/RunTests.gmk

Print this page
rev 59383 : [mq]: final


 220         VM_OPTIONS := $$($1_VM_OPTIONS), \
 221     )) \
 222     $$(eval $1_AOT_OPTIONS += $$($1_$$m_AOT_OPTIONS)) \
 223     $$(eval $1_AOT_TARGETS += $$($1_$$m_AOT_TARGETS)) \
 224   )
 225 endef
 226 
 227 ################################################################################
 228 # Setup global test running parameters
 229 ################################################################################
 230 
 231 # Each factor variable comes in 3 variants. The first one is reserved for users
 232 # to use on command line. The other two are for predifined configurations in JDL
 233 # and for machine specific configurations respectively.
 234 TEST_JOBS_FACTOR ?= 1
 235 TEST_JOBS_FACTOR_JDL ?= 1
 236 TEST_JOBS_FACTOR_MACHINE ?= 1
 237 
 238 ifeq ($(TEST_JOBS), 0)
 239   CORES_DIVIDER := 2
 240   ifeq ($(call isTargetCpuArch, sparc), true)
 241     # For smaller SPARC machines we see reasonable scaling of throughput up to
 242     # cpus/4 without affecting test reliability. On the bigger machines, cpus/4
 243     # causes intermittent timeouts.
 244     ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1)
 245       CORES_DIVIDER := 5
 246     else
 247       CORES_DIVIDER := 4
 248     endif
 249   endif
 250   # For some big multi-core machines with low ulimit -u setting we hit the max
 251   # threads/process limit. In such a setup the memory/cores-only-guided
 252   # TEST_JOBS config is insufficient. From experience a concurrency setting of
 253   # 14 works reasonably well for low ulimit values (<= 4096). Thus, use
 254   # divider 4096/14. For high ulimit -u values this shouldn't make a difference.
 255   ULIMIT_DIVIDER := (4096/14)
 256   PROC_ULIMIT := -1
 257   ifneq ($(OPENJDK_TARGET_OS), windows)
 258     PROC_ULIMIT := $(shell $(ULIMIT) -u)
 259     ifeq ($(PROC_ULIMIT), unlimited)
 260       PROC_ULIMIT := -1
 261     endif
 262   endif
 263   MEMORY_DIVIDER := 2048
 264   TEST_JOBS := $(shell $(AWK) \
 265     'BEGIN { \
 266       c = $(NUM_CORES) / $(CORES_DIVIDER); \
 267       m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
 268       u = $(PROC_ULIMIT); \
 269       if (u > -1) { \


 826   $$(eval $$(call SetJtregValue,$1,JTREG_TEST_MODE,agentvm))
 827   $$(eval $$(call SetJtregValue,$1,JTREG_ASSERT,true))
 828   $$(eval $$(call SetJtregValue,$1,JTREG_MAX_MEM,512m))
 829   $$(eval $$(call SetJtregValue,$1,JTREG_NATIVEPATH))
 830   $$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS))
 831   $$(eval $$(call SetJtregValue,$1,JTREG_PROBLEM_LIST))
 832 
 833   # Only the problem list for the current test root should be used.
 834   $1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST))
 835 
 836   ifneq ($(TEST_JOBS), 0)
 837     $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS)))
 838   else
 839     $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(JOBS)))
 840   endif
 841 
 842   # Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since
 843   # we may end up with a lot of JVM's
 844   $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS))
 845 
 846   # SPARC is in general slower per core so need to scale up timeouts a bit.
 847   ifeq ($(call isTargetCpuArch, sparc), true)
 848     JTREG_TIMEOUT_FACTOR ?= 8
 849   else
 850     JTREG_TIMEOUT_FACTOR ?= 4
 851   endif
 852   JTREG_VERBOSE ?= fail,error,summary
 853   JTREG_RETAIN ?= fail,error
 854   JTREG_RUN_PROBLEM_LISTS ?= false
 855   JTREG_RETRY_COUNT ?= 0
 856 
 857   ifneq ($$($1_JTREG_MAX_MEM), 0)
 858     $1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM)
 859     $1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM)
 860   endif
 861 
 862   $1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
 863       -verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
 864       -concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
 865       -vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE)
 866 
 867   $1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
 868 
 869   # Make it possible to specify the JIB_DATA_DIR for tests using the
 870   # JIB Artifact resolver
 871   $1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR




 220         VM_OPTIONS := $$($1_VM_OPTIONS), \
 221     )) \
 222     $$(eval $1_AOT_OPTIONS += $$($1_$$m_AOT_OPTIONS)) \
 223     $$(eval $1_AOT_TARGETS += $$($1_$$m_AOT_TARGETS)) \
 224   )
 225 endef
 226 
 227 ################################################################################
 228 # Setup global test running parameters
 229 ################################################################################
 230 
 231 # Each factor variable comes in 3 variants. The first one is reserved for users
 232 # to use on command line. The other two are for predifined configurations in JDL
 233 # and for machine specific configurations respectively.
 234 TEST_JOBS_FACTOR ?= 1
 235 TEST_JOBS_FACTOR_JDL ?= 1
 236 TEST_JOBS_FACTOR_MACHINE ?= 1
 237 
 238 ifeq ($(TEST_JOBS), 0)
 239   CORES_DIVIDER := 2










 240   # For some big multi-core machines with low ulimit -u setting we hit the max
 241   # threads/process limit. In such a setup the memory/cores-only-guided
 242   # TEST_JOBS config is insufficient. From experience a concurrency setting of
 243   # 14 works reasonably well for low ulimit values (<= 4096). Thus, use
 244   # divider 4096/14. For high ulimit -u values this shouldn't make a difference.
 245   ULIMIT_DIVIDER := (4096/14)
 246   PROC_ULIMIT := -1
 247   ifneq ($(OPENJDK_TARGET_OS), windows)
 248     PROC_ULIMIT := $(shell $(ULIMIT) -u)
 249     ifeq ($(PROC_ULIMIT), unlimited)
 250       PROC_ULIMIT := -1
 251     endif
 252   endif
 253   MEMORY_DIVIDER := 2048
 254   TEST_JOBS := $(shell $(AWK) \
 255     'BEGIN { \
 256       c = $(NUM_CORES) / $(CORES_DIVIDER); \
 257       m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
 258       u = $(PROC_ULIMIT); \
 259       if (u > -1) { \


 816   $$(eval $$(call SetJtregValue,$1,JTREG_TEST_MODE,agentvm))
 817   $$(eval $$(call SetJtregValue,$1,JTREG_ASSERT,true))
 818   $$(eval $$(call SetJtregValue,$1,JTREG_MAX_MEM,512m))
 819   $$(eval $$(call SetJtregValue,$1,JTREG_NATIVEPATH))
 820   $$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS))
 821   $$(eval $$(call SetJtregValue,$1,JTREG_PROBLEM_LIST))
 822 
 823   # Only the problem list for the current test root should be used.
 824   $1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST))
 825 
 826   ifneq ($(TEST_JOBS), 0)
 827     $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS)))
 828   else
 829     $$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(JOBS)))
 830   endif
 831 
 832   # Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since
 833   # we may end up with a lot of JVM's
 834   $1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS))
 835 




 836   JTREG_TIMEOUT_FACTOR ?= 4
 837 
 838   JTREG_VERBOSE ?= fail,error,summary
 839   JTREG_RETAIN ?= fail,error
 840   JTREG_RUN_PROBLEM_LISTS ?= false
 841   JTREG_RETRY_COUNT ?= 0
 842 
 843   ifneq ($$($1_JTREG_MAX_MEM), 0)
 844     $1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM)
 845     $1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM)
 846   endif
 847 
 848   $1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \
 849       -verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \
 850       -concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \
 851       -vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE)
 852 
 853   $1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet
 854 
 855   # Make it possible to specify the JIB_DATA_DIR for tests using the
 856   # JIB Artifact resolver
 857   $1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR


< prev index next >