RFR: 8293187: Store initialized Enum classes in AOTCache [v10]

Andrew Dinn adinn at openjdk.org
Tue Oct 1 09:50:42 UTC 2024


On Tue, 1 Oct 2024 06:12:19 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> 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.

Yes, it should be simpler, although perhaps at the cost of omitting some mirrors from the heap section. Anyway, the comment is helpful.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20958#discussion_r1782473196


More information about the hotspot-dev mailing list