RFR: 8281812: x86: Use short jumps in TemplateTable::condy_helper

Claes Redestad redestad at openjdk.java.net
Tue Feb 15 10:55:09 UTC 2022


On Tue, 15 Feb 2022 08:57:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> Similar to [JDK-8281744](https://bugs.openjdk.java.net/browse/JDK-8281744), this change improves TemplateTable::condy_helper, for the same reason: there are only a few pushes between the jumps, and we can tell MacroAssembler those can be short. There is no significant code that uses condy yet (I think), so the performance improvement for condy is only theoretical. This makes interpreter code a bit more compact, though.
> 
> Additional testing:
>  - [x] Linux x86_64 `fastdebug`, `java/lang/invoke/condy`, `runtime/condy`
>  - [x] Linux x86_32 `fastdebug`, `java/lang/invoke/condy`, `runtime/condy`

Looks good. I might even call it trivial, since the labels are all clearly bound just a few instructions away.

Out of curiousity, do you have data readily available on how much smaller a `jccb` becomes than a `jcc`, exactly?

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

Marked as reviewed by redestad (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7473


More information about the hotspot-runtime-dev mailing list