RFR: 8348322: AOT cache creation crashes with "All cached hidden classes must be aot-linkable" when AOTInvokeDynamicLinking is disabled [v3]
Ioi Lam
iklam at openjdk.org
Sat Mar 1 04:43:57 UTC 2025
On Sat, 1 Mar 2025 00:56:20 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
>> I think we should keep `is_initing_classes_at_dump_time()`, because it's used as a precondition for archiving initialized Java mirrors. Putting such code inside `is_dumping_method_handles()` would not make sense.
>>
>> In fact, archived method handles require the ability to store initialized mirrors (for the hidden classes). So I think we should change `is_dumping_method_handles()` to this:
>>
>>
>> // When we can dump initialized classes mirrors, we automatically enable the archiving of MethodHandles.
>> // This will in turn enable the archiving of MethodTypes and hidden classes that are used in the
>> // implementation of MethodHandles. Note: these hidden classes need to be stored in the initialized state,
>> // as we don't have a mechanism to trigger their initialization on-demand.
>> // Archived MethodHandles are required for higher-level optimizations such as AOT resolution of invokedynamic
>> // and dynamic proxies.
>> bool CDSConfig::is_dumping_method_handles() {
>> return is_initing_classes_at_dump_time();
>> }
>
> I added back the `CDSConfig::is_initing_classes_at_dump_time()` function and reverted most of previous changes.
The three changes in aotArtifactFinder.cpp should also be reverted.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23546#discussion_r1976292331
More information about the hotspot-runtime-dev
mailing list