RFR: 8367366: Do not support -XX:+AOTClassLinking for dynamic CDS archive [v2]

Ioi Lam iklam at openjdk.org
Tue Sep 16 02:43:33 UTC 2025


On Tue, 16 Sep 2025 01:14:08 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> Okay.
>> 
>> An other thing. I think you need to issue warning only if `AOTClassLinking` is set on command line.
>
> Also what about AOTMode and other AOT flags? `setup_compiler_args()` are set in `check_vm_args_consistency()`

> An other thing. I think you need to issue warning only if `AOTClassLinking` is set on command line.

The default value of `AOTClassLinking` is false, so if we come here, it must have been set in the command-line. I added an assert (so our ERGO code doesn't set it by mistake).

> Also what about AOTMode and other AOT flags? setup_compiler_args() are set in check_vm_args_consistency()

AOTMode/AOTConfiguration/AOTCache/AOTCacheOutput needs to be checked in `check_vm_args_consistency()` -> `check_aot_flags()`. If these flags are inconsistent, the JVM will exit. I think the ergo setting of these flags should also be there as well. 

The settings of optimization levels, including all the settings in `setup_compiler_args()`, should be moved to `CDSConfig::ergo_initialize()`. If we see any inconsistent settings, they should be correct with `FLAG_SET_ERGO()` (and we don't exit the VM).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27242#discussion_r2350518370


More information about the hotspot-dev mailing list