-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8329706: Implement -XX:+AOTClassLinking #20843
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
8329706: Implement -XX:+AOTClassLinking #20843
Conversation
…p-resolver' into jep-483-step-03-8329706-implement-xx-aot-class-linking
…p-resolver' into jep-483-step-03-8329706-implement-xx-aot-class-linking
👋 Welcome back iklam! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTClassLinkingVMOptions.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken an initial look through but there is an awful lot to try and digest here. I've flagged numerous typos and minor nits.
One general query: does this stuff work if the user defines their own initial application classloader?
Just to say that there isn't any support in the JDK for replacing any of the 3 built-in class loaders. In normal setup, the system class loader == application class loader. It is possible to run |
Yes that is what I was referring to. |
…amed BOOT/BOOT2 to BOOT1/BOOT2 and refactored code related to AOTLinkedClassCategory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have taken another pass through. A few queries and small items.
Thanks
test/hotspot/jtreg/runtime/cds/appcds/aotClassLinking/AOTClassLinkingVMOptions.java
Show resolved
Hide resolved
Mailing list message from John Rose on hotspot-dev: On 18 Sep 2024, at 21:11, Ioi Lam wrote:
If this were running millions of times a second, and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing further from me.
Thanks
LGTM |
…p-resolver' into jep-483-step-03-8329706-implement-xx-aot-class-linking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spotted a few nits.
test/hotspot/jtreg/runtime/cds/appcds/jvmti/ClassFileLoadHookTest.java
Outdated
Show resolved
Hide resolved
…p-resolver' into jep-483-step-03-8329706-implement-xx-aot-class-linking
…p-resolver' into jep-483-step-03-8329706-implement-xx-aot-class-linking
…e tests disable full-module-graph
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still good for me - but seems to be jcheck whitespace issues.
Thanks for noticing it. I've fixed the whitespaces (and need to propagate that to all subsequent PRs in this series). |
Closing this PR as its changes have been combined into #21642. |
This is the 3rd PR for JEP 483: Ahead-of-Time Class Loading & Linking.
Overview
-XX:+AOTClassLinking
flag is added. See JEP 498 and the CSR for a discussion of this command-line option, its default value, and its impact on compatibility.AOTLinkedClassTable
is added to the cache to include all classes that are AOT-linked. For this PR, only classes for the boot/platform/application loaders are eligible. The main logic is inaotClassLinker.cpp
.AOTLinkedClassTable
are loaded into their respective class loaders at the earliest opportunity. The main logic is inaotLinkedClassBulkLoader.cpp
.vmClasses::resolve_all()
threads.cpp
).AOTLinkedClassTable
are loaded before any user-code is executed, we can resolve constant pool entries that refer to these classes during AOT cache creation. See changes inAOTConstantPoolResolver::is_class_resolution_deterministic()
.All-or-nothing Loading
--patch-module
or--module
, some AOT-linked classes may be replaced with patched versions, or may become invisible and cannot be loaded into the JVM.FileMapInfo::validate_aot_class_linking()
.FileMapInfo::validate_aot_class_linking()
requiresCDSConfig::is_using_full_module_graph()
to be true. This means that the exact same set of modules are visible when the AOT cache was created, and when the AOT cache is used.Testing
-XX:+AOTClassLinking
flaghotspot_aot_classlinking
is created for running existing CDS tests with the-XX:+AOTClassLinking
flag. Note that this group filters out test cases that are incompatible with-XX:+AOTClassLinking
. E.g., classes that use JVMTI ClassFileLoadHook or class redefinition.-XX:+AOTClassLinking
flag.See here for the sequence of dependent RFEs for implementing JEP 483.
Progress
Integration blocker
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20843/head:pull/20843
$ git checkout pull/20843
Update a local copy of the PR:
$ git checkout pull/20843
$ git pull https://git.openjdk.org/jdk.git pull/20843/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20843
View PR using the GUI difftool:
$ git pr show -t 20843
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20843.diff
Webrev
Link to Webrev Comment