On Sat, 9 May 2026 15:29:39 GMT, Aleksey Shipilev <[email protected]> wrote:

>> Improve startup and warmup time by making optimized native code for an 
>> application instantly available when the HotSpot Java Virtual Machine 
>> starts. Achieve this by compiling application code to native code in a 
>> training run, storing the native code in the [AOT 
>> cache](https://openjdk.org/jeps/483#Description) for use in subsequent 
>> production runs.
>> 
>> More details in the [JEP](https://openjdk.org/jeps/544).
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> If you could merge from master, I can kick off another code analyzer run.

> @shipilev please look on GHA failure in 
> `runtime/cds/appcds/aotCode/AOTCodeTest.java#shenandoah` test after merge 
> from mainline.

I know what this is: https://bugs.openjdk.org/browse/JDK-8385557. Amusingly, we 
tried to take care of this AOT path in LBE code, so to avoid regressions for 
your PR here. And we apparently did things right with AOT constants for 
cset-base/region-shift, but missed the relocations for slow calls! Which is a 
problem if runtime calls relocate (ASLR?). So LBE passed with AOT code cache PR 
on Linux x86/AArch64 without problems, and only Mac AArch64 caught fire. Argh. 
I am going to amend this code in mainline.

> src/hotspot/share/code/nmethod.hpp line 285:
> 
>> 283:           _load_reported:1,            // used by jvmti to track if an 
>> event has been posted for this nmethod
>> 284:           _preloaded:1,
>> 285:           _has_clinit_barriers:1;
> 
> Not sure if we want to solve this here, but I think we update these bitfields 
> separately without consistent synchronization. So there is a possibility we 
> can stomp some bits if we do updates without locks. (Sighs) We should really 
> fix it in mainline: https://bugs.openjdk.org/browse/JDK-8383954

Oh, and also, this gives us 9-th bit, so compiler would allocate another 
`uint8_t` to fit it. It is going to be better once we pull a few fields out of 
this bitset: https://github.com/openjdk/jdk/pull/31062

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

PR Comment: https://git.openjdk.org/jdk/pull/30778#issuecomment-4562160404
PR Review Comment: https://git.openjdk.org/jdk/pull/30778#discussion_r3199819910

Reply via email to