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

Vladimir Kozlov kvn at openjdk.org
Tue Sep 16 01:18:17 UTC 2025


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

>> At that point, `is_dumping_dynamic_archive()` will always return zero, as we don't know if we can dump the dynamic archive until `CDSConfig::ergo_init_classic_archive_paths()`, which is called much later.
>> 
>> The calling sequence is:
>> 
>> - `CDSConfig::check_vm_args_consistency()`
>> - `CDSConfig::ergo_initialize ()`-> `ergo_init_classic_archive_paths()`
>> - `CDSConfig::prepare_for_dumping()`
>> 
>> Today we are doing ergo setting of AOT flags inside `check_vm_args_consistency()`. I think we should move that to the end of `CDSConfig::ergo_initialize()`. Since that's a bigger scope, maybe I should do that in a follow-up PR?
>> 
>> The current PR still works as intended, because `AOTClassLinking` acts as a master switch that will turn off all other AOT optimizations for dynamic dump, regardless of the values of `AOTInvokeDynamicLinking`, etc.
>
> 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()`

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

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


More information about the hotspot-dev mailing list