RFR: 8332689: RISC-V: Use load instead of trampolines [v16]
Fei Yang
fyang at openjdk.org
Wed Jun 26 08:26:15 UTC 2024
On Tue, 25 Jun 2024 08:45:12 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 3718:
>>
>>> 3716: // is secondary_supers[r_array_index]. Bits 0 and 1 in the bitmap
>>> 3717: // have been checked.
>>> 3718: rt_call(StubRoutines::lookup_secondary_supers_table_slow_path_stub());
>>
>> Why not make use of the `stub_is_near` param and do a simpler `jump_link` when the slow path stub is near?
>
> As there was no users of jump_link, before this merge, except trampoline call, it always emit JAL as that is the only encoding we need. Hence we only have one place where we use JAL for calls, trampoline call.
>
> If we think we should use JAL for very short calls, manully adding it to one place is not the right approach IMHO.
> Instead we should have rt_call emit JAL for runtime addresses, i.e. fixed address in libjvm.so or fixed address in code cache if reachable.
>
> For exampel, I think this site, in gen_continuation_enter():
> `__ rt_call(CAST_FROM_FN_PTR(address, StubRoutines::cont_thaw()));`
> Could be benficial to use JAL in.
Sounds reasonable. I guess this change won't affect performance much as it's call to the slow path stub. I will do JMH for this case to see.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19453#discussion_r1654359891
More information about the hotspot-dev
mailing list