RFR: JDK-8202384: Introduce altserver jvm variant with speculative execution disabled
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Sat Jun 2 06:47:24 UTC 2018
> 1 juni 2018 kl. 23:53 skrev Erik Joelsson <erik.joelsson at oracle.com>:
> We need to add compilation flags for disabling speculative execution to our native libraries and executables. In order to allow for users not affected by problems with speculative execution to run a JVM at full speed, we need to be able to ship two JVM libraries - one that is compiled with speculative execution enabled, and one that is compiled without. Note that this applies to the build time C++ flags, not the compiler in the JVM itself. Luckily adding these flags to the rest of the native libraries did not have a significant performance impact so there is no need for making it optional there.
> This patch defines flags for disabling speculative execution for GCC and Visual Studio and applies them to all binaries except libjvm when available in the compiler. It defines a new jvm feature no-speculative-cti, which is used to control whether to use the flags for libjvm. It also defines a new jvm variant "altserver" which is the same as server, but with this new feature added.
> For Oracle builds, we are changing the default for linux-x64 and windows-x64 to build both server and altserver, giving the choice to the user which JVM they want to use. If others would prefer this default, we could make it default in configure as well.
I think we should keep the praxis of only having server as default.
> The change in GensrcJFR.gmk fixes a newly introduced race that appears when building multiple jvm variants.
Thanks for fixing this!
> Bug: https://bugs.openjdk.java.net/browse/JDK-8202384
> Webrev: http://cr.openjdk.java.net/~erikj/8202384/webrev.01
Looks good to me.
More information about the hotspot-dev