1.1 --- a/common/autoconf/build-performance.m4 Wed Oct 24 13:11:42 2012 -0700 1.2 +++ b/common/autoconf/build-performance.m4 Fri Oct 26 14:29:57 2012 -0700 1.3 @@ -41,6 +41,10 @@ 1.4 # Looks like a MacOSX system 1.5 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'` 1.6 FOUND_CORES=yes 1.7 + elif test -n "$NUMBER_OF_PROCESSORS"; then 1.8 + # On windows, look in the env 1.9 + NUM_CORES=$NUMBER_OF_PROCESSORS 1.10 + FOUND_CORES=yes 1.11 fi 1.12 1.13 # For c/c++ code we run twice as many concurrent build 1.14 @@ -50,7 +54,8 @@ 1.15 if test "x$FOUND_CORES" = xyes; then 1.16 AC_MSG_RESULT([$NUM_CORES]) 1.17 else 1.18 - AC_MSG_RESULT([could not detect number of cores, defaulting to 1!]) 1.19 + AC_MSG_RESULT([could not detect number of cores, defaulting to 1]) 1.20 + AC_MSG_WARN([This will disable all parallelism from build!]) 1.21 fi 1.22 1.23 ]) 1.24 @@ -76,16 +81,18 @@ 1.25 MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'` 1.26 MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024` 1.27 FOUND_MEM=yes 1.28 - elif test "x$build_os" = xwindows; then 1.29 + elif test "x$OPENJDK_BUILD_OS" = xwindows; then 1.30 # Windows, but without cygwin 1.31 - MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'` 1.32 + MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-` 1.33 + MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024` 1.34 FOUND_MEM=yes 1.35 fi 1.36 1.37 if test "x$FOUND_MEM" = xyes; then 1.38 AC_MSG_RESULT([$MEMORY_SIZE MB]) 1.39 else 1.40 - AC_MSG_RESULT([could not detect memory size defaulting to 1024 MB!]) 1.41 + AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB]) 1.42 + AC_MSG_WARN([This might seriously impact build performance!]) 1.43 fi 1.44 ]) 1.45 1.46 @@ -123,7 +130,7 @@ 1.47 [ 1.48 AC_ARG_ENABLE([ccache], 1.49 [AS_HELP_STRING([--disable-ccache], 1.50 - [use ccache to speed up recompilations @<:@enabled@:>@])], 1.51 + [disable using ccache to speed up recompilations @<:@enabled@:>@])], 1.52 [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes]) 1.53 if test "x$ENABLE_CCACHE" = xyes; then 1.54 AC_PATH_PROG(CCACHE, ccache) 1.55 @@ -196,7 +203,7 @@ 1.56 # Can the C/C++ compiler use precompiled headers? 1.57 # 1.58 AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers], 1.59 - [use precompiled headers when compiling C++ @<:@enabled@:>@])], 1.60 + [disable using precompiled headers when compiling C++ @<:@enabled@:>@])], 1.61 [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes]) 1.62 1.63 USE_PRECOMPILED_HEADER=1 1.64 @@ -228,8 +235,7 @@ 1.65 AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC], 1.66 [ 1.67 AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java], 1.68 - [use this java binary for running the sjavac background server and other long running java tasks in the build process, 1.69 - e.g. ---with-sjavac-server-java="/opt/jrockit/bin/java -server"])]) 1.70 + [use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])]) 1.71 1.72 if test "x$with_sjavac_server_java" != x; then 1.73 SJAVAC_SERVER_JAVA="$with_sjavac_server_java"