RFR: 8369296: Add fast class init checks in interpreter for resolving ConstantPool entries for static field [v2]

Ashutosh Mehra asmehra at openjdk.org
Tue Oct 7 16:07:49 UTC 2025


On Tue, 7 Oct 2025 14:49:24 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> This patch adds fast clinit barrier in the interpreter when resolving cp entry for a static field.
>> 
>> Testing: tested x86-64 by running `hotspot_runtime` group
>> Specifically, `runtime/clinit/ClassInitBarrier.java` fails if the block for adding `clinit_barrier` is commented out in `TemplateTable::resolve_cache_and_index_for_field`
>
> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix compile failure
>   
>   Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>

@offamitkumar @Hamlin-Li  @RealFYang @TheRealMDoerr 
I need help in adding arch specific code for s390, risc-v and ppc for this PR. Would you be able to contribute the code for these platforms? Specifically, we need to add a call to `clinit_barrier` in `TemplateTable::resolve_cache_and_index_for_field`.

@vnkozlov  @adinn @iwanowww can you please review this patch.

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

PR Comment: https://git.openjdk.org/jdk/pull/27676#issuecomment-3377572102


More information about the hotspot-dev mailing list