RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v6]
Ioi Lam
iklam at openjdk.org
Mon Nov 4 03:10:38 UTC 2024
On Fri, 1 Nov 2024 03:54:24 GMT, Dan Heidinga <heidinga at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fixed whitespace; fixed minimal build
>
> src/hotspot/share/cds/aotClassInitializer.cpp line 348:
>
>> 346: }
>> 347: JavaValue result(T_VOID);
>> 348: JavaCalls::call_static(&result, ik,
>
> Based on the discussions in JDK-8342283, do we need a memory fence after the call to runtimeSetup?
>
> I think we do to be consistent with the non-AOTCache run as there is a fence after `<clinit>` (when this code would normally run) due to the initialization lock.
I think this is already done:
`runtimeSetup()` is called inside `InstanceKlass::call_class_initializer()`. When that returns, we will proceed to `InstanceKlass::set_initialization_state_and_notify()` which will perform the memory fencing.
https://github.com/iklam/jdk/blob/6eebd18fc2820ffb179d431f179fc6af6d1be247/src/hotspot/share/oops/instanceKlass.cpp#L1276-L1300
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21642#discussion_r1827146321
More information about the core-libs-dev
mailing list