diff --git a/closed/OpenJ9.gmk b/closed/OpenJ9.gmk index 6857410a83f..c78c6fe3ba2 100644 --- a/closed/OpenJ9.gmk +++ b/closed/OpenJ9.gmk @@ -1,5 +1,5 @@ # =========================================================================== -# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved +# (c) Copyright IBM Corp. 2017, 2024 All Rights Reserved # =========================================================================== # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as @@ -180,6 +180,13 @@ else SPEC_SED_SCRIPT += $(call SedDisable,module_ddr) endif +# Adjust JFR enablement flags. +ifeq (true,$(OPENJ9_ENABLE_JFR)) + FEATURE_SED_SCRIPT += $(call SedEnable,opt_jfr) +else + FEATURE_SED_SCRIPT += $(call SedDisable,opt_jfr) +endif + # Adjust JITServer enablement flags. ifeq (true,$(OPENJ9_ENABLE_JITSERVER)) FEATURE_SED_SCRIPT += $(call SedEnable,opt_jitserver) @@ -349,6 +356,12 @@ ifneq (,$(CCACHE)) CMAKE_ARGS += "-DCMAKE_C_COMPILER_LAUNCHER=$(ESCAPED_CCACHE)" endif # CCACHE +ifeq (true,$(OPENJ9_ENABLE_JFR)) + CMAKE_ARGS += -DJ9VM_OPT_JFR=ON +else # OPENJ9_ENABLE_JFR + CMAKE_ARGS += -DJ9VM_OPT_JFR=OFF +endif # OPENJ9_ENABLE_JFR + ifeq (true,$(OPENJ9_ENABLE_JITSERVER)) CMAKE_ARGS += -DJ9VM_OPT_JITSERVER=ON diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 7ae43a7c1ba..3e7cdeaf00d 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -1018,6 +1018,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1265,6 +1266,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1517,6 +1519,15 @@ do | -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=* \ @@ -1654,7 +1665,7 @@ fi 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. @@ -1807,6 +1818,7 @@ Fine tuning of the installation directories: --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] @@ -4455,7 +4467,7 @@ VS_TOOLSET_SUPPORTED_2022=true #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1709065899 +DATE_WHEN_GENERATED=1711567483 ############################################################################### # diff --git a/jdk/make/closed/autoconf/custom-hook.m4 b/jdk/make/closed/autoconf/custom-hook.m4 index 1be7d97ae7d..ce36dad5909 100644 --- a/jdk/make/closed/autoconf/custom-hook.m4 +++ b/jdk/make/closed/autoconf/custom-hook.m4 @@ -45,6 +45,7 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK], OPENJ9_CONFIGURE_DDR OPENJ9_CONFIGURE_DEMOS OPENJ9_CONFIGURE_HEALTHCENTER + OPENJ9_CONFIGURE_JFR OPENJ9_CONFIGURE_JITSERVER OPENJ9_CONFIGURE_OPENJDK_METHODHANDLES OPENJ9_CONFIGURE_WARNINGS @@ -291,6 +292,32 @@ AC_DEFUN([OPENJ9_PLATFORM_EXTRACT_VARS_FROM_CPU], esac ]) +AC_DEFUN([OPENJ9_CONFIGURE_JFR], +[ + AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr], [enable JFR support @<:@platform dependent@:>@])]) + AC_MSG_CHECKING([for jfr]) + OPENJ9_ENABLE_JFR=false + if test "x$enable_jfr" = xyes ; then + AC_MSG_RESULT([yes (explicitly enabled)]) + OPENJ9_ENABLE_JFR=true + elif test "x$enable_jfr" = xno ; then + AC_MSG_RESULT([no (explicitly disabled)]) + elif test "x$enable_jfr" = x ; then + case "$OPENJ9_PLATFORM_CODE" in + xa64) + AC_MSG_RESULT([yes (default)]) + OPENJ9_ENABLE_JFR=true + ;; + *) + AC_MSG_RESULT([no (default)]) + ;; + esac + else + AC_MSG_ERROR([--enable-jfr accepts no argument]) + fi + AC_SUBST(OPENJ9_ENABLE_JFR) +]) + AC_DEFUN([OPENJ9_CONFIGURE_JITSERVER], [ AC_ARG_ENABLE([jitserver], [AS_HELP_STRING([--enable-jitserver], [enable JITServer support @<:@disabled@:>@])]) diff --git a/jdk/make/closed/autoconf/custom-spec.gmk.in b/jdk/make/closed/autoconf/custom-spec.gmk.in index 9d5d7c1ccab..b18a0898d90 100644 --- a/jdk/make/closed/autoconf/custom-spec.gmk.in +++ b/jdk/make/closed/autoconf/custom-spec.gmk.in @@ -59,6 +59,7 @@ OPENJ9_ENABLE_CRIU_SUPPORT := @OPENJ9_ENABLE_CRIU_SUPPORT@ OPENJ9_ENABLE_DDR := @OPENJ9_ENABLE_DDR@ OPENJ9_ENABLE_DEMOS := @OPENJ9_ENABLE_DEMOS@ OPENJ9_ENABLE_INLINE_TYPES := @OPENJ9_ENABLE_INLINE_TYPES@ +OPENJ9_ENABLE_JFR := @OPENJ9_ENABLE_JFR@ OPENJ9_ENABLE_JITSERVER := @OPENJ9_ENABLE_JITSERVER@ OPENJ9_ENABLE_OPENJDK_METHODHANDLES := @OPENJ9_ENABLE_OPENJDK_METHODHANDLES@ diff --git a/jdk/make/closed/autoconf/generated-configure.sh b/jdk/make/closed/autoconf/generated-configure.sh index fcfc5571569..ed1b8a9b995 100644 --- a/jdk/make/closed/autoconf/generated-configure.sh +++ b/jdk/make/closed/autoconf/generated-configure.sh @@ -900,6 +900,7 @@ WARNINGS_AS_ERRORS_OPENJ9 WARNINGS_AS_ERRORS_OMR OPENJ9_ENABLE_OPENJDK_METHODHANDLES OPENJ9_ENABLE_JITSERVER +OPENJ9_ENABLE_JFR HEALTHCENTER_JAR OPENJ9_ENABLE_DEMOS OPENJ9_ENABLE_DDR @@ -1056,6 +1057,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1099,6 +1101,7 @@ enable_cuda enable_ddr enable_demos with_healthcenter +enable_jfr enable_jitserver enable_openjdk_methodhandles enable_warnings_as_errors_omr @@ -1122,7 +1125,6 @@ enable_headful enable_hotspot_test_in_build with_cacerts_file enable_unlimited_crypto -enable_jfr with_milestone with_update_version with_user_release_suffix @@ -1329,6 +1331,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1581,6 +1584,15 @@ do | -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=* \ @@ -1718,7 +1730,7 @@ fi 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. @@ -1871,6 +1883,7 @@ Fine tuning of the installation directories: --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] @@ -1917,6 +1930,7 @@ Optional Features: --enable-cuda enable CUDA support [disabled] --enable-ddr enable DDR support [disabled] --enable-demos include demos in jdk image [disabled] + --enable-jfr enable JFR support [platform dependent] --enable-jitserver enable JITServer support [disabled] --enable-openjdk-methodhandles enable support for OpenJDK MethodHandles [disabled] @@ -4612,6 +4626,8 @@ VS_TOOLSET_SUPPORTED_2022=true + + @@ -4625,7 +4641,7 @@ VS_TOOLSET_SUPPORTED_2022=true # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1709065899 +DATE_WHEN_GENERATED=1711567483 ############################################################################### # @@ -16644,6 +16660,39 @@ fi + # Check whether --enable-jfr was given. +if test "${enable_jfr+set}" = set; then : + enableval=$enable_jfr; +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jfr" >&5 +$as_echo_n "checking for jfr... " >&6; } + OPENJ9_ENABLE_JFR=false + if test "x$enable_jfr" = xyes ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly enabled)" >&5 +$as_echo "yes (explicitly enabled)" >&6; } + OPENJ9_ENABLE_JFR=true + elif test "x$enable_jfr" = xno ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (explicitly disabled)" >&5 +$as_echo "no (explicitly disabled)" >&6; } + elif test "x$enable_jfr" = x ; then + case "$OPENJ9_PLATFORM_CODE" in + xa64) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5 +$as_echo "yes (default)" >&6; } + OPENJ9_ENABLE_JFR=true + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5 +$as_echo "no (default)" >&6; } + ;; + esac + else + as_fn_error $? "--enable-jfr accepts no argument" "$LINENO" 5 + fi + + + # Check whether --enable-jitserver was given. if test "${enable_jitserver+set}" = set; then : enableval=$enable_jitserver;