Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configure support to enable RAM class persistence #770

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Contributor Author

@ThanHenderson ThanHenderson Oct 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed this is incorrect too. I had forgotten to push the most recent changes before this was merged.

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)])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this not say "no (explicitly disabled)" like other options?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. This is a mistake. I will open new PR to address any concerns you have here.

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@
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs should only be used for indentation (not after any non-whitespace character).


# 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