RFR: 8343430: RISC-V: C2: Remove old trampoline call [v2]

Robbin Ehn rehn at openjdk.org
Mon Nov 4 13:37:31 UTC 2024


On Mon, 4 Nov 2024 12:25:49 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Hi, please consider this cleanup change.
>> 
>> The old trampoline call on linux-riscv64 is disabled by default after: https://bugs.openjdk.org/browse/JDK-8332689.
>> And the new solution (load target address from stub and call) has been baked in jdk master for quite some time.
>> This propose to remove the old trampoline call related logic so that the code will be cleaner and easier to maintain.
>> As we are still using `trampoline_stub_Relocation` for the stub, I kept using the original `emit_trampoline_stub` name.
>> 
>> Testing on linux-riscv64:
>> - [x] tier1-tier3 (release)
>> - [x] hotspot:tier1 (fastdebug)
>
> Fei Yang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Comment

Thanks! I think there are some more places to fix naming.

src/hotspot/cpu/riscv/c1_LIRAssembler_riscv.hpp line 70:

> 68:     // call stub: CompiledDirectCall::to_interp_stub_size() +
> 69:     //            CompiledDirectCall::to_trampoline_stub_size()
> 70:     _call_stub_size = 11 * MacroAssembler::instruction_size + MacroAssembler::NativeFarCall::trampoline_size,

I think this should call_address_stub also?

src/hotspot/cpu/riscv/compiledIC_riscv.cpp line 73:

> 71: int CompiledDirectCall::to_trampoline_stub_size() {
> 72:   // We count size of target address and an additional alignment nop.
> 73:   // Trampoline stubs are always word aligned.

Call address stub?

src/hotspot/cpu/riscv/macroAssembler_riscv.hpp line 1597:

> 1595: 
> 1596:   enum NativeFarCall {
> 1597:     trampoline_size        = 1 * instruction_size + wordSize,

Call address stub size?

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

PR Review: https://git.openjdk.org/jdk/pull/21822#pullrequestreview-2413075762
PR Review Comment: https://git.openjdk.org/jdk/pull/21822#discussion_r1827738318
PR Review Comment: https://git.openjdk.org/jdk/pull/21822#discussion_r1827739171
PR Review Comment: https://git.openjdk.org/jdk/pull/21822#discussion_r1827740543


More information about the hotspot-dev mailing list