RFR: 8297763: Fix missing stub code expansion before align() in shared trampolines
Xiaolin Zheng
xlinzheng at openjdk.org
Tue Nov 29 14:02:51 UTC 2022
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 emitting 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
-------------
Commit messages:
- Fix simply
Changes: https://git.openjdk.org/jdk/pull/11414/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11414&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8297763
Stats: 13 lines in 3 files changed: 13 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/11414.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11414/head:pull/11414
PR: https://git.openjdk.org/jdk/pull/11414
More information about the hotspot-dev
mailing list