Merge
This commit is contained in:
commit
54ccd49af7
@ -1404,12 +1404,14 @@ static HANDLE open_sharedmem_object(const char* objectname, DWORD ofm_access, TR
|
|||||||
objectname); /* name for object */
|
objectname); /* name for object */
|
||||||
|
|
||||||
if (fmh == NULL) {
|
if (fmh == NULL) {
|
||||||
|
DWORD lasterror = GetLastError();
|
||||||
if (PrintMiscellaneous && Verbose) {
|
if (PrintMiscellaneous && Verbose) {
|
||||||
warning("OpenFileMapping failed for shared memory object %s:"
|
warning("OpenFileMapping failed for shared memory object %s:"
|
||||||
" lasterror = %d\n", objectname, GetLastError());
|
" lasterror = %d\n", objectname, lasterror);
|
||||||
}
|
}
|
||||||
THROW_MSG_(vmSymbols::java_lang_Exception(),
|
THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
|
||||||
"Could not open PerfMemory", INVALID_HANDLE_VALUE);
|
err_msg("Could not open PerfMemory, error %d", lasterror),
|
||||||
|
INVALID_HANDLE_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmh;;
|
return fmh;;
|
||||||
|
@ -66,6 +66,7 @@ ifeq ($(UNAME_S), SunOS)
|
|||||||
ifeq ($(ARCH), i386)
|
ifeq ($(ARCH), i386)
|
||||||
ARCH=i586
|
ARCH=i586
|
||||||
endif
|
endif
|
||||||
|
NUM_CORES := $(shell LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line)
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAME_S), Linux)
|
ifeq ($(UNAME_S), Linux)
|
||||||
PLATFORM = linux
|
PLATFORM = linux
|
||||||
@ -74,6 +75,7 @@ ifeq ($(UNAME_S), Linux)
|
|||||||
ifeq ($(ARCH), i386)
|
ifeq ($(ARCH), i386)
|
||||||
ARCH = i586
|
ARCH = i586
|
||||||
endif
|
endif
|
||||||
|
NUM_CORES := $(shell cat /proc/cpuinfo | grep -c processor)
|
||||||
endif
|
endif
|
||||||
ifeq ($(UNAME_S), Darwin)
|
ifeq ($(UNAME_S), Darwin)
|
||||||
PLATFORM = bsd
|
PLATFORM = bsd
|
||||||
@ -82,6 +84,7 @@ ifeq ($(UNAME_S), Darwin)
|
|||||||
ifeq ($(ARCH), i386)
|
ifeq ($(ARCH), i386)
|
||||||
ARCH = i586
|
ARCH = i586
|
||||||
endif
|
endif
|
||||||
|
NUM_CORES := $(shell /usr/sbin/sysctl -n hw.ncpu)
|
||||||
endif
|
endif
|
||||||
ifeq ($(findstring BSD,$(UNAME_S)), BSD)
|
ifeq ($(findstring BSD,$(UNAME_S)), BSD)
|
||||||
PLATFORM = bsd
|
PLATFORM = bsd
|
||||||
@ -115,6 +118,13 @@ ifeq ($(PLATFORM),)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
EXESUFFIX = .exe
|
EXESUFFIX = .exe
|
||||||
|
ifneq ($(NUMBER_OF_PROCESSORS), )
|
||||||
|
NUM_CORES := $(NUMBER_OF_PROCESSORS)
|
||||||
|
else
|
||||||
|
ifneq ($(HOTSPOT_BUILD_JOBS), )
|
||||||
|
NUM_CORES := $(HOTSPOT_BUILD_JOBS)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef ALT_SLASH_JAVA
|
ifdef ALT_SLASH_JAVA
|
||||||
@ -308,9 +318,22 @@ ifdef TESTDIRS
|
|||||||
TEST_SELECTION = $(TESTDIRS)
|
TEST_SELECTION = $(TESTDIRS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CONCURRENCY
|
# Concurrency based on min(cores / 2, 12)
|
||||||
JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY)
|
ifdef NUM_CORES
|
||||||
|
CONCURRENCY := $(shell expr $(NUM_CORES) / 2)
|
||||||
|
ifeq ($(CONCURRENCY), 0)
|
||||||
|
CONCURRENCY := 1
|
||||||
|
else ifeq ($(shell expr $(CONCURRENCY) \> 12), 1)
|
||||||
|
CONCURRENCY := 12
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
CONCURRENCY := 1
|
||||||
|
endif
|
||||||
|
JTREG_BASIC_OPTIONS += -concurrency:$(CONCURRENCY)
|
||||||
|
|
||||||
|
# Make sure MaxRAMFraction 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:MaxRAMFraction=$(shell expr $(CONCURRENCY) \* 4)
|
||||||
|
|
||||||
ifdef EXTRA_JTREG_OPTIONS
|
ifdef EXTRA_JTREG_OPTIONS
|
||||||
JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
|
JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user