Skip to content

Commit f263ad4

Browse files
tajilaTobi
authored and
Tobi
committed
Add JFR Flags
Signed-off-by: tajila <[email protected]>
1 parent 520531c commit f263ad4

File tree

5 files changed

+108
-6
lines changed

5 files changed

+108
-6
lines changed

closed/OpenJ9.gmk

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ===========================================================================
2-
# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
2+
# (c) Copyright IBM Corp. 2017, 2024 All Rights Reserved
33
# ===========================================================================
44
# This code is free software; you can redistribute it and/or modify it
55
# under the terms of the GNU General Public License version 2 only, as
@@ -180,6 +180,13 @@ else
180180
SPEC_SED_SCRIPT += $(call SedDisable,module_ddr)
181181
endif
182182

183+
# Adjust JFR enablement flags.
184+
ifeq (true,$(OPENJ9_ENABLE_JFR))
185+
FEATURE_SED_SCRIPT += $(call SedEnable,opt_jfr)
186+
else
187+
FEATURE_SED_SCRIPT += $(call SedDisable,opt_jfr)
188+
endif
189+
183190
# Adjust JITServer enablement flags.
184191
ifeq (true,$(OPENJ9_ENABLE_JITSERVER))
185192
FEATURE_SED_SCRIPT += $(call SedEnable,opt_jitserver)
@@ -349,6 +356,12 @@ ifneq (,$(CCACHE))
349356
CMAKE_ARGS += "-DCMAKE_C_COMPILER_LAUNCHER=$(ESCAPED_CCACHE)"
350357
endif # CCACHE
351358

359+
ifeq (true,$(OPENJ9_ENABLE_JFR))
360+
CMAKE_ARGS += -DJ9VM_OPT_JFR=ON
361+
else # OPENJ9_ENABLE_JFR
362+
CMAKE_ARGS += -DJ9VM_OPT_JFR=OFF
363+
endif # OPENJ9_ENABLE_JFR
364+
352365
ifeq (true,$(OPENJ9_ENABLE_JITSERVER))
353366
CMAKE_ARGS += -DJ9VM_OPT_JITSERVER=ON
354367

common/autoconf/generated-configure.sh

+14-2
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,7 @@ infodir
10181018
docdir
10191019
oldincludedir
10201020
includedir
1021+
runstatedir
10211022
localstatedir
10221023
sharedstatedir
10231024
sysconfdir
@@ -1265,6 +1266,7 @@ datadir='${datarootdir}'
12651266
sysconfdir='${prefix}/etc'
12661267
sharedstatedir='${prefix}/com'
12671268
localstatedir='${prefix}/var'
1269+
runstatedir='${localstatedir}/run'
12681270
includedir='${prefix}/include'
12691271
oldincludedir='/usr/include'
12701272
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1517,6 +1519,15 @@ do
15171519
| -silent | --silent | --silen | --sile | --sil)
15181520
silent=yes ;;
15191521

1522+
-runstatedir | --runstatedir | --runstatedi | --runstated \
1523+
| --runstate | --runstat | --runsta | --runst | --runs \
1524+
| --run | --ru | --r)
1525+
ac_prev=runstatedir ;;
1526+
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1527+
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1528+
| --run=* | --ru=* | --r=*)
1529+
runstatedir=$ac_optarg ;;
1530+
15201531
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
15211532
ac_prev=sbindir ;;
15221533
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1654,7 +1665,7 @@ fi
16541665
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
16551666
datadir sysconfdir sharedstatedir localstatedir includedir \
16561667
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1657-
libdir localedir mandir
1668+
libdir localedir mandir runstatedir
16581669
do
16591670
eval ac_val=\$$ac_var
16601671
# Remove trailing slashes.
@@ -1807,6 +1818,7 @@ Fine tuning of the installation directories:
18071818
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
18081819
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
18091820
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1821+
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
18101822
--libdir=DIR object code libraries [EPREFIX/lib]
18111823
--includedir=DIR C header files [PREFIX/include]
18121824
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -4455,7 +4467,7 @@ VS_TOOLSET_SUPPORTED_2022=true
44554467
#CUSTOM_AUTOCONF_INCLUDE
44564468

44574469
# Do not change or remove the following line, it is needed for consistency checks:
4458-
DATE_WHEN_GENERATED=1709065899
4470+
DATE_WHEN_GENERATED=1711567483
44594471

44604472
###############################################################################
44614473
#

jdk/make/closed/autoconf/custom-hook.m4

+27
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
4545
OPENJ9_CONFIGURE_DDR
4646
OPENJ9_CONFIGURE_DEMOS
4747
OPENJ9_CONFIGURE_HEALTHCENTER
48+
OPENJ9_CONFIGURE_JFR
4849
OPENJ9_CONFIGURE_JITSERVER
4950
OPENJ9_CONFIGURE_OPENJDK_METHODHANDLES
5051
OPENJ9_CONFIGURE_WARNINGS
@@ -291,6 +292,32 @@ AC_DEFUN([OPENJ9_PLATFORM_EXTRACT_VARS_FROM_CPU],
291292
esac
292293
])
293294

295+
AC_DEFUN([OPENJ9_CONFIGURE_JFR],
296+
[
297+
AC_ARG_ENABLE([jfr], [AS_HELP_STRING([--enable-jfr], [enable JFR support @<:@platform dependent@:>@])])
298+
AC_MSG_CHECKING([for jfr])
299+
OPENJ9_ENABLE_JFR=false
300+
if test "x$enable_jfr" = xyes ; then
301+
AC_MSG_RESULT([yes (explicitly enabled)])
302+
OPENJ9_ENABLE_JFR=true
303+
elif test "x$enable_jfr" = xno ; then
304+
AC_MSG_RESULT([no (explicitly disabled)])
305+
elif test "x$enable_jfr" = x ; then
306+
case "$OPENJ9_PLATFORM_CODE" in
307+
xa64)
308+
AC_MSG_RESULT([yes (default)])
309+
OPENJ9_ENABLE_JFR=true
310+
;;
311+
*)
312+
AC_MSG_RESULT([no (default)])
313+
;;
314+
esac
315+
else
316+
AC_MSG_ERROR([--enable-jfr accepts no argument])
317+
fi
318+
AC_SUBST(OPENJ9_ENABLE_JFR)
319+
])
320+
294321
AC_DEFUN([OPENJ9_CONFIGURE_JITSERVER],
295322
[
296323
AC_ARG_ENABLE([jitserver], [AS_HELP_STRING([--enable-jitserver], [enable JITServer support @<:@disabled@:>@])])

jdk/make/closed/autoconf/custom-spec.gmk.in

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ OPENJ9_ENABLE_CRIU_SUPPORT := @OPENJ9_ENABLE_CRIU_SUPPORT@
5959
OPENJ9_ENABLE_DDR := @OPENJ9_ENABLE_DDR@
6060
OPENJ9_ENABLE_DEMOS := @OPENJ9_ENABLE_DEMOS@
6161
OPENJ9_ENABLE_INLINE_TYPES := @OPENJ9_ENABLE_INLINE_TYPES@
62+
OPENJ9_ENABLE_JFR := @OPENJ9_ENABLE_JFR@
6263
OPENJ9_ENABLE_JITSERVER := @OPENJ9_ENABLE_JITSERVER@
6364
OPENJ9_ENABLE_OPENJDK_METHODHANDLES := @OPENJ9_ENABLE_OPENJDK_METHODHANDLES@
6465

jdk/make/closed/autoconf/generated-configure.sh

+52-3
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,7 @@ WARNINGS_AS_ERRORS_OPENJ9
900900
WARNINGS_AS_ERRORS_OMR
901901
OPENJ9_ENABLE_OPENJDK_METHODHANDLES
902902
OPENJ9_ENABLE_JITSERVER
903+
OPENJ9_ENABLE_JFR
903904
HEALTHCENTER_JAR
904905
OPENJ9_ENABLE_DEMOS
905906
OPENJ9_ENABLE_DDR
@@ -1056,6 +1057,7 @@ infodir
10561057
docdir
10571058
oldincludedir
10581059
includedir
1060+
runstatedir
10591061
localstatedir
10601062
sharedstatedir
10611063
sysconfdir
@@ -1099,6 +1101,7 @@ enable_cuda
10991101
enable_ddr
11001102
enable_demos
11011103
with_healthcenter
1104+
enable_jfr
11021105
enable_jitserver
11031106
enable_openjdk_methodhandles
11041107
enable_warnings_as_errors_omr
@@ -1122,7 +1125,6 @@ enable_headful
11221125
enable_hotspot_test_in_build
11231126
with_cacerts_file
11241127
enable_unlimited_crypto
1125-
enable_jfr
11261128
with_milestone
11271129
with_update_version
11281130
with_user_release_suffix
@@ -1329,6 +1331,7 @@ datadir='${datarootdir}'
13291331
sysconfdir='${prefix}/etc'
13301332
sharedstatedir='${prefix}/com'
13311333
localstatedir='${prefix}/var'
1334+
runstatedir='${localstatedir}/run'
13321335
includedir='${prefix}/include'
13331336
oldincludedir='/usr/include'
13341337
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1581,6 +1584,15 @@ do
15811584
| -silent | --silent | --silen | --sile | --sil)
15821585
silent=yes ;;
15831586

1587+
-runstatedir | --runstatedir | --runstatedi | --runstated \
1588+
| --runstate | --runstat | --runsta | --runst | --runs \
1589+
| --run | --ru | --r)
1590+
ac_prev=runstatedir ;;
1591+
-runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1592+
| --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1593+
| --run=* | --ru=* | --r=*)
1594+
runstatedir=$ac_optarg ;;
1595+
15841596
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
15851597
ac_prev=sbindir ;;
15861598
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1718,7 +1730,7 @@ fi
17181730
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
17191731
datadir sysconfdir sharedstatedir localstatedir includedir \
17201732
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1721-
libdir localedir mandir
1733+
libdir localedir mandir runstatedir
17221734
do
17231735
eval ac_val=\$$ac_var
17241736
# Remove trailing slashes.
@@ -1871,6 +1883,7 @@ Fine tuning of the installation directories:
18711883
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
18721884
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
18731885
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
1886+
--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
18741887
--libdir=DIR object code libraries [EPREFIX/lib]
18751888
--includedir=DIR C header files [PREFIX/include]
18761889
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1917,6 +1930,7 @@ Optional Features:
19171930
--enable-cuda enable CUDA support [disabled]
19181931
--enable-ddr enable DDR support [disabled]
19191932
--enable-demos include demos in jdk image [disabled]
1933+
--enable-jfr enable JFR support [platform dependent]
19201934
--enable-jitserver enable JITServer support [disabled]
19211935
--enable-openjdk-methodhandles
19221936
enable support for OpenJDK MethodHandles [disabled]
@@ -4612,6 +4626,8 @@ VS_TOOLSET_SUPPORTED_2022=true
46124626

46134627

46144628

4629+
4630+
46154631

46164632

46174633

@@ -4625,7 +4641,7 @@ VS_TOOLSET_SUPPORTED_2022=true
46254641

46264642

46274643
# Do not change or remove the following line, it is needed for consistency checks:
4628-
DATE_WHEN_GENERATED=1709065899
4644+
DATE_WHEN_GENERATED=1711567483
46294645

46304646
###############################################################################
46314647
#
@@ -16644,6 +16660,39 @@ fi
1664416660

1664516661

1664616662

16663+
# Check whether --enable-jfr was given.
16664+
if test "${enable_jfr+set}" = set; then :
16665+
enableval=$enable_jfr;
16666+
fi
16667+
16668+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for jfr" >&5
16669+
$as_echo_n "checking for jfr... " >&6; }
16670+
OPENJ9_ENABLE_JFR=false
16671+
if test "x$enable_jfr" = xyes ; then
16672+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly enabled)" >&5
16673+
$as_echo "yes (explicitly enabled)" >&6; }
16674+
OPENJ9_ENABLE_JFR=true
16675+
elif test "x$enable_jfr" = xno ; then
16676+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (explicitly disabled)" >&5
16677+
$as_echo "no (explicitly disabled)" >&6; }
16678+
elif test "x$enable_jfr" = x ; then
16679+
case "$OPENJ9_PLATFORM_CODE" in
16680+
xa64)
16681+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
16682+
$as_echo "yes (default)" >&6; }
16683+
OPENJ9_ENABLE_JFR=true
16684+
;;
16685+
*)
16686+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
16687+
$as_echo "no (default)" >&6; }
16688+
;;
16689+
esac
16690+
else
16691+
as_fn_error $? "--enable-jfr accepts no argument" "$LINENO" 5
16692+
fi
16693+
16694+
16695+
1664716696
# Check whether --enable-jitserver was given.
1664816697
if test "${enable_jitserver+set}" = set; then :
1664916698
enableval=$enable_jitserver;

0 commit comments

Comments
 (0)