Skip to content

Commit

Permalink
Merge pull request #770 from ThanHenderson/rcp
Browse files Browse the repository at this point in the history
Add configure support to enable RAM class persistence
  • Loading branch information
babsingh authored Oct 22, 2024
2 parents 8d64274 + 4c3b495 commit 11d7c51
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
15 changes: 15 additions & 0 deletions closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@ else # OPENJ9_ENABLE_OPENJDK_METHODHANDLES
FEATURE_SED_SCRIPT += $(call SedDisable,opt_openjdkMethodhandle)
endif # OPENJ9_ENABLE_OPENJDK_METHODHANDLES

# Adjust snapshots enablement flags.
ifeq (true,$(OPENJ9_ENABLE_SNAPSHOTS))
FEATURE_SED_SCRIPT += $(call SedEnable,opt_snapshots)
FEATURE_SED_SCRIPT += $(call SedDisable,opt_snapshots)
else # OPENJ9_ENABLE_SNAPSHOTS
FEATURE_SED_SCRIPT += $(call SedEnable,opt_snashots)
FEATURE_SED_SCRIPT += $(call SedDisable,opt_snapshots)
endif # OPENJ9_ENABLE_SNAPSHOTS

# openj9_stage_buildspec_file
# ---------------------------
# param 1 = The simple name of the file to copy.
Expand Down Expand Up @@ -391,6 +400,12 @@ else # OPENJ9_ENABLE_OPENJDK_METHODHANDLES
CMAKE_ARGS += -DJ9VM_OPT_OPENJDK_METHODHANDLE=OFF
endif # OPENJ9_ENABLE_OPENJDK_METHODHANDLES

ifeq (true,$(OPENJ9_ENABLE_SNAPSHOTS))
CMAKE_ARGS += -DJ9VM_OPT_SNAPSHOTS=ON
else # OPENJ9_ENABLE_SNAPSHOTS
CMAKE_ARGS += -DJ9VM_OPT_SNAPSHOTS=OFF
endif # OPENJ9_ENABLE_SNAPSHOTS

ifneq (,$(filter debug trace, $(LOG_LEVEL)))
# The user said LOG=debug or LOG=trace, so tell cmake to echo commands.
CMAKE_ARGS += -DCMAKE_VERBOSE_MAKEFILE=ON
Expand Down
2 changes: 1 addition & 1 deletion common/autoconf/generated-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4455,7 +4455,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=1724410208
DATE_WHEN_GENERATED=1729527382

###############################################################################
#
Expand Down
20 changes: 20 additions & 0 deletions jdk/make/closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
OPENJ9_CONFIGURE_JFR
OPENJ9_CONFIGURE_JITSERVER
OPENJ9_CONFIGURE_OPENJDK_METHODHANDLES
OPENJ9_CONFIGURE_SNAPSHOTS
OPENJ9_CONFIGURE_WARNINGS
if test "x$OPENJDK_TARGET_OS" = xwindows ; then
Expand Down Expand Up @@ -375,6 +376,25 @@ AC_DEFUN([OPENJ9_CONFIGURE_OPENJDK_METHODHANDLES],
AC_SUBST(OPENJ9_ENABLE_OPENJDK_METHODHANDLES)
])

AC_DEFUN([OPENJ9_CONFIGURE_SNAPSHOTS],
[
AC_MSG_CHECKING([for snapshot support])
AC_ARG_ENABLE([snapshots], [AS_HELP_STRING([--enable-snapshots],
[enable RAM persistence snapshots @<:@disabled@:>@])])
OPENJ9_ENABLE_SNAPSHOTS=false
if test "x$enable_snapshots" = xyes ; then
AC_MSG_RESULT([yes (explicitly enabled)])
OPENJ9_ENABLE_SNAPSHOTS=true
elif test "x$enable_snapshots" = xno ; then
AC_MSG_RESULT([no (explicit)])
elif test "x$enable_snapshots" = x ; then
AC_MSG_RESULT([no (default)])
else
AC_MSG_ERROR([--enable-snapshots accepts no argument])
fi
AC_SUBST(OPENJ9_ENABLE_SNAPSHOTS)
])

AC_DEFUN([OPENJ9_CONFIGURE_WARNINGS],
[
AC_ARG_ENABLE([warnings-as-errors-omr], [AS_HELP_STRING([--disable-warnings-as-errors-omr],
Expand Down
1 change: 1 addition & 0 deletions jdk/make/closed/autoconf/custom-spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ 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@
OPENJ9_ENABLE_SNAPSHOTS := @OPENJ9_ENABLE_SNAPSHOTS@

# for constructing version output
COMPILER_VERSION_STRING := @COMPILER_VERSION_STRING@
Expand Down
31 changes: 30 additions & 1 deletion jdk/make/closed/autoconf/generated-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ CONF_NAME
SPEC
WARNINGS_AS_ERRORS_OPENJ9
WARNINGS_AS_ERRORS_OMR
OPENJ9_ENABLE_SNAPSHOTS
OPENJ9_ENABLE_OPENJDK_METHODHANDLES
OPENJ9_ENABLE_JITSERVER
OPENJ9_ENABLE_JFR
Expand Down Expand Up @@ -1107,6 +1108,7 @@ with_healthcenter
enable_jfr
enable_jitserver
enable_openjdk_methodhandles
enable_snapshots
enable_warnings_as_errors_omr
enable_warnings_as_errors_openj9
with_conf_name
Expand Down Expand Up @@ -1926,6 +1928,7 @@ Optional Features:
--enable-jitserver enable JITServer support [disabled]
--enable-openjdk-methodhandles
enable support for OpenJDK MethodHandles [disabled]
--enable-snapshots enable RAM persistence snapshots [disabled]
--disable-warnings-as-errors-omr
do not consider OMR compile warnings to be errors
[enabled]
Expand Down Expand Up @@ -4616,6 +4619,8 @@ VS_TOOLSET_SUPPORTED_2022=true








Expand All @@ -4629,7 +4634,7 @@ VS_TOOLSET_SUPPORTED_2022=true


# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1724410208
DATE_WHEN_GENERATED=1729527382

###############################################################################
#
Expand Down Expand Up @@ -16751,6 +16756,30 @@ $as_echo "no (default)" >&6; }



{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snapshot support" >&5
$as_echo_n "checking for snapshot support... " >&6; }
# Check whether --enable-snapshots was given.
if test "${enable_snapshots+set}" = set; then :
enableval=$enable_snapshots;
fi

OPENJ9_ENABLE_SNAPSHOTS=false
if test "x$enable_snapshots" = xyes ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly enabled)" >&5
$as_echo "yes (explicitly enabled)" >&6; }
OPENJ9_ENABLE_SNAPSHOTS=true
elif test "x$enable_snapshots" = xno ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (explicit)" >&5
$as_echo "no (explicit)" >&6; }
elif test "x$enable_snapshots" = x ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
$as_echo "no (default)" >&6; }
else
as_fn_error $? "--enable-snapshots accepts no argument" "$LINENO" 5
fi



# Check whether --enable-warnings-as-errors-omr was given.
if test "${enable_warnings_as_errors_omr+set}" = set; then :
enableval=$enable_warnings_as_errors_omr;
Expand Down

0 comments on commit 11d7c51

Please sign in to comment.