From 239064f76e4afaa3922dce51973329450d6e3f42 Mon Sep 17 00:00:00 2001 From: Peter Shipton Date: Thu, 18 Apr 2024 08:38:35 -0400 Subject: [PATCH] Remove the unneeded Hotspot features for building OpenJ9 OpenJ9 builds don't need to include support for the removed Hotspot features: `cds compiler1 compiler2 jni-check jvmci jvmti minimal nmt services static-build vm-structs zero` and all the gc's. With this change configure shows: `checking JVM features to use for variant 'server'... 'dtrace jfr management'` Signed-off-by: Peter Shipton --- closed/autoconf/custom-hook.m4 | 3 --- closed/autoconf/custom-spec.gmk.in | 3 --- make/autoconf/jvm-features.m4 | 39 ++++++++++++++++-------------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/closed/autoconf/custom-hook.m4 b/closed/autoconf/custom-hook.m4 index c1823ecd72d..9e286c6c922 100644 --- a/closed/autoconf/custom-hook.m4 +++ b/closed/autoconf/custom-hook.m4 @@ -663,9 +663,6 @@ AC_DEFUN_ONCE([CUSTOM_LATE_HOOK], # Create the custom-spec.gmk AC_CONFIG_FILES([$OUTPUTDIR/custom-spec.gmk:$CLOSED_AUTOCONF_DIR/custom-spec.gmk.in]) - # explicitly disable CDS archive generation (OpenJ9 does not support '-Xshare:dump') - BUILD_CDS_ARCHIVE=false - # explicitly disable classlist generation ENABLE_GENERATE_CLASSLIST=false diff --git a/closed/autoconf/custom-spec.gmk.in b/closed/autoconf/custom-spec.gmk.in index ee60f533717..ddb2a52f088 100644 --- a/closed/autoconf/custom-spec.gmk.in +++ b/closed/autoconf/custom-spec.gmk.in @@ -182,9 +182,6 @@ $(foreach var, \ J9JCL_SOURCES_DIR := $(SUPPORT_OUTPUTDIR)/j9jcl J9JCL_SOURCES_DONEFILE := $(MAKESUPPORT_OUTPUTDIR)/j9jcl.done -# Disable all hotspot features. -JVM_FEATURES_server := - # Required by OpenJCEPlus. BUILD_OPENJCEPLUS := @BUILD_OPENJCEPLUS@ OPENJCEPLUS_TOPDIR := $(TOPDIR)/OpenJCEPlus diff --git a/make/autoconf/jvm-features.m4 b/make/autoconf/jvm-features.m4 index aa99b037b2b..6bb201cd136 100644 --- a/make/autoconf/jvm-features.m4 +++ b/make/autoconf/jvm-features.m4 @@ -22,6 +22,9 @@ # or visit www.oracle.com if you need additional information or have any # questions. # +# =========================================================================== +# (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved +# =========================================================================== ############################################################################### # Terminology used in this file: @@ -44,9 +47,8 @@ m4_define(jvm_features_valid, m4_normalize( \ ifdef([custom_jvm_features_valid], custom_jvm_features_valid) \ \ - cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check \ - jvmci jvmti link-time-opt management minimal nmt opt-size parallelgc \ - serialgc services shenandoahgc static-build vm-structs zero zgc \ + dtrace jfr \ + link-time-opt management opt-size \ )) # Deprecated JVM features (these are ignored, but with a warning) @@ -233,7 +235,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS], [ JVM_FEATURES_CHECK_AVAILABILITY(cds, [ AC_MSG_CHECKING([if platform is supported by CDS]) - if test "x$OPENJDK_TARGET_OS" = xaix; then + if true; then + AC_MSG_RESULT([no, OpenJ9]) + AVAILABLE=false + elif test "x$OPENJDK_TARGET_OS" = xaix; then AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU]) AVAILABLE=false else @@ -291,7 +296,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI], [ JVM_FEATURES_CHECK_AVAILABILITY(jvmci, [ AC_MSG_CHECKING([if platform is supported by JVMCI]) - if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then + if true; then + AC_MSG_RESULT([no, OpenJ9]) + AVAILABLE=false + elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then AC_MSG_RESULT([yes]) elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then AC_MSG_RESULT([yes]) @@ -309,7 +317,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC], [ JVM_FEATURES_CHECK_AVAILABILITY(shenandoahgc, [ AC_MSG_CHECKING([if platform is supported by Shenandoah]) - if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || \ + if true; then + AC_MSG_RESULT([no, OpenJ9]) + AVAILABLE=false + elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || \ test "x$OPENJDK_TARGET_CPU" = "xaarch64" || \ test "x$OPENJDK_TARGET_CPU" = "xppc64le" || \ test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then @@ -344,7 +355,10 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC], [ JVM_FEATURES_CHECK_AVAILABILITY(zgc, [ AC_MSG_CHECKING([if platform is supported by ZGC]) - if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then + if true; then + AC_MSG_RESULT([no, OpenJ9]) + AVAILABLE=false + elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then if test "x$OPENJDK_TARGET_OS" = "xlinux" || \ test "x$OPENJDK_TARGET_OS" = "xwindows" || \ test "x$OPENJDK_TARGET_OS" = "xmacosx"; then @@ -543,10 +557,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY], AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services' for variant '$variant']) fi - if JVM_FEATURES_IS_ACTIVE(management) && ! JVM_FEATURES_IS_ACTIVE(nmt); then - AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt' for variant '$variant']) - fi - # For backwards compatibility, disable a feature "globally" if one variant # is missing the feature. if ! JVM_FEATURES_IS_ACTIVE(cds); then @@ -558,13 +568,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY], if JVM_FEATURES_IS_ACTIVE(compiler2); then INCLUDE_COMPILER2="true" fi - - # Verify that we have at least one gc selected (i.e., feature named "*gc"). - if ! JVM_FEATURES_IS_ACTIVE(.*gc); then - AC_MSG_NOTICE([At least one gc needed for variant '$variant'.]) - AC_MSG_NOTICE([Specified features: '$JVM_FEATURES_ACTIVE']) - AC_MSG_ERROR([Cannot continue]) - fi ]) ###############################################################################