8160285: Bootcycle builds are broken on jdk9/hs for windows i586
Reviewed-by: dholmes
--- a/common/autoconf/boot-jdk.m4 Wed Jul 05 21:53:18 2017 +0200
+++ b/common/autoconf/boot-jdk.m4 Tue Jun 28 14:20:17 2016 +0200
@@ -359,25 +359,32 @@
# Starting amount of heap memory.
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
+ BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
- # Maximum amount of heap memory.
- # Maximum stack size.
- JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
+ # Maximum amount of heap memory and stack size.
+ JVM_HEAP_LIMIT_32="1100"
+ # Running a 64 bit JVM allows for and requires a bigger heap
+ JVM_HEAP_LIMIT_64="1600"
+ STACK_SIZE_32=768
+ STACK_SIZE_64=1536
+ JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
+ if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
+ JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
+ fi
+ if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
+ JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
+ fi
+ if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
+ JVM_HEAP_LIMIT_32=512
+ JVM_HEAP_LIMIT_64=512
+ fi
+
if test "x$BOOT_JDK_BITS" = "x32"; then
- if test "$JVM_MAX_HEAP" -gt "1100"; then
- JVM_MAX_HEAP=1100
- elif test "$JVM_MAX_HEAP" -lt "512"; then
- JVM_MAX_HEAP=512
- fi
- STACK_SIZE=768
+ STACK_SIZE=$STACK_SIZE_32
+ JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
else
- # Running a 64 bit JVM allows for and requires a bigger heap
- if test "$JVM_MAX_HEAP" -gt "1600"; then
- JVM_MAX_HEAP=1600
- elif test "$JVM_MAX_HEAP" -lt "512"; then
- JVM_MAX_HEAP=512
- fi
- STACK_SIZE=1536
+ STACK_SIZE=$STACK_SIZE_64
+ JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
fi
ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
@@ -387,6 +394,19 @@
JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
AC_SUBST(JAVA_FLAGS_BIG)
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
+ BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
+ BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
+ else
+ BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
+ BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
+ fi
+ BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
+ BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
+ AC_MSG_CHECKING([flags for bootcycle boot jdk java command for big workloads])
+ AC_MSG_RESULT([$BOOTCYCLE_JVM_ARGS_BIG])
+ AC_SUBST(BOOTCYCLE_JVM_ARGS_BIG)
+
# By default, the main javac compilations use big
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
AC_SUBST(JAVA_FLAGS_JAVAC)
--- a/common/autoconf/bootcycle-spec.gmk.in Wed Jul 05 21:53:18 2017 +0200
+++ b/common/autoconf/bootcycle-spec.gmk.in Tue Jun 28 14:20:17 2016 +0200
@@ -66,3 +66,5 @@
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
SJAVAC_SERVER_JAVA_FLAGS:= -Xms256M -Xmx1500M
endif
+# The bootcycle JVM arguments may differ from the original boot jdk.
+JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
--- a/common/autoconf/generated-configure.sh Wed Jul 05 21:53:18 2017 +0200
+++ b/common/autoconf/generated-configure.sh Tue Jun 28 14:20:17 2016 +0200
@@ -644,6 +644,7 @@
JAVA_TOOL_FLAGS_SMALL
JAVA_FLAGS_SMALL
JAVA_FLAGS_JAVAC
+BOOTCYCLE_JVM_ARGS_BIG
JAVA_FLAGS_BIG
JAVA_FLAGS
TEST_JOBS
@@ -5094,7 +5095,7 @@
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1467039751
+DATE_WHEN_GENERATED=1467116399
###############################################################################
#
@@ -65118,25 +65119,32 @@
JVM_ARG_OK=false
fi
-
- # Maximum amount of heap memory.
- # Maximum stack size.
- JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
+ BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
+
+ # Maximum amount of heap memory and stack size.
+ JVM_HEAP_LIMIT_32="1100"
+ # Running a 64 bit JVM allows for and requires a bigger heap
+ JVM_HEAP_LIMIT_64="1600"
+ STACK_SIZE_32=768
+ STACK_SIZE_64=1536
+ JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
+ if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
+ JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
+ fi
+ if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
+ JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
+ fi
+ if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
+ JVM_HEAP_LIMIT_32=512
+ JVM_HEAP_LIMIT_64=512
+ fi
+
if test "x$BOOT_JDK_BITS" = "x32"; then
- if test "$JVM_MAX_HEAP" -gt "1100"; then
- JVM_MAX_HEAP=1100
- elif test "$JVM_MAX_HEAP" -lt "512"; then
- JVM_MAX_HEAP=512
- fi
- STACK_SIZE=768
- else
- # Running a 64 bit JVM allows for and requires a bigger heap
- if test "$JVM_MAX_HEAP" -gt "1600"; then
- JVM_MAX_HEAP=1600
- elif test "$JVM_MAX_HEAP" -lt "512"; then
- JVM_MAX_HEAP=512
- fi
- STACK_SIZE=1536
+ STACK_SIZE=$STACK_SIZE_32
+ JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
+ else
+ STACK_SIZE=$STACK_SIZE_64
+ JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
fi
$ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
@@ -65175,6 +65183,21 @@
JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
+ if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
+ BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
+ BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
+ else
+ BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
+ BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
+ fi
+ BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
+ BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
+$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
+$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
+
+
# By default, the main javac compilations use big
JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"