Skip to content

Commit

Permalink
Merge pull request ibmruntimes#45 from JasonFengJ9/cracflag
Browse files Browse the repository at this point in the history
CRIU adds OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT
  • Loading branch information
tajila authored Sep 20, 2023
2 parents 833b69e + 0c8d176 commit 6b9cca2
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
4 changes: 4 additions & 0 deletions closed/JPP.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ ifeq (true,$(OPENJ9_ENABLE_CRIU_SUPPORT))
JPP_TAGS += CRIU_SUPPORT
endif # OPENJ9_ENABLE_CRIU_SUPPORT

ifeq (true,$(OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT))
JPP_TAGS += OPENJDK_CRAC_SUPPORT
endif # OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT

ifeq (true,$(OPENJ9_ENABLE_INLINE_TYPES))
JPP_TAGS += INLINE-TYPES
endif # OPENJ9_ENABLE_INLINE_TYPES
Expand Down
13 changes: 13 additions & 0 deletions closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ else # OPENJ9_ENABLE_CRIU_SUPPORT
FEATURE_SED_SCRIPT += $(call SedDisable,opt_criuSupport)
endif # OPENJ9_ENABLE_CRIU_SUPPORT

# Adjust OpenJDK CRAC Support enablement flags.
ifeq (true,$(OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT))
FEATURE_SED_SCRIPT += $(call SedEnable,opt_openjdkCracSupport)
else # OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT
FEATURE_SED_SCRIPT += $(call SedDisable,opt_openjdkCracSupport)
endif # OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT

# Adjust OpenJDK MethodHandles enablement flags.
FEATURE_SED_SCRIPT += $(call SedDisable,opt_methodHandle)
FEATURE_SED_SCRIPT += $(call SedEnable,opt_openjdkMethodhandle)
Expand Down Expand Up @@ -460,6 +467,12 @@ ifeq (true,$(OPENJ9_ENABLE_CMAKE))
CMAKE_ARGS += -DJ9VM_OPT_CRIU_SUPPORT=OFF
endif # OPENJ9_ENABLE_CRIU_SUPPORT

ifeq (true,$(OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT))
CMAKE_ARGS += -DJ9VM_OPT_OPENJDK_CRAC_SUPPORT=ON
else # OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT
CMAKE_ARGS += -DJ9VM_OPT_OPENJDK_CRAC_SUPPORT=OFF
endif # OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT

CMAKE_ARGS += -DJ9VM_OPT_METHOD_HANDLE=OFF
CMAKE_ARGS += -DJ9VM_OPT_OPENJDK_METHODHANDLE=ON

Expand Down
28 changes: 28 additions & 0 deletions closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
OPENJ9_CONFIGURE_COMPILERS
OPENJ9_CONFIGURE_CONTINUATION_PROFILE
OPENJ9_CONFIGURE_CRIU_SUPPORT
OPENJ9_CONFIGURE_OPENJDK_CRAC_SUPPORT
OPENJ9_CONFIGURE_CUDA
OPENJ9_CONFIGURE_DDR
OPENJ9_CONFIGURE_DEMOS
Expand Down Expand Up @@ -364,6 +365,33 @@ AC_DEFUN([OPENJ9_CONFIGURE_CRIU_SUPPORT],
AC_SUBST(OPENJ9_ENABLE_CRIU_SUPPORT)
])

AC_DEFUN([OPENJ9_CONFIGURE_OPENJDK_CRAC_SUPPORT],
[
AC_MSG_CHECKING([for OpenJDK CRAC support])
AC_ARG_ENABLE([openjdk-crac-support], [AS_HELP_STRING([--enable-openjdk-crac-support], [enable OpenJDK CRAC support @<:@disabled@:>@])])
OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT=false
if test "x$enable_openjdk_crac_support" = xyes ; then
AC_MSG_RESULT([yes (explicitly enabled)])
OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT=true
elif test "x$enable_openjdk_crac_support" = xno ; then
AC_MSG_RESULT([no (explicitly disabled)])
elif test "x$enable_openjdk_crac_support" = x ; then
case "$OPENJ9_PLATFORM_CODE" in
xa64)
AC_MSG_RESULT([yes (default)])
OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT=true
;;
*)
AC_MSG_RESULT([no (default)])
;;
esac
else
AC_MSG_ERROR([--enable-openjdk-crac-support accepts no argument])
fi
AC_SUBST(OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT)
])

AC_DEFUN([OPENJ9_CONFIGURE_INLINE_TYPES],
[
AC_MSG_CHECKING([for inline types])
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 @@ -70,6 +70,7 @@ endif
# feature enablement flags
OPENJ9_ENABLE_CONTINUATION_ALLOCATION_PROFILING := @OPENJ9_ENABLE_CONTINUATION_ALLOCATION_PROFILING@
OPENJ9_ENABLE_CRIU_SUPPORT := @OPENJ9_ENABLE_CRIU_SUPPORT@
OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT := @OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT@
OPENJ9_ENABLE_DDR := @OPENJ9_ENABLE_DDR@
OPENJ9_ENABLE_DEMOS := @OPENJ9_ENABLE_DEMOS@
OPENJ9_ENABLE_INLINE_TYPES := @OPENJ9_ENABLE_INLINE_TYPES@
Expand Down

0 comments on commit 6b9cca2

Please sign in to comment.