提交 ca67f477 编写于 作者: K katleman

Merge

...@@ -23,14 +23,23 @@ ...@@ -23,14 +23,23 @@
# questions. # questions.
# #
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2\
# Also set JVM_ARG_OK to true/false depending on outcome.
AC_DEFUN([ADD_JVM_ARG_IF_OK], AC_DEFUN([ADD_JVM_ARG_IF_OK],
[ [
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) $ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
# If so, then append $1 to $2 $ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn` OUTPUT=`$3 $1 -version 2>&1`
FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""` 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 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
$2="[$]$2 $1" $2="[$]$2 $1"
JVM_ARG_OK=true
else
$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
JVM_ARG_OK=false
fi fi
]) ])
...@@ -51,16 +60,19 @@ AC_DEFUN([BASIC_FIXUP_PATH], ...@@ -51,16 +60,19 @@ AC_DEFUN([BASIC_FIXUP_PATH],
else else
# We're on a posix platform. Hooray! :) # We're on a posix platform. Hooray! :)
path="[$]$1" path="[$]$1"
if test ! -f "$path" && test ! -d "$path"; then
AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
fi
has_space=`$ECHO "$path" | $GREP " "` has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then if test "x$has_space" != x; then
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.]) AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
AC_MSG_ERROR([Spaces are not allowed in this path.]) AC_MSG_ERROR([Spaces are not allowed in this path.])
fi fi
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
fi
$1="`cd "$path"; $THEPWDCMD`"
fi fi
]) ])
......
...@@ -278,60 +278,37 @@ else ...@@ -278,60 +278,37 @@ else
fi fi
AC_SUBST(SJAVAC_SERVER_JAVA) AC_SUBST(SJAVAC_SERVER_JAVA)
AC_ARG_WITH(sjavac-server-cores, [AS_HELP_STRING([--with-sjavac-server-cores], if test "$MEMORY_SIZE" -gt "2500"; then
[use at most this number of concurrent threads on the sjavac server @<:@probed@:>@])]) ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
if test "x$with_sjavac_server_cores" != x; then if test "$JVM_ARG_OK" = true; then
SJAVAC_SERVER_CORES="$with_sjavac_server_cores" JVM_64BIT=true
else JVM_ARG_OK=false
if test "$NUM_CORES" -gt 16; then fi
# We set this arbitrary limit because we want to limit the heap
# size of the javac server.
# In the future we will make the javac compilers in the server
# share more and more state, thus enabling us to use more and
# more concurrent threads in the server.
SJAVAC_SERVER_CORES="16"
else
SJAVAC_SERVER_CORES="$NUM_CORES"
fi fi
if test "$JVM_64BIT" = true; then
if test "$MEMORY_SIZE" -gt "17000"; then if test "$MEMORY_SIZE" -gt "17000"; then
MAX_HEAP_MEM=10000
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "10000"; then fi
MAX_HEAP_MEM=6000 if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "5000"; then fi
MAX_HEAP_MEM=3000 if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "3800"; then
MAX_HEAP_MEM=2500
ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "1900"; then
MAX_HEAP_MEM=1200
ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1400M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
elif test "$MEMORY_SIZE" -gt "1000"; then
MAX_HEAP_MEM=900
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
else
MAX_HEAP_MEM=512
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi fi
if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA]) ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
AC_MSG_CHECKING([if number of server cores must be reduced])
SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
AC_MSG_RESULT([yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB])
fi fi
fi fi
AC_SUBST(SJAVAC_SERVER_CORES) if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi
if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi
if test "$JVM_ARG_OK" = false; then
ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
fi
AC_MSG_CHECKING([whether to use sjavac]) AC_MSG_CHECKING([whether to use sjavac])
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac], AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
......
...@@ -528,6 +528,8 @@ HG:=@HG@ ...@@ -528,6 +528,8 @@ HG:=@HG@
OBJCOPY:=@OBJCOPY@ OBJCOPY:=@OBJCOPY@
SETFILE:=@SETFILE@ SETFILE:=@SETFILE@
XATTR:=@XATTR@ XATTR:=@XATTR@
JT_HOME:=@JT_HOME@
JTREGEXE:=@JTREGEXE@
FIXPATH:=@FIXPATH@ FIXPATH:=@FIXPATH@
......
...@@ -479,6 +479,8 @@ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then ...@@ -479,6 +479,8 @@ if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
BASIC_FIXUP_EXECUTABLE(LIPO) BASIC_FIXUP_EXECUTABLE(LIPO)
fi fi
TOOLCHAIN_SETUP_JTREG
# Restore old path without tools dir # Restore old path without tools dir
PATH="$OLD_PATH" PATH="$OLD_PATH"
]) ])
...@@ -1089,3 +1091,29 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC], ...@@ -1089,3 +1091,29 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC],
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false]) [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG) AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
]) ])
# Setup the JTREG paths
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
[
AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg],
[Regression Test Harness @<:@probed@:>@])])
AC_MSG_CHECKING([for JTReg Regression Test Harness])
if test "x$with_jtreg" != x; then
JT_HOME="$with_jtreg"
BASIC_FIXUP_PATH([JT_HOME])
AC_MSG_RESULT($JT_HOME)
# jtreg win32 script works for everybody
JTREGEXE="$JT_HOME/win32/bin/jtreg"
if test ! -f "$JTREGEXE"; then
AC_MSG_ERROR([JTReg executable does not exist: $JTREGEXE])
fi
else
AC_MSG_RESULT(no)
fi
AC_SUBST(JT_HOME)
AC_SUBST(JTREGEXE)
])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册