Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
60adf8f
8338017: Add AOT command-line flag aliases
iklam Jul 27, 2024
1010e4d
8338018: Rename ClassPrelinker to AOTConstantPoolResolver
iklam Aug 8, 2024
4f06fe7
Fixed whitespaces
iklam Aug 8, 2024
bad6a61
Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' i…
iklam Aug 8, 2024
4021a78
Merge branch 'master' into jep-483-step-01-8338017-add-aot-command-li…
iklam Aug 13, 2024
eed5879
Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' i…
iklam Aug 13, 2024
22ba315
8329706: Implement -XX:+AOTClassLinking
iklam Aug 15, 2024
daaa2ee
8293187: Support sun.invoke.util.Wrapper in CDS archive heap
iklam Aug 15, 2024
4446991
8293337: Archive method handle intrinsics
iklam Aug 20, 2024
298ec69
Simplified implemented by AOTClassInitializer.
iklam Aug 27, 2024
ed397fb
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Aug 28, 2024
61aafed
8311071: Add an option to avoid using SoftReferences in java.lang.inv…
iklam Aug 20, 2024
c13d7a9
8293336: Store LambdaForms in CDS archive
iklam Aug 29, 2024
5c4c795
Merge branch 'master' of https://github.com/openjdk/jdk into jep-483-…
iklam Aug 29, 2024
1fd5b15
Fixed copyright dates
iklam Aug 29, 2024
8945372
Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' i…
iklam Aug 29, 2024
38294df
Merge branch 'jep-483-step-02-8338018-rename-class-prelinker-to-aot-c…
iklam Aug 29, 2024
ae27f47
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Aug 29, 2024
4ffa9a6
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Aug 29, 2024
9a58145
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Aug 29, 2024
1da2ed9
@dholmes-ora comments: do not check for -XX:AOTMode=create in JLI java.c
iklam Aug 29, 2024
fed4dfe
Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' i…
iklam Sep 3, 2024
1769d3b
Merge branch 'jep-483-step-02-8338018-rename-class-prelinker-to-aot-c…
iklam Sep 3, 2024
a5e7eb5
More clean up
iklam Sep 3, 2024
717eb23
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Sep 4, 2024
8241178
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 5, 2024
0f31b25
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Sep 5, 2024
6f5fe49
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Sep 5, 2024
282541b
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Sep 5, 2024
ac1ed79
@dholmes-ora comments
iklam Sep 7, 2024
0441aef
@dholmes-ora comments: logging indents
iklam Sep 10, 2024
f12a138
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Sep 10, 2024
dd1622f
More clean up for JDK-8293187
iklam Sep 10, 2024
5bba4ad
@adinn comments
iklam Sep 11, 2024
b74be96
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Sep 11, 2024
6fe2f46
more cleanup
iklam Sep 12, 2024
e050827
Clean up; removed unrelated changes in classPrinter.cpp
iklam Sep 12, 2024
346d655
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 12, 2024
9385da0
some clean up
iklam Sep 12, 2024
66a4ff4
@ashu-mehra comments
iklam Sep 12, 2024
bcddf96
@ashu-mehra reviews
iklam Sep 16, 2024
f630cd3
@vnkozlov comments
iklam Sep 16, 2024
e382eec
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 16, 2024
e15e76c
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Sep 16, 2024
cc51c42
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 16, 2024
a57e9f0
@vnkozlov comment - added NOT_CDS_RETURN
iklam Sep 17, 2024
82c2707
more clean up
iklam Sep 17, 2024
8e39118
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Sep 17, 2024
4e9668a
@ashu-mehra comment: move code outside of call_initPhase2(); also ren…
iklam Sep 17, 2024
bedf9a2
minor comment fix
iklam Sep 17, 2024
867e443
Do not use system property to limit usage to only CDS static dumps
iklam Sep 17, 2024
21b8f6f
Improved in-line comments
iklam Sep 18, 2024
aa9629d
@ashu-mehra comment: assert that ConstantDescs, etc, must be initialized
iklam Sep 18, 2024
36baf57
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Sep 18, 2024
16b51d5
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 18, 2024
db87b24
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Sep 18, 2024
98c45b7
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Sep 18, 2024
cfe2cc8
fixed merge
iklam Sep 18, 2024
be1d0ef
Fixed ZERO build
iklam Sep 18, 2024
0970a0e
erge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking' …
iklam Sep 18, 2024
988f101
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 18, 2024
90bb890
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Sep 18, 2024
76ef3b3
@dholmes-ora review comments
iklam Sep 18, 2024
1e1b580
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Sep 18, 2024
99462a8
Fixed typo
iklam Sep 19, 2024
3215c00
@dholmes-ora comments
iklam Sep 19, 2024
dd5a5ba
@dholmes-ora comments
iklam Sep 19, 2024
6d895a7
Filter out lambdas that use excluded classes
iklam Sep 20, 2024
287757a
clean up
iklam Sep 20, 2024
64ff73f
Merge branch 'master' into jep-483-step-01-8338017-add-aot-command-li…
iklam Sep 20, 2024
49dbfa6
Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' i…
iklam Sep 20, 2024
6029b35
Merge branch 'jep-483-step-02-8338018-rename-class-prelinker-to-aot-c…
iklam Sep 20, 2024
e727fb2
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Sep 20, 2024
7b0d6f8
@macarte comments
iklam Sep 23, 2024
6615745
@coleenp comments
iklam Sep 23, 2024
e417bea
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Sep 23, 2024
90bdacb
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Sep 23, 2024
1c98bfa
@liach and @cl4es comments
iklam Sep 23, 2024
5fc834d
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Sep 23, 2024
59dd887
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 24, 2024
e7eca90
clean up
iklam Sep 24, 2024
b383d24
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Sep 24, 2024
cd9b938
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Sep 24, 2024
ff1a9d9
clean up
iklam Sep 24, 2024
e69f5ff
Fix JDK-8340836
iklam Sep 25, 2024
f10809a
more clean up
iklam Sep 25, 2024
1aa6328
Merge branch 'master' into jep-483-step-01-8338017-add-aot-command-li…
iklam Sep 25, 2024
26df2d5
Merge branch 'master' of https://github.com/openjdk/jdk into jep-483-…
iklam Sep 25, 2024
0859631
Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' i…
iklam Sep 30, 2024
3cdc763
Merge branch 'jep-483-step-02-8338018-rename-class-prelinker-to-aot-c…
iklam Sep 30, 2024
563bccb
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Sep 30, 2024
180375a
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Sep 30, 2024
203577e
more clean up
iklam Sep 30, 2024
ffa9669
comments from @adinn and @ashu-mehra
iklam Oct 1, 2024
244a5de
changed dumptime_xxx to dump_time_xxx to be consistent with other fie…
iklam Oct 1, 2024
1ff71a6
Cleaned up AOTClassInitializer::can_archive_initialized_mirror()
iklam Oct 1, 2024
81aacd6
Merge branch 'remerge' into jep-483-step-07-8293336-store-lambda-form…
iklam Oct 1, 2024
b818714
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Oct 1, 2024
a266873
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Oct 1, 2024
433d8d0
Limit the use of AOTHolder
iklam Oct 1, 2024
ba6f280
For aot-inited classes, require the <clinit> of all supertypes to be …
iklam Oct 2, 2024
af65ba5
Adjust TEST.groups after merge with mainline
iklam Oct 2, 2024
9b78742
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Oct 2, 2024
806e6d9
Require all <clinit> of supertypes of aot-inited classes to be execut…
iklam Oct 2, 2024
1b067b7
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Oct 2, 2024
49eb47b
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Oct 2, 2024
cb0a3d8
Clean up of aotClassInitializer and cdsHeaVerifier; added lambda test…
iklam Oct 3, 2024
195303f
improve checks for not changing <clinit> order for aot linking of lam…
iklam Oct 8, 2024
ebfbb23
@adinn comments
iklam Oct 9, 2024
e9995ea
8341600: [premain] Automatic aot-init of classes used by java.lang.in…
iklam Oct 11, 2024
039fb65
Fixed JDK-8341988: jstack launched with AOT cache created with -XX:+A…
iklam Oct 13, 2024
d02959b
Merge branch 'master' into jep-483-step-01-8338017-add-aot-command-li…
iklam Oct 14, 2024
c068db8
Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' i…
iklam Oct 14, 2024
5060907
Merge branch 'jep-483-step-02-8338018-rename-class-prelinker-to-aot-c…
iklam Oct 14, 2024
02ac6d6
Added more exclusions to hotspot_aot_classlinking test group, as thes…
iklam Oct 14, 2024
5c7409b
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Oct 14, 2024
22c47d3
Missed one file from last commit
iklam Oct 14, 2024
249489e
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Oct 14, 2024
84777aa
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Oct 14, 2024
5c6e433
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Oct 14, 2024
e46b910
reviews from @iwanowww and @rose00 -- move USE_SOFT_CACHE to MethodHa…
iklam Oct 15, 2024
bbb6a5e
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Oct 15, 2024
382446d
@DanHeidinga comments -- added ConcurrentHashMap::runtimeSetup() to i…
iklam Oct 15, 2024
6bb38cb
Fixed whitespaces
iklam Oct 15, 2024
dd4f0c9
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Oct 15, 2024
a935627
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Oct 15, 2024
11391c3
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Oct 16, 2024
3433d7b
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Oct 16, 2024
a6ad908
@DanHeidinga comments -- added comments and asserts related to ClassL…
iklam Oct 16, 2024
4be6a25
Fixed typo in last commit; fixed header inclusion order
iklam Oct 16, 2024
1e79b7e
@coleenp: No need to hold InvokeMethodIntrinsicTable_lock during boot…
iklam Oct 16, 2024
7bab10b
@liach comments -- added comments; added asserts for HashMap safety i…
iklam Oct 17, 2024
030cac2
@rose00 comments -- tighten up the checks for what can or cannot be a…
iklam Oct 18, 2024
3f09464
Added ClaimMetadataVisitingOopIterateClosure::assert_is_pending_aot_l…
iklam Oct 18, 2024
bdba2b6
@stefank comment -- changed to assert(is_pending_aot_linked_class(k),…
iklam Oct 21, 2024
a9ae70e
@iwanowww comment: no need for @Stable for USE_SOFT_CACHE; use final …
iklam Oct 21, 2024
75b5dc2
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Oct 21, 2024
9d3d8bd
@calvinccheung review comments
iklam Oct 21, 2024
cc4731c
In respond to @ashu-mehra review: add comment about why the main modu…
iklam Oct 21, 2024
044f28a
dholmes-ora comment - removed direct_only parameter from InstanceKlas…
iklam Oct 21, 2024
07e80df
Fixed JDK-8342438: runtime/cds/SharedBaseAddress.java fails with Para…
iklam Oct 21, 2024
19bd676
fixed minimal build
iklam Oct 21, 2024
6916e18
@ashu-mehra comments: renamed to find_required_hidden_classes(), etc,…
iklam Oct 22, 2024
ceea052
Fixed JDK-8342723: Crash with "assert(_instance != nullptr) failed: c…
iklam Oct 22, 2024
d366389
Fixed JDK-8342732: java/lang/invoke/MethodTypeSecurityManager.java fa…
iklam Oct 22, 2024
fbe3095
@DanHeidinga comments - removed dead code; added assert with ArchiveB…
iklam Oct 22, 2024
ccaad3c
(1) @ashu-mehra review comments - code simplfication; (2) fix bug in …
iklam Oct 22, 2024
021466d
Better fix for JDK-8342438: runtime/cds/SharedBaseAddress.java fails …
iklam Oct 22, 2024
6affd39
Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking'…
iklam Oct 22, 2024
27337ea
Merge branch 'jep-483-step-04-8293187-support-sun-invoke-util-wrapper…
iklam Oct 22, 2024
875c066
Merge branch 'jep-483-step-05-8293337-archive-method-handle-intrinsic…
iklam Oct 22, 2024
f0bc1ae
Merge branch 'jep-483-step-06-8311071-avoid-soft-refs-in-java-lang-in…
iklam Oct 22, 2024
3c2c178
Merge branch 'master' into jep-483-candidate
iklam Oct 22, 2024
fd68f46
@stefank comment: include aotLinkedClassBulkLoader.hpp in iterator.in…
iklam Oct 22, 2024
c948288
@rose00 comment -- print size of MH intrinsics table
iklam Oct 22, 2024
d196929
Added test case for using --module-path with -XX:+AOTClassLinking
iklam Oct 22, 2024
3860dcf
@rose00 offline comments -- make sure the StringConcatFactory bsm doe…
iklam Oct 22, 2024
1d3daa4
Fixed bug where the BSM oops for resolved indies are not archived
iklam Oct 23, 2024
58233cc
simplified the archiving of cpCache::resolved_references() -- we rely…
iklam Oct 23, 2024
1b6c3e2
fixed test failure with "jtreg -Dtest.dynamic.cds.archive=true ..."
iklam Oct 23, 2024
c3b2368
disable test that fails with hotspot_runtime_non_cds_mode
iklam Oct 24, 2024
dd59b5f
8342907: Implement AOT testing mode for jtreg tests (authored by @kat…
iklam Oct 24, 2024
6f1624a
@ashu-mehra comment - rename/comment AOTClassLinker::add_new_candidat…
iklam Oct 30, 2024
e9a212d
Backed out 58233cc20fa22abfd711bb59aafb78e20fabc195
iklam Oct 30, 2024
703aa72
@ashu-mehra comment - renamed function to SystemDictionaryShared::sho…
iklam Oct 30, 2024
e27fe26
fixed comments
iklam Oct 30, 2024
cd6cd6d
Fixed 8343245: AOT cache creation crashes with "assert(HeapShared::is…
iklam Oct 31, 2024
6eebd18
Fixed whitespace; fixed minimal build
iklam Oct 31, 2024
849652e
reverted changes in modules.cpp to make it easy to merge with mainline
iklam Nov 1, 2024
8dfef22
8343493: Perform module checks during MetaspaceShared::map_archives()
iklam Nov 3, 2024
c423793
Merge branch 'master' into jep-483-candidate
iklam Nov 3, 2024
935dcc6
fixed merge
iklam Nov 3, 2024
c46ae0b
@DanHeidinga comment -- exit VM when runtimeSetup() fails
iklam Nov 4, 2024
d8203e7
Merge branch 'master' of https://github.com/openjdk/jdk into merge-ma…
iklam Nov 8, 2024
7b06b7c
fixed merge
iklam Nov 8, 2024
0b56324
Merge branch 'master' into jep-483-candidate
iklam Nov 8, 2024
ce4c93e
fixed merge with UseCompactObjectHeaders
iklam Nov 8, 2024
fc86c00
Merge branch 'master' into jep-483-candidate
iklam Nov 13, 2024
77b253c
Merge branch 'master' into jep-483-candidate
iklam Nov 15, 2024
daac059
fixed typo in make/RunTests.gmk comments
iklam Nov 15, 2024
b317b4b
Merge branch 'master' into jep-483-candidate
iklam Nov 15, 2024
5d9a667
Fixed test after security manager removal
iklam Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 69 additions & 3 deletions make/RunTests.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ifneq ($(TEST_VM_OPTS), )
endif

$(eval $(call ParseKeywordVariable, TEST_OPTS, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV JCOV_DIFF_CHANGESET AOT_JDK, \
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS, \
))

Expand Down Expand Up @@ -202,11 +202,12 @@ $(eval $(call SetTestOpt,JOBS,JTREG))
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
$(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
$(eval $(call SetTestOpt,REPORT,JTREG))
$(eval $(call SetTestOpt,AOT_JDK,JTREG))

$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
$(CUSTOM_JTREG_STRING_KEYWORDS), \
Expand Down Expand Up @@ -702,6 +703,58 @@ define SetJtregValue
endif
endef


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR was not tagged with the build label, and was therefore not brought to the attention of the build team.

This file contains a large number of unacceptable changes. :-( It would under no circumstance have been approved as it looks.

Please make sure that the Github labels actually matches the set of files that are changed in the PR. Skara tooling will assist in this, but the ultimate responsibility lies with the Author and Reviewers of the PR.

# Parameter 1 is the name of the rule.
#
# Remaining parameters are named arguments.
# VM_OPTIONS List of JVM arguments to use when creating AOT cache
#
# After calling this, the following variables are defined
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on
# $1_AOT_JDK_CACHE The AOT cache file to be used to run the test with
#
SetupAot = $(NamedParamsMacroTemplate)
define SetupAotBody
$1_AOT_JDK_CONF := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotconf
$1_AOT_JDK_CACHE := $$($1_TEST_SUPPORT_DIR)/aot/jdk.aotcache

$1_JAVA_TOOL_OPTS := $$(addprefix -J, $$($1_VM_OPTIONS))

$$($1_AOT_JDK_CACHE): $$(JDK_IMAGE_DIR)/release
$$(call MakeDir, $$($1_TEST_SUPPORT_DIR)/aot)

$(foreach jtool, javac javap jlink jar, \
$(info AOT: Create cache configuration for $(jtool)) \
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot.$(jtool), ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/$(jtool) $$($1_JAVA_TOOL_OPTS) \
-J-XX:AOTMode=record -J-XX:AOTConfiguration=$$($1_AOT_JDK_CONF).$(jtool) --help \
))
)

$$(info AOT: Copy $(JDK_UNDER_TEST)/lib/classlist to $$($1_AOT_JDK_CONF).jdk )
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(CP) $(JDK_UNDER_TEST)/lib/classlist $$($1_AOT_JDK_CONF).jdk \
))

$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).* > $$($1_AOT_JDK_CONF).temp
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) -v '#' | $(GREP) -v '@' | $(SORT) | \
$(SED) -e 's/id:.*//g' | uniq \
> $$($1_AOT_JDK_CONF)
$$(FIXPATH) $$(CAT) $$($1_AOT_JDK_CONF).temp | $(GREP) '@cp' | $(SORT) \
>> $$($1_AOT_JDK_CONF)

$$(info AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/aot, ( \
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
$$($1_VM_OPTIONS) -Xlog:cds,cds+class=debug:file=$$($1_AOT_JDK_CACHE).log \
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
))

$1_AOT_TARGETS += $$($1_AOT_JDK_CACHE)

endef


SetupRunJtregTest = $(NamedParamsMacroTemplate)
define SetupRunJtregTestBody
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1
Expand Down Expand Up @@ -762,6 +815,7 @@ define SetupRunJtregTestBody
JTREG_RETRY_COUNT ?= 0
JTREG_REPEAT_COUNT ?= 0
JTREG_REPORT ?= files
JTREG_AOT_JDK ?= false

ifneq ($$(JTREG_RETRY_COUNT), 0)
ifneq ($$(JTREG_REPEAT_COUNT), 0)
Expand Down Expand Up @@ -891,6 +945,17 @@ define SetupRunJtregTestBody
endif
endif

ifeq ($$(JTREG_AOT_JDK), true)
$$(info Add AOT target for $1)
$$(eval $$(call SetupAot, $1, VM_OPTIONS := $$(JTREG_ALL_OPTIONS) ))

$$(info AOT_TARGETS=$$($1_AOT_TARGETS))
$$(info AOT_JDK_CACHE=$$($1_AOT_JDK_CACHE))

$1_JTREG_BASIC_OPTIONS += -vmoption:-XX:AOTCache="$$($1_AOT_JDK_CACHE)"
endif


$$(eval $$(call SetupRunJtregTestCustom, $1))

# SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
Expand All @@ -906,6 +971,7 @@ define SetupRunJtregTestBody
JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)

clean-outputdirs-$1:
$$(call LogWarn, Clean up dirs for $1)
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)

Expand Down Expand Up @@ -953,7 +1019,7 @@ define SetupRunJtregTestBody
done
endif

run-test-$1: pre-run-test clean-outputdirs-$1
run-test-$1: clean-outputdirs-$1 pre-run-test $$($1_AOT_TARGETS)
$$(call LogWarn)
$$(call LogWarn, Running test '$$($1_TEST)')
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
Expand Down
Loading