RFR: 8363620: AArch64: reimplement emit_static_call_stub()

Andrew Haley aph at openjdk.org
Fri Nov 28 15:31:52 UTC 2025


On Fri, 28 Nov 2025 10:13:56 GMT, Fei Gao <fgao at openjdk.org> wrote:

> I’ve updated the patch with a new commit. In the meantime, we also found that patching `isb` to `nop` can work the same as patching `isb` to `b .+4`.

Please don't. The slow path via an indirect jump to the static call stub is not important. It makes no sense to use the Arm memory model in such a subtle way merely to avoid a perfectly-predicted rare branch. The time taken to understand such trickery by reviewers and future maintainers is not justified by the minuscule performance gain.

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan

-------------

PR Comment: https://git.openjdk.org/jdk/pull/26638#issuecomment-3589721655


More information about the hotspot-dev mailing list