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

8264806: Remove the experimental JIT compiler #3421

Closed
wants to merge 12 commits into from
Closed
Changes from all commits
Commits
File filter
Filter file types
Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.

Always

Just for now

@@ -52,94 +52,6 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_HOTSPOT, \
TARGETS += $(BUILD_TOOLS_HOTSPOT)


################################################################################
# Graal build tools
ifeq ($(INCLUDE_GRAAL), true)
VM_CI_SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.ci/share/classes

SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.compiler/share/classes

##############################################################################
# Compile the annotation processors
$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_MATCH_PROCESSOR, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
SRC := \
$(SRC_DIR)/org.graalvm.compiler.processor/src \
$(SRC_DIR)/org.graalvm.compiler.core.match.processor/src \
, \
EXCLUDE_FILES := $(EXCLUDE_FILES), \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor, \
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.match.processor.jar, \
DISABLED_WARNINGS := options, \
))

TARGETS += $(BUILD_VM_COMPILER_MATCH_PROCESSOR)

##############################################################################

$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_NODEINFO_PROCESSOR, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
SRC := \
$(SRC_DIR)/org.graalvm.compiler.processor/src \
$(SRC_DIR)/org.graalvm.compiler.nodeinfo.processor/src \
, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor, \
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.nodeinfo.processor.jar, \
DISABLED_WARNINGS := options, \
))

TARGETS += $(BUILD_VM_COMPILER_NODEINFO_PROCESSOR)

##############################################################################

$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_OPTIONS_PROCESSOR, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
DISABLED_WARNINGS := options, \
SRC := \
$(SRC_DIR)/org.graalvm.compiler.processor/src \
$(SRC_DIR)/org.graalvm.compiler.options.processor/src \
, \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.options.processor, \
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.options.processor.jar, \
))

TARGETS += $(BUILD_VM_COMPILER_OPTIONS_PROCESSOR)

##############################################################################

$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
SRC := \
$(SRC_DIR)/org.graalvm.compiler.processor/src \
$(SRC_DIR)/org.graalvm.compiler.replacements.processor/src \
, \
EXCLUDE_FILES := $(EXCLUDE_FILES), \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier, \
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar, \
DISABLED_WARNINGS := options, \
))

TARGETS += $(BUILD_VM_COMPILER_REPLACEMENTS_PROCESSOR)

##############################################################################

$(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR, \
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
SRC := \
$(SRC_DIR)/org.graalvm.compiler.processor/src \
$(SRC_DIR)/org.graalvm.compiler.serviceprovider.processor/src \
, \
EXCLUDE_FILES := $(EXCLUDE_FILES), \
BIN := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor, \
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.serviceprovider.processor.jar, \
DISABLED_WARNINGS := options, \
))

TARGETS += $(BUILD_VM_COMPILER_SERVICEPROVIDER_PROCESSOR)

##############################################################################
endif

all: $(TARGETS)

.PHONY: all
@@ -662,18 +662,6 @@ $(eval $(call SetupTarget, test-image-libtest-jtreg-native, \
DEPS := build-test-libtest-jtreg-native, \
))

$(eval $(call SetupTarget, build-test-hotspot-jtreg-graal, \
MAKEFILE := test/JtregGraalUnit, \
TARGET := build-test-hotspot-jtreg-graal, \
DEPS := exploded-image, \
))

$(eval $(call SetupTarget, test-image-hotspot-jtreg-graal, \
MAKEFILE := test/JtregGraalUnit, \
TARGET := test-image-hotspot-jtreg-graal, \
DEPS := build-test-hotspot-jtreg-graal, \
))

ifneq ($(GTEST_FRAMEWORK_SRC), )
$(eval $(call SetupTarget, test-image-hotspot-gtest, \
MAKEFILE := hotspot/test/GtestImage, \
@@ -877,18 +865,6 @@ else
# copied and processed.
java.desktop-gensrc-src: java.base-gensrc java.base-copy

# The annotation processing for jdk.internal.vm.compiler
# and jdk.internal.vm.compiler.management needs classes from the current JDK.
jdk.internal.vm.compiler-gensrc-src: $(addsuffix -java, \
$(call FindTransitiveDepsForModule, jdk.internal.vm.compiler))
jdk.internal.vm.compiler.management-gensrc-src: $(addsuffix -java, \
$(call FindTransitiveDepsForModule, jdk.internal.vm.compiler.management))

# For these modules, the gensrc step is generating a module-info.java.extra
# file to be processed by the gensrc-moduleinfo target.
jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src
jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src

jdk.jdeps-gendata: java

# The ct.sym generation uses all the moduleinfos as input
@@ -1176,10 +1152,6 @@ else
ifneq ($(GTEST_FRAMEWORK_SRC), )
test-image: test-image-hotspot-gtest
endif

ifeq ($(INCLUDE_GRAAL), true)
test-image: test-image-hotspot-jtreg-graal
endif
endif

ifeq ($(BUILD_FAILURE_HANDLER), true)
@@ -818,7 +818,6 @@ define SetupRunJtregTestBody
endif

$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR)
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_GRAAL_DIR=$(TEST_IMAGE_DIR)/hotspot/jtreg/graal

ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), )
$1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)"
@@ -44,7 +44,7 @@
m4_define(jvm_features_valid, m4_normalize( \
ifdef([custom_jvm_features_valid], custom_jvm_features_valid) \
\
cds compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check \
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 \
))
@@ -61,7 +61,6 @@ m4_define(jvm_feature_desc_compiler2, [enable hotspot compiler C2])
m4_define(jvm_feature_desc_dtrace, [enable dtrace support])
m4_define(jvm_feature_desc_epsilongc, [include the epsilon (no-op) garbage collector])
m4_define(jvm_feature_desc_g1gc, [include the G1 garbage collector])
m4_define(jvm_feature_desc_graal, [enable Graal (jdk.internal.vm.compiler)])
m4_define(jvm_feature_desc_jfr, [enable JDK Flight Recorder (JFR)])
m4_define(jvm_feature_desc_jni_check, [enable -Xcheck:jni support])
m4_define(jvm_feature_desc_jvmci, [enable JVM Compiler Interface (JVMCI)])
@@ -266,25 +265,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
])
])

###############################################################################
# Check if the feature 'graal' is available on this platform.
#
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_GRAAL],
[
JVM_FEATURES_CHECK_AVAILABILITY(graal, [
AC_MSG_CHECKING([if platform is supported by Graal])
# Graal is only available where JVMCI is available since it requires JVMCI.
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
AC_MSG_RESULT([yes])
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
AVAILABLE=false
fi
])
])

###############################################################################
# Check if the feature 'jfr' is available on this platform.
#
@@ -412,7 +392,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_PREPARE_PLATFORM],
JVM_FEATURES_CHECK_CDS
JVM_FEATURES_CHECK_DTRACE
JVM_FEATURES_CHECK_GRAAL
JVM_FEATURES_CHECK_JFR
JVM_FEATURES_CHECK_JVMCI
JVM_FEATURES_CHECK_SHENANDOAHGC
@@ -446,17 +425,17 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
JVM_FEATURES_VARIANT_UNAVAILABLE="cds minimal zero"
elif test "x$variant" = "xzero"; then
JVM_FEATURES_VARIANT_UNAVAILABLE="cds compiler1 compiler2 \
graal jvmci minimal zgc"
jvmci minimal zgc"
else
JVM_FEATURES_VARIANT_UNAVAILABLE="minimal zero"
fi
# Check which features should be off by default for this JVM variant.
if test "x$variant" = "xclient"; then
JVM_FEATURES_VARIANT_FILTER="compiler2 graal jvmci link-time-opt opt-size"
JVM_FEATURES_VARIANT_FILTER="compiler2 jvmci link-time-opt opt-size"
elif test "x$variant" = "xminimal"; then
JVM_FEATURES_VARIANT_FILTER="cds compiler2 dtrace epsilongc g1gc \
graal jfr jni-check jvmci jvmti management nmt parallelgc services \
jfr jni-check jvmci jvmti management nmt parallelgc services \
shenandoahgc vm-structs zgc"
if test "x$OPENJDK_TARGET_CPU" = xarm ; then
JVM_FEATURES_VARIANT_FILTER="$JVM_FEATURES_VARIANT_FILTER opt-size"
@@ -466,7 +445,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
link-time-opt"
fi
elif test "x$variant" = "xcore"; then
JVM_FEATURES_VARIANT_FILTER="compiler1 compiler2 graal jvmci \
JVM_FEATURES_VARIANT_FILTER="compiler1 compiler2 jvmci \
link-time-opt opt-size"
elif test "x$variant" = "xzero"; then
JVM_FEATURES_VARIANT_FILTER="jfr link-time-opt opt-size"
@@ -542,11 +521,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
[
variant=$1
# Verify that dependencies are met for inter-feature relations.
if JVM_FEATURES_IS_ACTIVE(graal) && ! JVM_FEATURES_IS_ACTIVE(jvmci); then
AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci' for variant '$variant'])
fi
if JVM_FEATURES_IS_ACTIVE(jvmci) && ! (JVM_FEATURES_IS_ACTIVE(compiler1) || \
JVM_FEATURES_IS_ACTIVE(compiler2)); then
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1' for variant '$variant'])
@@ -565,9 +539,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
if ! JVM_FEATURES_IS_ACTIVE(cds); then
ENABLE_CDS="false"
fi
if ! JVM_FEATURES_IS_ACTIVE(graal); then
INCLUDE_GRAAL="false"
fi
if ! JVM_FEATURES_IS_ACTIVE(jvmci); then
INCLUDE_JVMCI="false"
fi
@@ -593,7 +564,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_SETUP],
# and disable them in JVM_FEATURES_VERIFY if a variant is found that are
# missing any of them.
ENABLE_CDS="true"
INCLUDE_GRAAL="true"
INCLUDE_JVMCI="true"
for variant in $JVM_VARIANTS; do
@@ -630,7 +600,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_SETUP],
AC_SUBST(JVM_FEATURES_zero)
AC_SUBST(JVM_FEATURES_custom)
AC_SUBST(INCLUDE_GRAAL)
AC_SUBST(INCLUDE_JVMCI)
])
@@ -23,38 +23,6 @@
# questions.
#

###############################################################################
#
# Check for graalunit libs, needed for running graalunit tests.
#
AC_DEFUN_ONCE([LIB_TESTS_SETUP_GRAALUNIT],
[
AC_ARG_WITH(graalunit-lib, [AS_HELP_STRING([--with-graalunit-lib],
[specify location of 3rd party libraries used by Graal unit tests])])
GRAALUNIT_LIB=
if test "x${with_graalunit_lib}" != x; then
AC_MSG_CHECKING([for graalunit libs])
if test "x${with_graalunit_lib}" = xno; then
AC_MSG_RESULT([disabled, graalunit tests can not be run])
elif test "x${with_graalunit_lib}" = xyes; then
AC_MSG_RESULT([not specified])
AC_MSG_ERROR([You must specify the path to 3rd party libraries used by Graal unit tests])
else
GRAALUNIT_LIB="${with_graalunit_lib}"
if test ! -d "${GRAALUNIT_LIB}"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find graalunit 3rd party libraries as specified. (${with_graalunit_lib})])
else
AC_MSG_RESULT([$GRAALUNIT_LIB])
fi
fi
fi
UTIL_FIXUP_PATH([GRAALUNIT_LIB])
AC_SUBST(GRAALUNIT_LIB)
])

###############################################################################
#
# Setup and check for gtest framework source files
@@ -103,7 +103,6 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
LIB_SETUP_LIBFFI
LIB_SETUP_BUNDLED_LIBS
LIB_SETUP_MISC_LIBS
LIB_TESTS_SETUP_GRAALUNIT
LIB_TESTS_SETUP_GTEST
BASIC_JDKLIB_LIBS=""
@@ -392,7 +392,6 @@ LIBFFI_LIBS:=@LIBFFI_LIBS@
LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
GRAALUNIT_LIB := @GRAALUNIT_LIB@
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@

STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@
@@ -850,7 +849,6 @@ PNG_CFLAGS:=@PNG_CFLAGS@
#

INCLUDE_SA=@INCLUDE_SA@
INCLUDE_GRAAL=@INCLUDE_GRAAL@
INCLUDE_JVMCI=@INCLUDE_JVMCI@

OS_VERSION_MAJOR:=@OS_VERSION_MAJOR@
@@ -64,11 +64,9 @@ ifeq ($(INCLUDE_JVMCI), false)
MODULES_FILTER += jdk.internal.vm.ci
endif

# Filter out Graal specific modules if Graal is disabled
ifeq ($(INCLUDE_GRAAL), false)
MODULES_FILTER += jdk.internal.vm.compiler
MODULES_FILTER += jdk.internal.vm.compiler.management
endif
# Filter out Graal specific modules
MODULES_FILTER += jdk.internal.vm.compiler

This comment has been minimized.

@erikj79

erikj79 Apr 12, 2021
Member

If we are unconditionally filtering out these modules, then why leave the module-info.java files in at all?

This comment has been minimized.

@vnkozlov

vnkozlov Apr 12, 2021
Author Contributor

We filter out because we can't build Graal anymore. But we need these module-info.java files because JVMCI's module-info.java references them:
https://github.com/openjdk/jdk/blob/master/src/jdk.internal.vm.ci/share/classes/module-info.java#L26

Otherwise we can't build JVMCI which we continue to support.

I filed followup RFE to implement Alan's suggestion to use Module API which will allow to remove these files later:
https://bugs.openjdk.java.net/browse/JDK-8265091

This comment has been minimized.

@erikj79

erikj79 Apr 12, 2021
Member

Right, I thought I saw something about modules that Alan commented on, but couldn't find it. All good then.

MODULES_FILTER += jdk.internal.vm.compiler.management

# jpackage is only on windows, macosx, and linux
ifeq ($(call isTargetOs, windows macosx linux), false)
@@ -46,6 +46,4 @@ LANGTOOLS_MODULES= \
HOTSPOT_MODULES= \
jdk.hotspot.agent \
jdk.internal.vm.ci \
jdk.internal.vm.compiler \
jdk.internal.vm.compiler.management \
#
@@ -251,7 +251,6 @@ var getJibProfilesCommon = function (input, data) {
configure_args: concat("--enable-jtreg-failure-handler",
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
"--disable-manpages",
"--disable-jvm-feature-graal",
"--disable-jvm-feature-shenandoahgc",
versionArgs(input, common))
};
@@ -61,8 +61,6 @@ BOOT_MODULES= \
# should carefully be considered if it should be upgradeable or not.
UPGRADEABLE_PLATFORM_MODULES= \
java.compiler \
jdk.internal.vm.compiler \
jdk.internal.vm.compiler.management \
#

PLATFORM_MODULES= \
@@ -113,7 +113,6 @@ ifeq ($(call isTargetOs, windows), true)
-hidePath .jcheck \
-hidePath jdk.hotspot.agent \
-hidePath jdk.internal.vm.ci \
-hidePath jdk.internal.vm.compiler \
-hidePath jdk.jfr \
-compiler VC10 \
-jdkTargetRoot $(call FixPath, $(JDK_OUTPUTDIR)) \