Skip to content

Commit

Permalink
Merge pull request #764 from tajila/openj9
Browse files Browse the repository at this point in the history
Add JFR flags
  • Loading branch information
keithc-ca authored Mar 27, 2024
2 parents d4a1f43 + 6c75879 commit 0675af3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
15 changes: 14 additions & 1 deletion closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -270,6 +270,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)
Expand Down Expand Up @@ -422,6 +429,12 @@ ifeq (true,$(OPENJ9_ENABLE_CMAKE))
CMAKE_ARGS += -DCMAKE_CXX_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

Expand Down
30 changes: 28 additions & 2 deletions closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
OPENJ9_CONFIGURE_DDR
OPENJ9_CONFIGURE_DEMOS
OPENJ9_CONFIGURE_HEALTHCENTER
OPENJ9_CONFIGURE_JFR
OPENJ9_CONFIGURE_JITSERVER
OPENJ9_CONFIGURE_NUMA
OPENJ9_CONFIGURE_WARNINGS
OPENJ9_CONFIGURE_JITSERVER
OPENJ9_CONFIGURE_OPENJDK_METHODHANDLES
OPENJ9_THIRD_PARTY_REQUIREMENTS
OPENJ9_CHECK_NASM_VERSION
OPENJCEPLUS_SETUP
Expand Down Expand Up @@ -334,6 +334,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@:>@])])
Expand Down
1 change: 1 addition & 0 deletions closed/autoconf/custom-spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ OPENJ9_ENABLE_CRAC_SUPPORT := @OPENJ9_ENABLE_CRAC_SUPPORT@
OPENJ9_ENABLE_CRIU_SUPPORT := @OPENJ9_ENABLE_CRIU_SUPPORT@
OPENJ9_ENABLE_DDR := @OPENJ9_ENABLE_DDR@
OPENJ9_ENABLE_DEMOS := @OPENJ9_ENABLE_DEMOS@
OPENJ9_ENABLE_JFR := @OPENJ9_ENABLE_JFR@
OPENJ9_ENABLE_JITSERVER := @OPENJ9_ENABLE_JITSERVER@
OPENJ9_ENABLE_OPENJDK_METHODHANDLES := @OPENJ9_ENABLE_OPENJDK_METHODHANDLES@

Expand Down

0 comments on commit 0675af3

Please sign in to comment.