8147933: Configure check for number of cpus ignores HT on Macosx
Reviewed-by: ihse
--- a/common/autoconf/build-performance.m4 Fri Oct 02 11:48:50 2015 +0300
+++ b/common/autoconf/build-performance.m4 Thu Jan 21 15:08:49 2016 +0100
@@ -37,9 +37,9 @@
# Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes
- elif test -x /usr/sbin/system_profiler; then
+ elif test -x /usr/sbin/sysctl; then
# Looks like a MacOSX system
- NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
+ NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
FOUND_CORES=yes
elif test "x$OPENJDK_BUILD_OS" = xaix ; then
NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print [$]4 }'`
@@ -74,10 +74,10 @@
# Looks like a Solaris or AIX system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'`
FOUND_MEM=yes
- elif test -x /usr/sbin/system_profiler; then
+ elif test -x /usr/sbin/sysctl; then
# Looks like a MacOSX system
- MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
- MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+ MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
+ MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin
--- a/common/autoconf/generated-configure.sh Fri Oct 02 11:48:50 2015 +0300
+++ b/common/autoconf/generated-configure.sh Thu Jan 21 15:08:49 2016 +0100
@@ -4849,7 +4849,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1453279620
+DATE_WHEN_GENERATED=1453385294
###############################################################################
#
@@ -59249,9 +59249,9 @@
# Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes
- elif test -x /usr/sbin/system_profiler; then
+ elif test -x /usr/sbin/sysctl; then
# Looks like a MacOSX system
- NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
+ NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
FOUND_CORES=yes
elif test "x$OPENJDK_BUILD_OS" = xaix ; then
NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
@@ -59303,10 +59303,10 @@
# Looks like a Solaris or AIX system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
FOUND_MEM=yes
- elif test -x /usr/sbin/system_profiler; then
+ elif test -x /usr/sbin/sysctl; then
# Looks like a MacOSX system
- MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print $2}'`
- MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
+ MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
+ MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
FOUND_MEM=yes
elif test "x$OPENJDK_BUILD_OS" = xwindows; then
# Windows, but without cygwin