Integrated: 8281744: x86: Use short jumps in TIG::set_vtos_entry_points
Aleksey Shipilev
shade at openjdk.java.net
Tue Feb 15 16:45:08 UTC 2022
On Mon, 14 Feb 2022 15:47:41 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> Performance in `-Xint` mode seems to be bottlenecked on the code size, rather than particular instruction hotspots, which means code density is important.
>
> There are forward branches in `TemplateInterpreterGenerator::set_vtos_entry_points`, which cannot be shortened by `MacroAssembler`, unless we tell it specifically that the upcoming branch target would be within the 8-bit offset. Which it apparently is in this particular case, because there are just a handful of `push`-es between the jump and its target. If a jump offset is more than 8 bits, the interpreter would catch fire just about everywhere, since `set_vtos_entry_points` is used at every bytecode entry. `fastdebug` builds assert the offset sanity directly.
>
> Current patch improves `SPECjvm2008` performance in `-Xint` mode on Ryzen 7 5700G:
>
>
> compiler.compiler: +4.1%
> compiler.sunflow: +4.7%
> compress: +9.9%
> crypto.signverify: +5.2%
> scimark.fft.large: +9.5%
> scimark.fft.small: +10.1%
> serial: +7.3%
> xml.transform: +7.1%
> xml.validation: +3.3%
>
>
> There are other places in template interpreter where forward jumps can be short, I'll do them separately, since they are riskier and also less important.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug, `tier1`
> - [x] Linux x86_32 fastdebug, `tier1`
This pull request has now been integrated.
Changeset: 18704653
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/18704653dcc76b6360b746a6a9c20d614633da0e
Stats: 5 lines in 1 file changed: 0 ins; 0 del; 5 mod
8281744: x86: Use short jumps in TIG::set_vtos_entry_points
Reviewed-by: rehn, coleenp
-------------
PR: https://git.openjdk.java.net/jdk/pull/7463
More information about the hotspot-dev
mailing list