From a3ee821f38d0d04f982465f5157170249c92cc49 Mon Sep 17 00:00:00 2001 From: Matthias Baesken Date: Tue, 14 Oct 2025 07:28:28 +0000 Subject: [PATCH] 8369305: Adjust usage of CDS in the boot JDK Reviewed-by: erikj, clanger --- make/autoconf/boot-jdk.m4 | 29 ----------------------- make/autoconf/bootcycle-spec.gmk.template | 4 ---- 2 files changed, 33 deletions(-) diff --git a/make/autoconf/boot-jdk.m4 b/make/autoconf/boot-jdk.m4 index adc9afc349d..b3dbc292919 100644 --- a/make/autoconf/boot-jdk.m4 +++ b/make/autoconf/boot-jdk.m4 @@ -408,27 +408,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK], AC_MSG_CHECKING([if Boot JDK is 32 or 64 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 ]) @@ -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=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. UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA]) diff --git a/make/autoconf/bootcycle-spec.gmk.template b/make/autoconf/bootcycle-spec.gmk.template index 8b6035606a5..d17a95e190a 100644 --- a/make/autoconf/bootcycle-spec.gmk.template +++ b/make/autoconf/bootcycle-spec.gmk.template @@ -44,7 +44,3 @@ JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac JAR_CMD := $(FIXPATH) $(BOOT_JDK)/bin/jar # The bootcycle JVM arguments may differ from the original boot jdk. 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))