# HG changeset patch # User goetz # Date 1504189800 -7200 # Node ID b3d69cbe27905dbf6b0624d19fe9855385c5226d # Parent 30a5133acb6b4cadd23bcdd67de52d28e65cff55 8186978: Introduce configure argument enable-cds Reviewed-by: dholmes, erikj, ihse diff --git a/common/autoconf/configure.ac b/common/autoconf/configure.ac --- a/common/autoconf/configure.ac +++ b/common/autoconf/configure.ac @@ -209,6 +209,7 @@ # Need toolchain to setup dtrace HOTSPOT_SETUP_DTRACE HOTSPOT_ENABLE_DISABLE_AOT +HOTSPOT_ENABLE_DISABLE_CDS HOTSPOT_ENABLE_DISABLE_GTEST ############################################################################### diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -702,6 +702,7 @@ FIXPATH_DETACH_FLAG FIXPATH BUILD_GTEST +ENABLE_CDS ENABLE_AOT GCOV_ENABLED ZIP_EXTERNAL_DEBUG_SYMBOLS @@ -1101,6 +1102,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1191,6 +1193,7 @@ enable_native_coverage enable_dtrace enable_aot +enable_cds enable_hotspot_gtest with_stdc__lib with_msvcr_dll @@ -1390,6 +1393,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1642,6 +1646,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1779,7 +1792,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1932,6 +1945,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1999,6 +2013,8 @@ enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present. + --enable-cds[=yes/no] enable class data sharing feature in non-minimal VM. + Default is yes. --disable-hotspot-gtest Disables building of the Hotspot unit tests --disable-freetype-bundling disable bundling of the freetype library with the @@ -2016,7 +2032,8 @@ --disable-generate-classlist forces enabling or disabling of the generation of a CDS classlist at build time. Default is to generate - it when either the server or client JVMs are built. + it when either the server or client JVMs are built + and enable-cds is true. --enable-sjavac use sjavac to do fast incremental compiles [disabled] --disable-javac-server disable javac server [enabled] @@ -4345,6 +4362,11 @@ # +################################################################################ +# Allow to disable CDS +# + + ############################################################################### # Set up all JVM features for each JVM variant. # @@ -5151,7 +5173,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1504187184 +DATE_WHEN_GENERATED=1504189759 ############################################################################### # @@ -54216,6 +54238,23 @@ + # Check whether --enable-cds was given. +if test "${enable_cds+set}" = set; then : + enableval=$enable_cds; +fi + + + if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then + ENABLE_CDS="true" + elif test "x$enable_cds" = "xno"; then + ENABLE_CDS="false" + else + as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5 + fi + + + + # Check whether --enable-hotspot-gtest was given. if test "${enable_hotspot_gtest+set}" = set; then : enableval=$enable_hotspot_gtest; @@ -65856,7 +65895,10 @@ fi # All variants but minimal (and custom) get these features - NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds" + NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt" + if test "x$ENABLE_CDS" = "xtrue"; then + NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds" + fi # Enable features depending on variant. JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal" @@ -65960,7 +66002,7 @@ # Check if it's likely that it's possible to generate the classlist. Depending # on exact jvm configuration it could be possible anyway. - if [[ " $JVM_VARIANTS " =~ " server " ]] || [[ " $JVM_VARIANTS " =~ " client " ]] ; then + if test "x$ENABLE_CDS" = "xtrue" && ( [[ " $JVM_VARIANTS " =~ " server " ]] || [[ " $JVM_VARIANTS " =~ " client " ]] ); then ENABLE_GENERATE_CLASSLIST_POSSIBLE="true" else ENABLE_GENERATE_CLASSLIST_POSSIBLE="false" @@ -65973,8 +66015,8 @@ $as_echo "yes, forced" >&6; } ENABLE_GENERATE_CLASSLIST="true" if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5 -$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&5 +$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;} fi elif test "x$enable_generate_classlist" = "xno"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5 diff --git a/common/autoconf/hotspot.m4 b/common/autoconf/hotspot.m4 --- a/common/autoconf/hotspot.m4 +++ b/common/autoconf/hotspot.m4 @@ -240,6 +240,25 @@ AC_SUBST(ENABLE_AOT) ]) +################################################################################ +# Allow to disable CDS +# +AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS], +[ + AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no@:>@], + [enable class data sharing feature in non-minimal VM. Default is yes.])]) + + if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then + ENABLE_CDS="true" + elif test "x$enable_cds" = "xno"; then + ENABLE_CDS="false" + else + AC_MSG_ERROR([Invalid value for --enable-cds: $enable_cds]) + fi + + AC_SUBST(ENABLE_CDS) +]) + ############################################################################### # Set up all JVM features for each JVM variant. # @@ -374,7 +393,10 @@ fi # All variants but minimal (and custom) get these features - NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds" + NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt" + if test "x$ENABLE_CDS" = "xtrue"; then + NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds" + fi # Enable features depending on variant. JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal" diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 --- a/common/autoconf/jdk-options.m4 +++ b/common/autoconf/jdk-options.m4 @@ -496,11 +496,12 @@ [ AC_ARG_ENABLE([generate-classlist], [AS_HELP_STRING([--disable-generate-classlist], [forces enabling or disabling of the generation of a CDS classlist at build time. - Default is to generate it when either the server or client JVMs are built.])]) + Default is to generate it when either the server or client JVMs are built and + enable-cds is true.])]) # Check if it's likely that it's possible to generate the classlist. Depending # on exact jvm configuration it could be possible anyway. - if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client); then + if test "x$ENABLE_CDS" = "xtrue" && (HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client)); then ENABLE_GENERATE_CLASSLIST_POSSIBLE="true" else ENABLE_GENERATE_CLASSLIST_POSSIBLE="false" @@ -511,7 +512,7 @@ AC_MSG_RESULT([yes, forced]) ENABLE_GENERATE_CLASSLIST="true" if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then - AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS]) + AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS]) fi elif test "x$enable_generate_classlist" = "xno"; then AC_MSG_RESULT([no, forced])