RFR: 8285487: Do not generate trampolines for runtime calls if they are not needed [v3]
Evgeny Astigeevich
duke at openjdk.java.net
Tue May 3 13:27:20 UTC 2022
On Tue, 3 May 2022 00:04:14 GMT, Xin Liu <xliu at openjdk.org> wrote:
>> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Move code of target_needs_trampoline inside trampoline_call
>
> src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp line 562:
>
>> 560:
>> 561: // Maybe emit a call via a trampoline. If the code cache is small
>> 562: // trampolines won't be emitted.
>
>> "The header comment is incorrect: "If the code cache is small trampolines won't be emitted."
>
> I feel that Vladimir's comment is still legit here. From my reading, trampoline is avoidable because of either codecache is small (far_branches() is false) or target_needs_far_branch() is false for runtime reloc.
I've created [JDK-8286056](https://bugs.openjdk.java.net/browse/JDK-8286056) to clarify uses of `far_call`/`far_jump` and [JDK-8286058](https://bugs.openjdk.java.net/browse/JDK-8286058) to clarify uses of `trampoline_call`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8403
More information about the hotspot-dev
mailing list