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

Doug Simon dnsimon at openjdk.org
Wed Dec 11 20:03:36 UTC 2024


On Wed, 11 Dec 2024 19:04:49 GMT, Ioi Lam <iklam 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.

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

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


More information about the hotspot-runtime-dev mailing list