Skip to content

Commit

Permalink
Merge pull request #710 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 committed Sep 20, 2023
2 parents 24cd334 + 0a60e3d commit 79be905
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 5 deletions.
3 changes: 3 additions & 0 deletions closed/JPP.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ endif # OPENJ9_ENABLE_CRIU_SUPPORT
ifeq (true,$(OPENJ9_ENABLE_OPENJDK_METHODHANDLES))
JPP_TAGS += OPENJDK_METHODHANDLES
endif # OPENJ9_ENABLE_OPENJDK_METHODHANDLES
ifeq (true,$(OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT))
JPP_TAGS += OPENJDK_CRAC_SUPPORT
endif # OPENJ9_ENABLE_OPENJDK_CRAC_SUPPORT

# invoke JPP to preprocess java source files
# $1 - configuration
Expand Down
12 changes: 12 additions & 0 deletions closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,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.
ifeq (true,$(OPENJ9_ENABLE_OPENJDK_METHODHANDLES))
FEATURE_SED_SCRIPT += $(call SedDisable,opt_methodHandle)
Expand Down Expand Up @@ -451,6 +458,11 @@ ifeq (true,$(OPENJ9_ENABLE_CMAKE))
CMAKE_ARGS += -DJ9VM_OPT_METHOD_HANDLE=ON
CMAKE_ARGS += -DJ9VM_OPT_OPENJDK_METHODHANDLE=OFF
endif # OPENJ9_ENABLE_OPENJDK_METHODHANDLES
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

# Propagate configure option '--disable-warnings-as-errors-omr' to OMR.
ifeq (false,$(WARNINGS_AS_ERRORS_OMR))
Expand Down
74 changes: 74 additions & 0 deletions closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK],
OPENJ9_CONFIGURE_CMAKE
OPENJ9_CONFIGURE_COMPILERS
OPENJ9_CONFIGURE_CRIU_SUPPORT
OPENJ9_CONFIGURE_OPENJDK_CRAC_SUPPORT
OPENJ9_CONFIGURE_CUDA
OPENJ9_CONFIGURE_DDR
OPENJ9_CONFIGURE_DEMOS
Expand Down Expand Up @@ -332,6 +333,79 @@ AC_DEFUN([OPENJ9_PLATFORM_EXTRACT_VARS_FROM_CPU],
esac
])

AC_DEFUN([OPENJ9_CONFIGURE_CRIU_SUPPORT],
[
AC_MSG_CHECKING([for CRIU support])
AC_ARG_ENABLE([criu-support], [AS_HELP_STRING([--enable-criu-support], [enable CRIU support @<:@disabled@:>@])])
OPENJ9_ENABLE_CRIU_SUPPORT=false
if test "x$enable_criu_support" = xyes ; then
AC_MSG_RESULT([yes (explicitly enabled)])
OPENJ9_ENABLE_CRIU_SUPPORT=true
elif test "x$enable_criu_support" = xno ; then
AC_MSG_RESULT([no (explicitly disabled)])
elif test "x$enable_criu_support" = x ; then
case "$OPENJ9_PLATFORM_CODE" in
xa64|xl64|xr64|xz64)
AC_MSG_RESULT([yes (default)])
OPENJ9_ENABLE_CRIU_SUPPORT=true
;;
*)
AC_MSG_RESULT([no (default)])
;;
esac
else
AC_MSG_ERROR([--enable-criu-support accepts no argument])
fi
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])
AC_ARG_ENABLE([inline-types], [AS_HELP_STRING([--enable-inline-types], [enable Inline-Type support @<:@disabled@:>@])])
OPENJ9_ENABLE_INLINE_TYPES=false
if test "x$enable_inline_types" = xyes ; then
AC_MSG_RESULT([yes (explicitly enabled)])
OPENJ9_ENABLE_INLINE_TYPES=true
elif test "x$enable_inline_types" = xno ; then
AC_MSG_RESULT([no (explicitly disabled)])
elif test "x$enable_inline_types" = x ; then
AC_MSG_RESULT([no (default)])
else
AC_MSG_ERROR([--enable-inline-types accepts no argument])
fi
AC_SUBST(OPENJ9_ENABLE_INLINE_TYPES)
])

AC_DEFUN([OPENJ9_CONFIGURE_JITSERVER],
[
AC_ARG_ENABLE([jitserver], [AS_HELP_STRING([--enable-jitserver], [enable JITServer support @<:@disabled@:>@])])
Expand Down
12 changes: 7 additions & 5 deletions closed/autoconf/custom-spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ export GDK_HOME := @OPENJ9_GDK_HOME@
endif

# feature enablement flags
OPENJ9_ENABLE_CRIU_SUPPORT := @OPENJ9_ENABLE_CRIU_SUPPORT@
OPENJ9_ENABLE_DDR := @OPENJ9_ENABLE_DDR@
OPENJ9_ENABLE_DEMOS := @OPENJ9_ENABLE_DEMOS@
OPENJ9_ENABLE_JITSERVER := @OPENJ9_ENABLE_JITSERVER@
OPENJ9_ENABLE_OPENJDK_METHODHANDLES := @OPENJ9_ENABLE_OPENJDK_METHODHANDLES@
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@
OPENJ9_ENABLE_JITSERVER := @OPENJ9_ENABLE_JITSERVER@

# for constructing version output
COMPILER_VERSION_STRING := @COMPILER_VERSION_STRING@
Expand Down

0 comments on commit 79be905

Please sign in to comment.