RFR: 8285487: Do not generate trampolines for runtime calls if they are not needed [v2]
Evgeny Astigeevich
duke at openjdk.java.net
Thu Apr 28 20:01:55 UTC 2022
On Thu, 28 Apr 2022 17:58:53 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
> runtime method, as you correctly pointed, is code in VM which can be in any distance from CodeCache.
Good catch. The function works with assumptions of `MacroAssembler::trampoline_call`.
`MacroAssembler::trampoline_call` implicitly assumes the target is inside `CodeCache`:
// Maybe emit a call via a trampoline. If the code cache is small
// trampolines won't be emitted.
I'll move the code of `target_needs_far_branch` inside of `MacroAssembler::trampoline_call`.
I'll also add an assert checking the target address is inside `CodeCache`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8403
More information about the hotspot-dev
mailing list