From 79e4bec836cd710c8d80ea6af59bacc622ca40eb Mon Sep 17 00:00:00 2001 From: apetushkov Date: Mon, 24 Feb 2020 20:09:00 +0300 Subject: [PATCH] 8239479: minimal1 and zero builds are failing Summary: Disable JFR by default when minimal or zero VM build is requested Reviewed-by: andrew --- common/autoconf/generated-configure.sh | 16 ++++++++++++---- common/autoconf/jdk-options.m4 | 14 +++++++++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 37dd1b8..d099ad6 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -4391,7 +4391,7 @@ VS_SDK_PLATFORM_NAME_2017= #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1580996389 +DATE_WHEN_GENERATED=1582132239 ############################################################################### # @@ -19827,13 +19827,21 @@ $as_echo_n "checking whether to build jfr... " >&6; } if test "${enable_jfr+set}" = set; then : enableval=$enable_jfr; else - enable_jfr=yes + enable_jfr=auto fi if test "x$enable_jfr" = "xno"; then ENABLE_JFR=false - elif test "x$enable_jfr" = "xyes"; then - ENABLE_JFR=true + elif test "x$enable_jfr" = "xyes" -o "x$enable_jfr" = "xauto"; then + if test "x$JVM_VARIANT_MINIMAL1" = "xtrue" -o "x$JVM_VARIANT_ZERO" = "xtrue"; then + if test "x$enable_jfr" = "xyes"; then + as_fn_error $? "cannot enable JFR on minimal1 VM or zero build" "$LINENO" 5 + else + ENABLE_JFR=false + fi + else + ENABLE_JFR=true + fi else as_fn_error $? "--enable-jfr must either be set to yes or no" "$LINENO" 5 fi diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4 index ea91c7f..531ab33 100644 --- a/common/autoconf/jdk-options.m4 +++ b/common/autoconf/jdk-options.m4 @@ -442,11 +442,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS], AC_MSG_CHECKING([whether to build jfr]) AC_ARG_ENABLE(jfr, [AS_HELP_STRING([--disable-jfr], [Disable Java Flight Recorder support @<:@enabled@:>@])],, - [enable_jfr=yes]) + [enable_jfr=auto]) if test "x$enable_jfr" = "xno"; then ENABLE_JFR=false - elif test "x$enable_jfr" = "xyes"; then - ENABLE_JFR=true + elif test "x$enable_jfr" = "xyes" -o "x$enable_jfr" = "xauto"; then + if test "x$JVM_VARIANT_MINIMAL1" = "xtrue" -o "x$JVM_VARIANT_ZERO" = "xtrue"; then + if test "x$enable_jfr" = "xyes"; then + AC_MSG_ERROR([cannot enable JFR on minimal1 VM or zero build]) + else + ENABLE_JFR=false + fi + else + ENABLE_JFR=true + fi else AC_MSG_ERROR([--enable-jfr must either be set to yes or no]) fi -- GitLab