RFR: 8293187: Store initialized Enum classes in AOTCache [v10]
Ioi Lam
iklam at openjdk.org
Tue Oct 1 06:14:54 UTC 2024
On Mon, 30 Sep 2024 12:31:54 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 109 commits:
>>
>> - Merge branch 'jep-483-step-03-8329706-implement-xx-aot-class-linking' of /jdk3/yak/open into jep-483-step-04-8293187-support-sun-invoke-util-wrapper-in-cds-archive-heap
>> - Merge branch 'jep-483-step-02-8338018-rename-class-prelinker-to-aot-cp-resolver' into jep-483-step-03-8329706-implement-xx-aot-class-linking
>> - Merge branch 'jep-483-step-01-8338017-add-aot-command-line-aliases' into jep-483-step-02-8338018-rename-class-prelinker-to-aot-cp-resolver
>> - Merge branch 'master' of https://github.com/openjdk/jdk into jep-483-step-01-8338017-add-aot-command-line-aliases
>> - 8340864: Remove unused lines related to vmClasses
>>
>> Reviewed-by: shade, kvn
>> - 8340831: Simplify simple validation for class definition in MethodHandles.Lookup
>>
>> Reviewed-by: redestad
>> - 8340838: Clean up MutableCallSite to use explicit release fence instead of AtomicInteger
>>
>> Reviewed-by: jrose, redestad, shade
>> - 8340956: ProblemList 4 java/nio/channels/DatagramChannel tests on macosx-all
>>
>> Reviewed-by: liach, alanb, darcy, dfuchs
>> - 8340228: Open source couple more miscellaneous AWT tests
>>
>> Reviewed-by: prr
>> - 8340684: Reading from an input stream backed by a closed ZipFile has no test coverage
>>
>> Reviewed-by: lancea
>> - ... and 99 more: https://git.openjdk.org/jdk/compare/6029b35f...563bccb3
>
> src/hotspot/share/cds/aotLinkedClassBulkLoader.cpp line 253:
>
>> 251: }
>> 252: if (ik->has_aot_initialized_mirror()) {
>> 253: ik->initialize_from_cds(CHECK);
>
> Can we put a comment in here to explain that this call may link class ik and may link+initialize its supers and/or implemented interfaces but it will not initialize ik itself because we are relying on the mirror to provide static field data computed via an init run at assembly time when the archive was created. It really helps to underline that this is the point where we rely on init in a previous VM, bypassing (repeated) init in this VM.
I added a comment according to your suggestion. I'll also see if it's possible to require all supertypes to be aot-initialized. I think that will make the model simpler.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20958#discussion_r1782168767
More information about the hotspot-dev
mailing list