RFR: 8240772: x86_64: Pre-generate Assembler::popa, pusha and vzeroupper

Claes Redestad claes.redestad at oracle.com
Tue Mar 10 13:46:10 UTC 2020


Hi,

calculate some invariant Assembler routines at bootstrap, copy on
subsequent invocations.

For popa and pusha this means an overhead reduction of around 98% (from
~2500 instructions to emit a pusha to ~50). For vzeroupper an overhead
reduction of ~65% (117 -> 42). Together these add up to about a 1%
reduction of instructions executed on a Hello World - with some
(smaller) scaling impact on larger applications.

The initialization is very simple/naive, i.e., lacks any kind of 
synchronization protocol. But as this setup is guaranteed to happen very
early during bootstrap this should be fine. Thanks Ioi for some helpful
suggestions here!

Bug:    https://bugs.openjdk.java.net/browse/JDK-8240772
Webrev: http://cr.openjdk.java.net/~redestad/8240772/open.00/

Testing: tier1-3

Thanks!

/Claes


More information about the hotspot-compiler-dev mailing list