RFR: 8345635: JVMCI compiler should not be disabled by java -Xshare:dump

Ioi Lam iklam at openjdk.org
Wed Dec 11 20:26:37 UTC 2024


On Wed, 11 Dec 2024 20:00:54 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> This PR fixes failures when using  `-XX:+UseJVMCICompiler` with tersts like runtime/cds/appcds/resolvedConstants/AOTLinkedLambdas.java
>> 
>> By default, `java -Xshare:dump` runs the JVM in interpreter-only mode (as if `-Xint` was specified). This behavior is required only when generating deterministic archives during the JDK build. Since those archives are never generated using JVMCI compiler anyway, we don't need to force `-Xint` when `java -Xshare:dump -XX:+UseJVMCICompiler` is used.
>
> src/hotspot/share/cds/cdsConfig.cpp line 432:
> 
>> 430: 
>> 431:   if (is_dumping_static_archive()) {
>> 432:     if (!mode_flag_cmd_line JVMCI_ONLY(&& !UseJVMCICompiler && !UseGraalJIT)) {
> 
> Since `UseGraalJIT` [implies](https://github.com/openjdk/jdk/blob/08bdeedfd355b61f7cdabbe943657691e5af2c82/src/hotspot/share/jvmci/jvmci_globals.hpp#L50) `UseJVMCICompiler` (indirectly via [EnableJVMCIProduct](https://github.com/openjdk/jdk/blob/08bdeedfd355b61f7cdabbe943657691e5af2c82/src/hotspot/share/jvmci/jvmci_globals.hpp#L55C17-L55C35)), you can omit it here.

`CDSConfig::check_vm_args_consistency()` is called before `CompilerConfig::check_args_consistency()`, so I need to catch all "user facing" arguments that can enable the `EnableJVMCI` flag. That's why I am checking `UseGraalJIT` and `UseJVMCICompiler` directly.

Are there any other flags that may cause `EnableJVMCI` to true?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22687#discussion_r1880892393


More information about the hotspot-runtime-dev mailing list