RFR: 8359359: AArch64: share trampolines between static calls to the same method [v6]
Mikhail Ablakatov
mablakatov at openjdk.org
Thu Oct 9 17:00:08 UTC 2025
On Wed, 8 Oct 2025 16:45:12 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
>> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 910:
>>
>>> 908: assert(CodeBuffer::supports_shared_stubs(), "must support shared stubs");
>>> 909: code()->share_trampoline_for(entry.target(), entry.target(), offset());
>>> 910: } else if (entry.rspec().type() == relocInfo::static_call_type && callee != nullptr) {
>>
>> I think we should require `callee` to non-null for `relocInfo::static_call_type`. Otherwise this will hide bugs, when it's been intended to share but forgotten to provide `callee`.
>
> We need to convert the check `callee != nullptr` into an assert.
> Otherwise this will hide bugs, when it's been intended to share but forgotten to provide callee.
I wouldn't call such instances "bugs" as compiled code should still behave correctly even though trampolines aren't shared.
>From a quick glace, strengthening the requirement would require some changes in C1. I'll take a closer look next week.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25954#discussion_r2417387462
More information about the hotspot-dev
mailing list