Integrated: 8297763: Fix missing stub code expansion before align() in shared trampolines

Xiaolin Zheng xlinzheng at openjdk.org
Mon Dec 5 12:47:17 UTC 2022


On Tue, 29 Nov 2022 13:43:20 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

This pull request has now been integrated.

Changeset: f9e0f1d5
Author:    Xiaolin Zheng <xlinzheng at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/f9e0f1d5b3663db5de0532e9d9ce41312bf35ed3
Stats:     19 lines in 3 files changed: 17 ins; 0 del; 2 mod

8297763: Fix missing stub code expansion before align() in shared trampolines

Reviewed-by: fyang, luhenry

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

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


More information about the hotspot-dev mailing list