mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8369305: Adjust usage of CDS in the boot JDK
Reviewed-by: erikj, clanger
This commit is contained in:
parent
2eb0898fef
commit
a3ee821f38
@ -408,27 +408,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
|||||||
AC_MSG_CHECKING([if Boot JDK is 32 or 64 bits])
|
AC_MSG_CHECKING([if Boot JDK is 32 or 64 bits])
|
||||||
AC_MSG_RESULT([$BOOT_JDK_BITS])
|
AC_MSG_RESULT([$BOOT_JDK_BITS])
|
||||||
|
|
||||||
# Try to enable CDS
|
|
||||||
AC_MSG_CHECKING([for local Boot JDK Class Data Sharing (CDS)])
|
|
||||||
BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
|
|
||||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
|
||||||
|
|
||||||
if test "x$boot_jdk_cds_args" != x; then
|
|
||||||
# Try creating a CDS archive
|
|
||||||
$JAVA $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
|
|
||||||
if test $? -eq 0; then
|
|
||||||
BOOTJDK_USE_LOCAL_CDS=true
|
|
||||||
AC_MSG_RESULT([yes, created])
|
|
||||||
else
|
|
||||||
# Generation failed, don't use CDS.
|
|
||||||
BOOTJDK_USE_LOCAL_CDS=false
|
|
||||||
AC_MSG_RESULT([no, creation failed])
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
BOOTJDK_USE_LOCAL_CDS=false
|
|
||||||
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
|
|
||||||
fi
|
|
||||||
|
|
||||||
BOOTJDK_SETUP_CLASSPATH
|
BOOTJDK_SETUP_CLASSPATH
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -447,14 +426,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
|||||||
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=off:stdout],boot_jdk_jvmargs,[$JAVA])
|
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=off:stdout],boot_jdk_jvmargs,[$JAVA])
|
||||||
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=warning:stderr],boot_jdk_jvmargs,[$JAVA])
|
UTIL_ADD_JVM_ARG_IF_OK([-Xlog:all=warning:stderr],boot_jdk_jvmargs,[$JAVA])
|
||||||
|
|
||||||
if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
|
|
||||||
# Use our own CDS archive
|
|
||||||
UTIL_ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
|
||||||
else
|
|
||||||
# Otherwise optimistically use the system-wide one, if one is present
|
|
||||||
UTIL_ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Finally append user provided options to allow them to override.
|
# Finally append user provided options to allow them to override.
|
||||||
UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,3 @@ JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac
|
|||||||
JAR_CMD := $(FIXPATH) $(BOOT_JDK)/bin/jar
|
JAR_CMD := $(FIXPATH) $(BOOT_JDK)/bin/jar
|
||||||
# The bootcycle JVM arguments may differ from the original boot jdk.
|
# The bootcycle JVM arguments may differ from the original boot jdk.
|
||||||
JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
|
JAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||||
# Any CDS settings generated for the bootjdk are invalid in the bootcycle build.
|
|
||||||
# By filtering out those JVM args, the bootcycle JVM will use its default
|
|
||||||
# settings for CDS.
|
|
||||||
JAVA_FLAGS := $(filter-out -XX:SharedArchiveFile% -Xshare%, $(JAVA_FLAGS))
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user