RFR: 8360776: Disable Intel APX by default and enable it only if requested by the user using -XX:+UnlockExperimentalVMOptions -XX:+UseAPX
Jatin Bhateja
jbhateja at openjdk.org
Sat Jun 28 08:38:42 UTC 2025
On Fri, 27 Jun 2025 22:13:47 GMT, Srinivas Vamsi Parasa <sparasa at openjdk.org> wrote:
> Currently, APX is not enabled consistently between product and debug builds.
>
> If the hardware supports Intel APX:
>
> 1) In product builds, APX is disabled by default, even if the user explicitly enables it using `-XX:+UnlockExperimentalVMOptions -XX:+UseAPX`.
>
> 2) In debug builds, APX is enabled by default regardless of whether the user explicitly enables it or not.
>
> **The goal of this PR is to enable APX for both product and debug builds if and only if the user explicitly enables it using `-XX:+UnlockExperimentalVMOptions -XX:+UseAPX`.**
Verified patch with the following configurations, we now enable APX only on APX-capable targets with -XX:+UnlockExperimentalVMOptions
CPROMPT>sde64 -dmr -ptr_raise -- java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:-UseAPX --version | grep UseAPX
bool UseAPX = false {ARCH experimental} {command line}
CPROMPT>sde64 -dmr -ptr_raise -- java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseAPX --version | grep UseAPX
bool UseAPX = true {ARCH experimental} {command line}
CPROMPT>sde64 -dmr -ptr_raise -- java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions --version | grep UseAPX
bool UseAPX = false {ARCH experimental} {default}
CPROMPT>sde64 -gnr -ptr_raise -- java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:+UseAPX --version | grep UseAPX
OpenJDK 64-Bit Server VM warning: UseAPX is not supported on this CPU, setting it to false
bool UseAPX = false {ARCH experimental} {command line}
CPROMPT>sde64 -gnr -ptr_raise -- java -XX:+PrintFlagsFinal -XX:+UnlockExperimentalVMOptions -XX:-UseAPX --version | grep UseAPX
bool UseAPX = false {ARCH experimental} {command line}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26029#issuecomment-3015108073
More information about the hotspot-dev
mailing list