RFR: 8369296: Add fast class init checks in interpreter for resolving ConstantPool entries for static field [v2]
Fei Yang
fyang at openjdk.org
Wed Oct 8 03:30:02 UTC 2025
On Tue, 7 Oct 2025 19:12:34 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>>> After returning it again executes clinit_barrier. But this time the class should have initialized, so it just falls through.
>>
>> There are no guarantees that the class is initialized. But the only case when it doesn't hold is when the class is being initialized and current thread is initializing one. So, it is guaranteed that slow path is taken at most once.
>>
>>> I think fast_clinit_check better conveys what it is doing
>>
>> `clinit_barrier` implements a fast path check, so `clinit_barrier_fast_path` maybe a more accurate variant.
>
>> clinit_barrier implements a fast path check, so clinit_barrier_fast_path maybe a more accurate variant.
>
> yes, `clinit_barrier_fast_path` is better.
@ashu-mehra
Hi, Thanks for the ping! And here is the riscv-specific changes:
[27676-riscv.diff.txt](https://github.com/user-attachments/files/22758069/27676-riscv.diff.txt)
`hotspot:tier1` and `hotspot_runtime` passed with fastdebug build on linux-riscv64.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27676#issuecomment-3379436856
More information about the hotspot-dev
mailing list