RFR: 8345826: Do not automatically resolve jdk.internal.vm.ci when libgraal is used [v6]

Doug Simon dnsimon at openjdk.org
Mon May 19 07:29:04 UTC 2025


On Mon, 19 May 2025 07:23:54 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   load the JVMCI module if +EnableJVMCI is set in the jimage
>
> src/hotspot/share/jvmci/jvmciRuntime.hpp line 38:
> 
>> 36: #endif // INCLUDE_G1GC
>> 37: 
>> 38: #define JVMCI_NOT_ENABLED_ERROR_MESSAGE "JVMCI is not enabled. Must specify '--add-modules=jdk.internal.vm.ci' or '-XX:+EnableJVMCI' to the java launcher."
> 
> It's the exception message for an InternalError so maybe this is okay but in general I don't think you want to be asking users to have to name a JDK internal module.

I think anyone using a non-standard configuration for Graal would not be surprised about JVMCI and would actually appreciate the extra hint when they get things "wrong".

> src/hotspot/share/runtime/arguments.cpp line 2264:
> 
>> 2262:           }
>> 2263:         }
>> 2264:       }
> 
> This only works if jdk.internal.vm.ci is specified to --add-modules, it won't set _jvmci_module_added if jdk.internal.vm.ci is resolved because some other module require it. As the module is JDK internal and doesn't export an API then I assume it would be rare-to-never to require it, is that right?

Correct. I realized this might be a bit confusing so improved the error message a little: https://github.com/openjdk/jdk/pull/25240#issuecomment-2887219662
But as you say, it should never be encountered in practice.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25240#discussion_r2095021472
PR Review Comment: https://git.openjdk.org/jdk/pull/25240#discussion_r2095012796


More information about the graal-dev mailing list