RFR: 8287567: AArch64: Implement post-call NOPs
Ron Pressler
rpressler at openjdk.java.net
Tue May 31 16:15:42 UTC 2022
On Tue, 31 May 2022 13:34:24 GMT, Andrew Haley <aph at openjdk.org> wrote:
> Post-call NOPs (introduced with Loom virtual threads) are not implemented in the AArch64 port. Given that these are a significant optimization on x86, we should have them on AArch64 too.
>
> I looked at a variety of possible instruction sequences, and ended up with `nop; movk zr, lo; movk zr, hi`. `movk` is typically one of the fastest AArch64 instructions, so it should be suitable. It's not possible to patch the `movk` instructions concurrently with this code executing, but as far as I can tell the offsets in post-call NOPs are only ever patched while the code is being installed.
The NOPs make a big difference for various stack walking operations, and while we did see some negative effects, they're probably very minor. However, because they're only generated in JDK 19 if preview is enabled, we can perform a deeper performance analysis later.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8955
More information about the hotspot-dev
mailing list