RFR: 8354887: Preserve runtime blobs in AOT code cache [v2]

Vladimir Kozlov kvn at openjdk.org
Wed May 7 16:06:17 UTC 2025


On Wed, 7 May 2025 15:43:55 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> @adinn in premain it is commented out -
>> https://github.com/openjdk/leyden/blob/f09d2f7724c628c90df51eacb16b33fee710ed1a/src/hotspot/share/cds/cdsConfig.cpp#L790
>> 
>> 
>> #ifdef _LP64
>>   // FLAG_SET_ERGO_IF_DEFAULT(UseCompatibleCompressedOops, true); // FIXME @iklam - merge with mainline - UseCompatibleCompressedOops
>> #endif
>> 
>> 
>> I don't see any other place it is set.
>
>> I don't see any other place it is set.
> 
> I do ;-)
> 
> Look at cdsConfig.cpp:468 in method CDSConfig::check_vm_args_consistency()
> 
> 
> 
>   if (CacheDataStore != nullptr) {
>     // Leyden temp work-around:
>     //
>     // By default, when using CacheDataStore, use the HeapBasedNarrowOop mode so that
>     // AOT code can be always work regardless of runtime heap range.
>     //
>     // If you are *absolutely sure* that the CompressedOops::mode() will be the same
>     // between training and production runs (e.g., if you specify -Xmx128m
>     // for both training and production runs, and you know the OS will always reserve
>     // the heap under 4GB), you can explicitly disable this with:
>     //     java -XX:-UseCompatibleCompressedOops -XX:CacheDataStore=...
>     // However, this is risky and there's a chance that the production run will be slower
>     // because it is unable to load the AOT code cache.
> #ifdef _LP64
>     FLAG_SET_ERGO_IF_DEFAULT(UseCompatibleCompressedOops, true);  // <== here
> #endif

@adinn I think you are looking on old version of `premain` branch. The latest changeset is Igor's "Address review comments".

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

PR Comment: https://git.openjdk.org/jdk/pull/25019#issuecomment-2859162780


More information about the hotspot-runtime-dev mailing list