On Wed, 21 Oct 2026 03:57:22 GMT, Ioi Lam <[email protected]> wrote:

>> src/hotspot/share/cds/cdsConfig.cpp line 801:
>> 
>>> 799:       // Re-training
>>> 800:       FLAG_SET_ERGO_IF_DEFAULT(AOTReplayTraining, true);
>>> 801:       AOTCodeCache::enable_caching();
>> 
>> AOTCodeCache::enable_caching() should depend on AOTReplayTraining which 
>> could be switched off on command line.
>
> `FLAG_SET_ERGO_IF_DEFAULT` will set the flag only if it's not specified in 
> the command-line. The old code also did the same thing.

I commented about unconditionally enabling AOT code caching in your changes. In 
previous code we had:

    FLAG_SET_ERGO_IF_DEFAULT(AOTReplayTraining, true);
    // Generate AOT code only when training data enabled
    if (AOTReplayTraining) {
      AOTCodeCache::enable_caching();
    } else {
      AOTCodeCache::disable_caching();
    }

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31344#discussion_r4339378642

Reply via email to