RFR: 8365926: RISC-V: Performance regression in renaissance (chi-square) [v2]
Robbin Ehn
rehn at openjdk.org
Mon Sep 1 14:47:42 UTC 2025
On Mon, 1 Sep 2025 10:10:31 GMT, Hamlin Li <mli at openjdk.org> wrote:
> ```
> JDK-23 (last version with trampoline calls)
> Mean: 3189.5827
> Standard Deviation: 284.6478
>
> JDK-25
> Mean: 3424.8905
> Standard Deviation: 222.2208
>
> Patch:
> Mean: 3144.8535
> Standard Deviation: 229.2577
> ```
>
> For the performance data, do you have some data for applying this fix on top of the next commit after`JDK-23 (last version with trampoline calls)`? I think this data might be more helpful to understand the performance comparison between old trampoline, stub and this pr.
JDK-23 is last released version with trampoline calls.
JDK-24 is first released version with load calls.
What I can do is run ~jdk-24-prelease version which have both and backport to it... running that now...
> src/hotspot/cpu/riscv/nativeInst_riscv.cpp line 111:
>
>> 109: if (mt_safe) {
>> 110: OrderAccess::release();
>> 111: ICache::invalidate_range(jal_pc, NativeInstruction::instruction_size);
>
> should `jal_pc` be `instruction_address()`?
We have:
auipc // instruction_address() # Never changed
ld // instruction_address() + NativeInstruction::instruction_size # Never changed
jal(r) // instruction_address() + 2 * NativeInstruction::instruction_size (jal_pc) # jal<->jalr
We only change the instruction at "instruction_address() + 2 * NativeInstruction::instruction_size".
Note that jal_pos and jal_pc means a "jump and link instruction", not specifically jal or jalr.
Make sense?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26944#issuecomment-3242627359
PR Review Comment: https://git.openjdk.org/jdk/pull/26944#discussion_r2314145607
More information about the hotspot-compiler-dev
mailing list