RFR: 8297763: Fix missing stub code expansion before align() in shared trampolines [v2]

Xiaolin Zheng xlinzheng at openjdk.org
Mon Dec 5 13:09:11 UTC 2022


On Wed, 30 Nov 2022 11:37:58 GMT, Xiaolin Zheng <xlinzheng at openjdk.org> wrote:

>> This patch fixes missing stub code expansion logic before `align()` for AArch64 and RISC-V.
>> 
>> The `align()` at most creates 4-byte padding, so a `NativeInstruction::instruction_size` is enough.
>> 
>> I am considering pre-calculating the total trampoline sizes and allocating them in batches, but maybe after this one, for this is a quick fix to unblock https://github.com/openjdk/jdk/pull/11188. Please see that thread.
>> 
>> The `assert_alignment(pc());` added in the RISC-V part shows that RVC doesn't change the trampoline stub / static stub logic, so there is no need to adjust the trampoline size for it. [1]
>> 
>> Tested AArch64 hotspot tier1~3, and 4 is still running; tested RISC-V hotspot tier1~2, and 3~4 are still running.
>> 
>> Thanks,
>> Xiaolin
>> 
>> [1] https://github.com/openjdk/jdk/blob/2deb318c9f047ec5a4b160d66a4b52f93688ec42/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L3125-L3126
>
> Xiaolin Zheng has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix as to comments

Thank you, Tobias!

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

PR: https://git.openjdk.org/jdk/pull/11414


More information about the hotspot-dev mailing list