JDK-8235539 : [JVMCI] -XX:+EnableJVMCIProduct breaks -XX:-EnableJVMCI
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11.0.7-oracle,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-12-07
  • Updated: 2020-03-23
  • Resolved: 2019-12-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 14
11.0.7-oracleFixed 14 b27Fixed
Description
The -XX:+EnableJVMCIProduct option (added by JDK-8232118) currently sets the default values of EnableJVMCI and UseJVMCICompiler. If these options are also explicitly on the command line, these explicit values should take precedence. For example:

java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCIProduct -XX:-UnlockExperimentalVMOptions -XX:-EnableJVMCI 

should result in JVMCI being completely disabled. While this command line may look strange, it can occur when `-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCIProduct -XX:-UnlockExperimentalVMOptions` is on the command line due to use of the jlink --add-options flag. This is exactly what's done when creating a GraalVM binary.

Currently, the above command line results in a false error:

Improperly specified VM option UseJVMCICompiler: EnableJVMCI cannot be disabled
Comments
OpenJDK 11 updates backport will follow after larger Graal integration, see https://github.com/oracle/graal/issues/2196
11-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/56aa1c3b8659 User: kvn Date: 2019-12-10 17:34:42 +0000
10-12-2019

https://cr.openjdk.java.net/~kvn/8235539/webrev.00/
09-12-2019

ILW = Incorrect handling of product flag (regression in JDK 14), EnableJVMCIProduct in combination with EnableJVMCI, remove contradicting command line options = MMM = P3
09-12-2019

For an image (such as GraalVM) created with `--add-options "-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCIProduct -XX:-UnlockExperimentalVMOptions"`, the expected value of the EnableJVMCI and UseJVMCICompiler flags under explicit use of one of these flags on the command line is as follows: -EnableJVMCI bool EnableJVMCI = false {JVMCI product} {command line} bool UseJVMCICompiler = false {JVMCI product} {default} -UseJVMCICompiler bool EnableJVMCI = true {JVMCI product} {default} bool UseJVMCICompiler = false {JVMCI product} {command line} +EnableJVMCI bool EnableJVMCI = true {JVMCI product} {command line} bool UseJVMCICompiler = true {JVMCI product} {default} +UseJVMCICompiler bool EnableJVMCI = true {JVMCI product} {default} bool UseJVMCICompiler = true {JVMCI product} {command line}
07-12-2019