35 USE_JTREG_ASSERT := false |
35 USE_JTREG_ASSERT := false |
36 |
36 |
37 LIMIT_JTREG_VM_MEMORY := false |
37 LIMIT_JTREG_VM_MEMORY := false |
38 |
38 |
39 IGNORE_MARKED_TESTS := true |
39 IGNORE_MARKED_TESTS := true |
40 |
|
41 # Get OS name from uname (Cygwin inexplicably adds _NT-5.1) |
|
42 UNAME_S := $(shell uname -s | cut -f1 -d_) |
|
43 |
|
44 ifeq ($(UNAME_S), SunOS) |
|
45 NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line) |
|
46 endif |
|
47 ifeq ($(UNAME_S), Linux) |
|
48 NUM_CORES := $(shell cat /proc/cpuinfo | grep -c processor) |
|
49 endif |
|
50 ifeq ($(UNAME_S), Darwin) |
|
51 NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu) |
|
52 endif |
|
53 ifeq ($(findstring CYGWIN,$(UNAME_S)), CYGWIN) |
|
54 ifneq ($(NUMBER_OF_PROCESSORS), ) |
|
55 NUM_CORES := $(NUMBER_OF_PROCESSORS) |
|
56 else |
|
57 ifneq ($(HOTSPOT_BUILD_JOBS), ) |
|
58 NUM_CORES := $(HOTSPOT_BUILD_JOBS) |
|
59 else |
|
60 NUM_CORES := 1 # fallback |
|
61 endif |
|
62 endif |
|
63 endif |
|
64 |
|
65 ifndef CONCURRENCY_FACTOR |
|
66 CONCURRENCY_FACTOR = 1 |
|
67 endif |
|
68 |
|
69 # Concurrency based on min(cores / 2, 12) * CONCURRENCY_FACTOR |
|
70 CONCURRENCY := $(shell awk \ |
|
71 'BEGIN { \ |
|
72 c = $(NUM_CORES) / 2; \ |
|
73 if (c > 12) c = 12; \ |
|
74 c = c * $(CONCURRENCY_FACTOR); \ |
|
75 if (c < 1) c = 1; \ |
|
76 printf "%.0f", c; \ |
|
77 }') |
|
78 |
|
79 # Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since we may end up with a lot of JVM's |
|
80 JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(shell expr 25 / $(CONCURRENCY)) |
|
81 |
40 |
82 # Include the common base file with most of the logic |
41 # Include the common base file with most of the logic |
83 include ../../TestCommon.gmk |
42 include ../../TestCommon.gmk |
84 |
43 |
85 ################################################################ |
44 ################################################################ |