Skip to content

Commit 694aced

Browse files
author
Vladimir Kozlov
committed
8264805: Remove the experimental Ahead-of-Time Compiler
Reviewed-by: coleenp, erikj, stefank, iignatyev, dholmes, aph, shade, iklam, mchung, iveresov
1 parent 15d4787 commit 694aced

378 files changed

Lines changed: 200 additions & 26970 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

make/RunTests.gmk

Lines changed: 7 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,7 @@ endif
4646

4747
$(eval $(call ParseKeywordVariable, TEST_OPTS, \
4848
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
49-
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
49+
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
5050
))
5151

5252
# Helper function to propagate TEST_OPTS values.
@@ -134,96 +134,6 @@ ifeq ($(GCOV_ENABLED), true)
134134
JTREG_COV_OPTIONS += -e:GCOV_PREFIX="$(GCOV_OUTPUT_DIR)"
135135
endif
136136

137-
################################################################################
138-
# Optionally create AOT libraries for specified modules before running tests.
139-
# Note, this could not be done during JDK build time.
140-
################################################################################
141-
# Parameter 1 is the name of the rule.
142-
#
143-
# Remaining parameters are named arguments.
144-
# MODULE The module to generate a library for
145-
# BIN Output directory in which to put the library
146-
# VM_OPTIONS List of JVM arguments to use when creating library
147-
# OPTIONS_VAR Name of variable to put AOT java options in
148-
# PREREQS_VAR Name of variable to put all AOT prerequisite rule targets in
149-
# for test rules to depend on
150-
#
151-
SetupAotModule = $(NamedParamsMacroTemplate)
152-
define SetupAotModuleBody
153-
$1_AOT_LIB := $$($1_BIN)/$$(call SHARED_LIBRARY,$$($1_MODULE))
154-
$1_AOT_CCLIST := $$(wildcard $$(TOPDIR)/test/hotspot/jtreg/compiler/aot/scripts/$$($1_MODULE)-list.txt)
155-
156-
# Create jaotc flags.
157-
# VM flags which don't affect AOT code generation are filtered out:
158-
# -Xcomp, -XX:+-TieredCompilation
159-
$1_JAOTC_OPTS := \
160-
-J-Xmx4g --info \
161-
$$(addprefix -J, $$(filter-out -Xcomp %TieredCompilation, $$($1_VM_OPTIONS))) \
162-
$$(addprefix --compile-commands$(SPACE), $$($1_AOT_CCLIST)) \
163-
--linker-path $$(LD_JAOTC) \
164-
#
165-
166-
ifneq ($$(filter -ea, $$($1_VM_OPTIONS)), )
167-
$1_JAOTC_OPTS += --compile-with-assertions
168-
endif
169-
170-
ifneq ($$(filter -XX:+VerifyOops, $$($1_VM_OPTIONS)), )
171-
$1_JAOTC_OPTS += -J-Dgraal.AOTVerifyOops=true
172-
endif
173-
174-
$$($1_AOT_LIB): $$(JDK_UNDER_TEST)/release \
175-
$$(call DependOnVariable, $1_JAOTC_OPTS) \
176-
$$(call DependOnVariable, JDK_UNDER_TEST)
177-
$$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@))
178-
$$(call MakeTargetDir)
179-
$$(call ExecuteWithLog, $$@, \
180-
$((COV_ENVIRONMENT) \
181-
$$(FIXPATH) $$(JDK_UNDER_TEST)/bin/jaotc \
182-
$$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \
183-
)
184-
$$(call ExecuteWithLog, $$@.check, ( \
185-
$$(FIXPATH) $$(JDK_UNDER_TEST)/bin/java \
186-
$$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions \
187-
-XX:+PrintAOT -XX:+UseAOTStrictLoading \
188-
-XX:AOTLibrary=$$@ -version \
189-
> $$@.verify-aot \
190-
))
191-
192-
$1_AOT_OPTIONS += -XX:+UnlockExperimentalVMOptions
193-
$1_AOT_OPTIONS += -XX:AOTLibrary=$$($1_AOT_LIB)
194-
$1_AOT_TARGETS += $$($1_AOT_LIB)
195-
endef
196-
197-
################################################################################
198-
# Optionally create AOT libraries before running tests.
199-
# Note, this could not be done during JDK build time.
200-
################################################################################
201-
# Parameter 1 is the name of the rule.
202-
#
203-
# Remaining parameters are named arguments.
204-
# MODULES The modules to generate a library for
205-
# VM_OPTIONS List of JVM arguments to use when creating libraries
206-
#
207-
# After calling this, the following variables are defined
208-
# $1_AOT_OPTIONS List of all java options needed to use the AOT libraries
209-
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
210-
#
211-
SetupAot = $(NamedParamsMacroTemplate)
212-
define SetupAotBody
213-
$$(info Running with AOTd libraries for $$($1_MODULES))
214-
# Put aot libraries in a separate directory so they are not deleted between
215-
# test runs and may be reused between make invocations.
216-
$$(foreach m, $$($1_MODULES), \
217-
$$(eval $$(call SetupAotModule, $1_$$m, \
218-
MODULE := $$m, \
219-
BIN := $$(TEST_SUPPORT_DIR)/aot/$1, \
220-
VM_OPTIONS := $$($1_VM_OPTIONS), \
221-
)) \
222-
$$(eval $1_AOT_OPTIONS += $$($1_$$m_AOT_OPTIONS)) \
223-
$$(eval $1_AOT_TARGETS += $$($1_$$m_AOT_TARGETS)) \
224-
)
225-
endef
226-
227137
################################################################################
228138
# Setup global test running parameters
229139
################################################################################
@@ -282,7 +192,6 @@ endif
282192

283193
$(eval $(call SetTestOpt,VM_OPTIONS,JTREG))
284194
$(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG))
285-
$(eval $(call SetTestOpt,AOT_MODULES,JTREG))
286195

287196
$(eval $(call SetTestOpt,JOBS,JTREG))
288197
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
@@ -293,7 +202,7 @@ $(eval $(call ParseKeywordVariable, JTREG, \
293202
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
294203
RETRY_COUNT MAX_OUTPUT, \
295204
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
296-
EXTRA_PROBLEM_LISTS AOT_MODULES LAUNCHER_OPTIONS, \
205+
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS, \
297206
))
298207

299208
ifneq ($(JTREG), )
@@ -305,11 +214,10 @@ endif
305214

306215
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST))
307216
$(eval $(call SetTestOpt,JAVA_OPTIONS,GTEST))
308-
$(eval $(call SetTestOpt,AOT_MODULES,GTEST))
309217

310218
$(eval $(call ParseKeywordVariable, GTEST, \
311219
SINGLE_KEYWORDS := REPEAT, \
312-
STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \
220+
STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS, \
313221
))
314222

315223
ifneq ($(GTEST), )
@@ -592,14 +500,7 @@ define SetupRunGtestTestBody
592500
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT)
593501
endif
594502

595-
ifneq ($$(GTEST_AOT_MODULES), )
596-
$$(eval $$(call SetupAot, $1, \
597-
MODULES := $$(GTEST_AOT_MODULES), \
598-
VM_OPTIONS := $$(GTEST_VM_OPTIONS) $$(GTEST_JAVA_OPTIONS), \
599-
))
600-
endif
601-
602-
run-test-$1: pre-run-test $$($1_AOT_TARGETS)
503+
run-test-$1: pre-run-test
603504
$$(call LogWarn)
604505
$$(call LogWarn, Running test '$$($1_TEST)')
605506
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
@@ -610,7 +511,7 @@ define SetupRunGtestTestBody
610511
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \
611512
--gtest_catch_exceptions=0 \
612513
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \
613-
$$(GTEST_JAVA_OPTIONS) $$($1_AOT_OPTIONS) \
514+
$$(GTEST_JAVA_OPTIONS) \
614515
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
615516
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
616517
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
@@ -934,17 +835,6 @@ define SetupRunJtregTestBody
934835
endif
935836
endif
936837

937-
ifneq ($$(JTREG_AOT_MODULES), )
938-
$$(eval $$(call SetupAot, $1, \
939-
MODULES := $$(JTREG_AOT_MODULES), \
940-
VM_OPTIONS := $$(JTREG_VM_OPTIONS) $$(JTREG_JAVA_OPTIONS), \
941-
))
942-
endif
943-
944-
ifneq ($$($1_AOT_OPTIONS), )
945-
$1_JTREG_BASIC_OPTIONS += -vmoptions:"$$($1_AOT_OPTIONS)"
946-
endif
947-
948838
clean-workdir-$1:
949839
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
950840

@@ -979,7 +869,7 @@ define SetupRunJtregTestBody
979869
done
980870
endif
981871

982-
run-test-$1: pre-run-test clean-workdir-$1 $$($1_AOT_TARGETS)
872+
run-test-$1: pre-run-test clean-workdir-$1
983873
$$(call LogWarn)
984874
$$(call LogWarn, Running test '$$($1_TEST)')
985875
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \

make/RunTestsPrebuilt.gmk

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -222,25 +222,6 @@ ifeq ($(MEMORY_SIZE), )
222222
MEMORY_SIZE := 1024
223223
endif
224224

225-
# Setup LD for AOT support
226-
ifneq ($(DEVKIT_HOME), )
227-
ifeq ($(OPENJDK_TARGET_OS), windows)
228-
LD_JAOTC := $(DEVKIT_HOME)/VC/bin/x64/link.exe
229-
LIBRARY_PREFIX :=
230-
SHARED_LIBRARY_SUFFIX := .dll
231-
else ifeq ($(OPENJDK_TARGET_OS), linux)
232-
LD_JAOTC := $(DEVKIT_HOME)/bin/ld
233-
LIBRARY_PREFIX := lib
234-
SHARED_LIBRARY_SUFFIX := .so
235-
else ifeq ($(OPENJDK_TARGET_OS), macosx)
236-
LD_JAOTC := $(DEVKIT_HOME)/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
237-
LIBRARY_PREFIX := lib
238-
SHARED_LIBRARY_SUFFIX := .dylib
239-
endif
240-
else
241-
LD := ld
242-
endif
243-
244225
ifneq ($(wildcard $(JDK_IMAGE_DIR)/template.xml), )
245226
TEST_OPTS_JCOV := true
246227
JCOV_IMAGE_DIR := $(JDK_IMAGE_DIR)
@@ -286,9 +267,6 @@ $(call CreateNewSpec, $(NEW_SPEC), \
286267
OPENJDK_TARGET_CPU_ENDIAN := $(OPENJDK_TARGET_CPU_ENDIAN), \
287268
NUM_CORES := $(NUM_CORES), \
288269
MEMORY_SIZE := $(MEMORY_SIZE), \
289-
LD_JAOTC := $(LD_JAOTC), \
290-
LIBRARY_PREFIX := $(LIBRARY_PREFIX), \
291-
SHARED_LIBRARY_SUFFIX := $(SHARED_LIBRARY_SUFFIX), \
292270
include $(TOPDIR)/make/RunTestsPrebuiltSpec.gmk, \
293271
TEST_OPTS_JCOV := $(TEST_OPTS_JCOV), \
294272
$(CUSTOM_NEW_SPEC_LINE), \

make/autoconf/jvm-features.m4

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
m4_define(jvm_features_valid, m4_normalize( \
4545
ifdef([custom_jvm_features_valid], custom_jvm_features_valid) \
4646
\
47-
aot cds compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check \
47+
cds compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check \
4848
jvmci jvmti link-time-opt management minimal nmt opt-size parallelgc \
4949
serialgc services shenandoahgc static-build vm-structs zero zgc \
5050
))
@@ -55,7 +55,6 @@ m4_define(jvm_features_deprecated, m4_normalize(
5555
))
5656

5757
# Feature descriptions
58-
m4_define(jvm_feature_desc_aot, [enable ahead of time compilation (AOT)])
5958
m4_define(jvm_feature_desc_cds, [enable class data sharing (CDS)])
6059
m4_define(jvm_feature_desc_compiler1, [enable hotspot compiler C1])
6160
m4_define(jvm_feature_desc_compiler2, [enable hotspot compiler C2])
@@ -94,7 +93,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_PARSE_OPTIONS],
9493
9594
# For historical reasons, some jvm features have their own, shorter names.
9695
# Keep those as aliases for the --enable-jvm-feature-* style arguments.
97-
UTIL_ALIASED_ARG_ENABLE(aot, --enable-jvm-feature-aot)
9896
UTIL_ALIASED_ARG_ENABLE(cds, --enable-jvm-feature-cds)
9997
UTIL_ALIASED_ARG_ENABLE(dtrace, --enable-jvm-feature-dtrace)
10098
@@ -229,34 +227,6 @@ AC_DEFUN([JVM_FEATURES_CHECK_AVAILABILITY],
229227
fi
230228
])
231229

232-
###############################################################################
233-
# Check if the feature 'aot' is available on this platform.
234-
#
235-
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_AOT],
236-
[
237-
JVM_FEATURES_CHECK_AVAILABILITY(aot, [
238-
AC_MSG_CHECKING([if platform is supported by AOT])
239-
# AOT is only available where JVMCI is available since it requires JVMCI.
240-
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
241-
AC_MSG_RESULT([yes])
242-
elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then
243-
AC_MSG_RESULT([yes])
244-
else
245-
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
246-
AVAILABLE=false
247-
fi
248-
249-
AC_MSG_CHECKING([if AOT source code is present])
250-
if test -e "${TOPDIR}/src/jdk.internal.vm.compiler" && \
251-
test -e "${TOPDIR}/src/jdk.aot"; then
252-
AC_MSG_RESULT([yes])
253-
else
254-
AC_MSG_RESULT([no, missing src/jdk.internal.vm.compiler or src/jdk.aot])
255-
AVAILABLE=false
256-
fi
257-
])
258-
])
259-
260230
###############################################################################
261231
# Check if the feature 'cds' is available on this platform.
262232
#
@@ -440,7 +410,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_PREPARE_PLATFORM],
440410
# The checks below should add unavailable features to
441411
# JVM_FEATURES_PLATFORM_UNAVAILABLE.
442412
443-
JVM_FEATURES_CHECK_AOT
444413
JVM_FEATURES_CHECK_CDS
445414
JVM_FEATURES_CHECK_DTRACE
446415
JVM_FEATURES_CHECK_GRAAL
@@ -476,17 +445,17 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
476445
elif test "x$variant" = "xcore"; then
477446
JVM_FEATURES_VARIANT_UNAVAILABLE="cds minimal zero"
478447
elif test "x$variant" = "xzero"; then
479-
JVM_FEATURES_VARIANT_UNAVAILABLE="aot cds compiler1 compiler2 \
448+
JVM_FEATURES_VARIANT_UNAVAILABLE="cds compiler1 compiler2 \
480449
graal jvmci minimal zgc"
481450
else
482451
JVM_FEATURES_VARIANT_UNAVAILABLE="minimal zero"
483452
fi
484453
485454
# Check which features should be off by default for this JVM variant.
486455
if test "x$variant" = "xclient"; then
487-
JVM_FEATURES_VARIANT_FILTER="aot compiler2 graal jvmci link-time-opt opt-size"
456+
JVM_FEATURES_VARIANT_FILTER="compiler2 graal jvmci link-time-opt opt-size"
488457
elif test "x$variant" = "xminimal"; then
489-
JVM_FEATURES_VARIANT_FILTER="aot cds compiler2 dtrace epsilongc g1gc \
458+
JVM_FEATURES_VARIANT_FILTER="cds compiler2 dtrace epsilongc g1gc \
490459
graal jfr jni-check jvmci jvmti management nmt parallelgc services \
491460
shenandoahgc vm-structs zgc"
492461
if test "x$OPENJDK_TARGET_CPU" = xarm ; then
@@ -497,7 +466,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
497466
link-time-opt"
498467
fi
499468
elif test "x$variant" = "xcore"; then
500-
JVM_FEATURES_VARIANT_FILTER="aot compiler1 compiler2 graal jvmci \
469+
JVM_FEATURES_VARIANT_FILTER="compiler1 compiler2 graal jvmci \
501470
link-time-opt opt-size"
502471
elif test "x$variant" = "xzero"; then
503472
JVM_FEATURES_VARIANT_FILTER="jfr link-time-opt opt-size"
@@ -574,10 +543,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
574543
variant=$1
575544
576545
# Verify that dependencies are met for inter-feature relations.
577-
if JVM_FEATURES_IS_ACTIVE(aot) && ! JVM_FEATURES_IS_ACTIVE(graal); then
578-
AC_MSG_ERROR([Specified JVM feature 'aot' requires feature 'graal' for variant '$variant'])
579-
fi
580-
581546
if JVM_FEATURES_IS_ACTIVE(graal) && ! JVM_FEATURES_IS_ACTIVE(jvmci); then
582547
AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci' for variant '$variant'])
583548
fi
@@ -597,9 +562,6 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
597562
598563
# For backwards compatibility, disable a feature "globally" if one variant
599564
# is missing the feature.
600-
if ! JVM_FEATURES_IS_ACTIVE(aot); then
601-
ENABLE_AOT="false"
602-
fi
603565
if ! JVM_FEATURES_IS_ACTIVE(cds); then
604566
ENABLE_CDS="false"
605567
fi
@@ -630,7 +592,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_SETUP],
630592
# For backwards compatibility, tentatively enable these features "globally",
631593
# and disable them in JVM_FEATURES_VERIFY if a variant is found that are
632594
# missing any of them.
633-
ENABLE_AOT="true"
634595
ENABLE_CDS="true"
635596
INCLUDE_GRAAL="true"
636597
INCLUDE_JVMCI="true"
@@ -669,7 +630,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_SETUP],
669630
AC_SUBST(JVM_FEATURES_zero)
670631
AC_SUBST(JVM_FEATURES_custom)
671632
672-
AC_SUBST(ENABLE_AOT)
673633
AC_SUBST(INCLUDE_GRAAL)
674634
AC_SUBST(INCLUDE_JVMCI)
675635

make/autoconf/spec.gmk.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,6 @@ CPP := @CPP@
524524
# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
525525
LD := @LD@
526526

527-
# Linker used by the jaotc tool for AOT compilation.
528-
LD_JAOTC:=@LD_JAOTC@
529-
530527
# Xcode SDK path
531528
SDKROOT:=@SDKROOT@
532529

@@ -766,7 +763,6 @@ TAR_INCLUDE_PARAM:=@TAR_INCLUDE_PARAM@
766763
TAR_SUPPORTS_TRANSFORM:=@TAR_SUPPORTS_TRANSFORM@
767764

768765
# Build setup
769-
ENABLE_AOT:=@ENABLE_AOT@
770766
USE_EXTERNAL_LIBJPEG:=@USE_EXTERNAL_LIBJPEG@
771767
USE_EXTERNAL_LIBGIF:=@USE_EXTERNAL_LIBGIF@
772768
USE_EXTERNAL_LIBZ:=@USE_EXTERNAL_LIBZ@

0 commit comments

Comments
 (0)