RFR: 8359359: AArch64: share trampolines between static calls to the same method [v4]
Mikhail Ablakatov
mablakatov at openjdk.org
Fri Aug 15 10:50:13 UTC 2025
On Tue, 12 Aug 2025 22:25:02 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
>> Mikhail Ablakatov has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - cleanup: update copyright headers
>> - Make the value type of the dictionary a struct instead of Pair typedef
>> - Remove share_rc_trampoline_for and share_sc_trampoline_for
>
> src/hotspot/cpu/aarch64/codeBuffer_aarch64.cpp line 66:
>
>> 64: if (rtype == relocInfo::static_call_type) {
>> 65: dest = SharedRuntime::get_resolve_static_call_stub();
>> 66: }
>
> You are pulling details of implementation, use of `SharedRuntime::get_resolve_static_call_stub` for unlinked static calls. There is no need for this.
> It was: create a trampoline to the destination and relocation infos for all places in code which will share it. This is simple. It does not rely on any information about call sites.
>
> Now it is: we are creating a trampoline for an unlinked static call, it must have `get_resolve_static_call_stub` as a destination. Why should we have this? `Address` will always contain a correct destination set by a compiler. So we do double job, we throw away a target set by a compiler.
Hi @eastig , I hope you find this implementation more appropriate, please check https://github.com/openjdk/jdk/pull/25954/commits/d03d8384570b22141f81f06249a44387b89c8303
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25954#discussion_r2278783009
More information about the hotspot-dev
mailing list