提交 93c83f09 编写于 作者: E erikj

8010767: Build fails on OEL6 with 16 cores

Reviewed-by: tbell, ihse
上级 dbbc195c
......@@ -301,35 +301,59 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
if test "x$with_boot_jdk_jvmargs" = x; then
# Not all JVM:s accept the same arguments on the command line.
# OpenJDK specific increase in thread stack for JDK build,
# well more specifically, when running javac.
if test "x$BUILD_NUM_BITS" = x32; then
STACK_SIZE=768
else
# Running Javac on a JVM on a 64-bit machine, the stack takes more space
# since 64-bit pointers are pushed on the stach. Apparently, we need
# to increase the stack space when javacing the JDK....
STACK_SIZE=1536
fi
AC_MSG_CHECKING([flags for boot jdk java command] )
# Minimum amount of heap memory.
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
# Why does macosx need more heap? Its the huge JDK batch.
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
else
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
fi
# When is adding -client something that speeds up the JVM?
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA])
ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA])
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
# Disable special log output when a debug build is used as Boot JDK...
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
# Disable special log output when a debug build is used as Boot JDK...
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
# Apply user provided options.
ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
AC_MSG_RESULT([$boot_jdk_jvmargs])
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
JAVA_FLAGS=$boot_jdk_jvmargs
AC_SUBST(JAVA_FLAGS)
AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
# Starting amount of heap memory.
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
# Maximum amount of heap memory.
# Maximum stack size.
if test "x$BUILD_NUM_BITS" = x32; then
JVM_MAX_HEAP=1100M
STACK_SIZE=768
else
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
# pointers are used. Apparently, we need to increase the heap and stack
# space for the jvm. More specifically, when running javac to build huge
# jdk batch
JVM_MAX_HEAP=1600M
STACK_SIZE=1536
fi
ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs_big,[$JAVA])
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs_big,[$JAVA])
ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs_big,[$JAVA])
AC_MSG_RESULT([$boot_jdk_jvmargs_big])
JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
AC_SUBST(JAVA_FLAGS_BIG)
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
# Use serial gc for small short lived tools if possible
ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
AC_MSG_RESULT([$boot_jdk_jvmargs_small])
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
AC_SUBST(JAVA_FLAGS_SMALL)
])
......@@ -786,7 +786,9 @@ JAXWS_TOPDIR
JAXP_TOPDIR
CORBA_TOPDIR
LANGTOOLS_TOPDIR
BOOT_JDK_JVMARGS
JAVA_FLAGS_SMALL
JAVA_FLAGS_BIG
JAVA_FLAGS
JAVAC_FLAGS
BOOT_JDK_SOURCETARGET
BOOT_JDK
......@@ -3868,7 +3870,7 @@ fi
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1405022087
DATE_WHEN_GENERATED=1413192141
###############################################################################
#
......@@ -16072,20 +16074,55 @@ if test "${with_boot_jdk_jvmargs+set}" = set; then :
fi
if test "x$with_boot_jdk_jvmargs" = x; then
# Not all JVM:s accept the same arguments on the command line.
# OpenJDK specific increase in thread stack for JDK build,
# well more specifically, when running javac.
if test "x$BUILD_NUM_BITS" = x32; then
STACK_SIZE=768
else
# Running Javac on a JVM on a 64-bit machine, the stack takes more space
# since 64-bit pointers are pushed on the stach. Apparently, we need
# to increase the stack space when javacing the JDK....
STACK_SIZE=1536
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
$as_echo_n "checking flags for boot jdk java command ... " >&6; }
# Disable special log output when a debug build is used as Boot JDK...
$ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
$ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
$ECHO "$OUTPUT" >&5
JVM_ARG_OK=false
fi
# Apply user provided options.
$ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
$ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
$ECHO "$OUTPUT" >&5
JVM_ARG_OK=false
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
$as_echo "$boot_jdk_jvmargs" >&6; }
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
JAVA_FLAGS=$boot_jdk_jvmargs
# Minimum amount of heap memory.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
# Starting amount of heap memory.
$ECHO "Check if jvm arg is ok: -Xms64M" >&5
$ECHO "Command: $JAVA -Xms64M -version" >&5
......@@ -16093,7 +16130,7 @@ fi
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
......@@ -16101,16 +16138,28 @@ fi
JVM_ARG_OK=false
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
# Why does macosx need more heap? Its the huge JDK batch.
$ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
$ECHO "Command: $JAVA -Xmx1600M -version" >&5
OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
# Maximum amount of heap memory.
# Maximum stack size.
if test "x$BUILD_NUM_BITS" = x32; then
JVM_MAX_HEAP=1100M
STACK_SIZE=768
else
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
# pointers are used. Apparently, we need to increase the heap and stack
# space for the jvm. More specifically, when running javac to build huge
# jdk batch
JVM_MAX_HEAP=1600M
STACK_SIZE=1536
fi
$ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
$ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
......@@ -16118,15 +16167,14 @@ fi
JVM_ARG_OK=false
fi
else
$ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
$ECHO "Command: $JAVA -Xmx1100M -version" >&5
OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
$ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
$ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
......@@ -16134,9 +16182,6 @@ fi
JVM_ARG_OK=false
fi
fi
# When is adding -client something that speeds up the JVM?
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
$ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
$ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
......@@ -16144,7 +16189,7 @@ fi
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:PermSize=32m"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
......@@ -16159,7 +16204,7 @@ fi
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:MaxPermSize=160m"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
......@@ -16168,13 +16213,25 @@ fi
fi
$ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
$ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
$as_echo "$boot_jdk_jvmargs_big" >&6; }
JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
# Use serial gc for small short lived tools if possible
$ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
$ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
......@@ -16182,15 +16239,14 @@ fi
JVM_ARG_OK=false
fi
# Disable special log output when a debug build is used as Boot JDK...
$ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
$ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
$ECHO "Check if jvm arg is ok: -Xms32M" >&5
$ECHO "Command: $JAVA -Xms32M -version" >&5
OUTPUT=`$JAVA -Xms32M -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
......@@ -16198,9 +16254,26 @@ fi
JVM_ARG_OK=false
fi
$ECHO "Check if jvm arg is ok: -Xmx512M" >&5
$ECHO "Command: $JAVA -Xmx512M -version" >&5
OUTPUT=`$JAVA -Xmx512M -version 2>&1`
FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&5
$ECHO "$OUTPUT" >&5
JVM_ARG_OK=false
fi
BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
$as_echo "$boot_jdk_jvmargs_small" >&6; }
JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
......@@ -249,7 +249,6 @@ BUILD_HOTSPOT=@BUILD_HOTSPOT@
# The boot jdk to use
BOOT_JDK:=@BOOT_JDK@
BOOT_JDK_JVMARGS:=@BOOT_JDK_JVMARGS@
BOOT_RTJAR:=@BOOT_RTJAR@
BOOT_TOOLSJAR=$(BOOT_JDK)/lib/tools.jar
......@@ -436,9 +435,12 @@ OBJ_SUFFIX:=@OBJ_SUFFIX@
POST_STRIP_CMD:=@POST_STRIP_CMD@
POST_MCS_CMD:=@POST_MCS_CMD@
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
JAVA_FLAGS:=@JAVA_FLAGS@
JAVA_FLAGS_BIG:=@JAVA_FLAGS_BIG@
JAVA_FLAGS_SMALL:=@JAVA_FLAGS_SMALL@
JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS)
JAVA=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL=@FIXPATH@ $(BOOT_JDK)/bin/java $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
JAVAC=@FIXPATH@ $(BOOT_JDK)/bin/javac
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
......@@ -451,7 +453,7 @@ JAR=@FIXPATH@ $(BOOT_JDK)/bin/jar
RMIC=@FIXPATH@ $(BOOT_JDK)/bin/rmic
NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii
NATIVE2ASCII=@FIXPATH@ $(BOOT_JDK)/bin/native2ascii $(addprefix -J, $(JAVA_FLAGS_SMALL))
JARSIGNER=@FIXPATH@ $(BOOT_JDK)/bin/jarsigner
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册