RFR: 8369296: Add fast class init checks in interpreter for resolving ConstantPool entries for static field [v6]
Ashutosh Mehra
asmehra at openjdk.org
Thu Oct 9 16:23:41 UTC 2025
On Thu, 9 Oct 2025 15:51:43 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix missing branch
>>
>> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
>
> src/hotspot/cpu/aarch64/templateTable_aarch64.cpp line 2296:
>
>> 2294: } else {
>> 2295: __ b(Ldone);
>> 2296: }
>
> I don't like 2 branches for non-static case. I suggest to move first branch inside checks:
>
>
> if (VM_Version::supports_fast_class_init_checks() && bytecode() == Bytecodes::_invokestatic) {
> __ br(Assembler::NE, Lclinit_barrier_slow);
> __ ldr(temp, Address(Rcache, in_bytes(ResolvedMethodEntry::method_offset())));
> __ load_method_holder(temp, temp);
> __ clinit_barrier(temp, rscratch1, &Ldone, /*L_slow_path*/ nullptr);
> __ bind(Lclinit_barrier_slow);
> } else {
> __ br(Assembler::EQ, Ldone);
> }
I will update all other architectures to have the same construct.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27676#discussion_r2417307426
More information about the hotspot-dev
mailing list