RFR: 8367366: Do not support -XX:+AOTClassLinking for dynamic CDS archive [v2]
Vladimir Kozlov
kvn at openjdk.org
Tue Sep 16 19:23:39 UTC 2025
On Tue, 16 Sep 2025 19:15:39 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>>> 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).
>
>> 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).
>
> Here AOTClassLinking is set and checked in `check_vm_args_consistency()`
> https://github.com/openjdk/leyden/blob/master/src/hotspot/share/cds/cdsConfig.cpp#L636
> 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).
Agree.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27242#discussion_r2353434814
More information about the hotspot-dev
mailing list