RFR: 8377339: Implement AOTCacheAccess::get_archived_object using heap roots [v2]
Ioi Lam
iklam at openjdk.org
Tue Feb 10 02:00:19 UTC 2026
On Mon, 9 Feb 2026 17:45:53 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Ioi Lam has updated the pull request incrementally with four additional commits since the last revision:
>>
>> - @DanHeidinga review comment
>> - @DanHeidinga review comment
>> - @DanHeidinga review comment
>> - fixed typo
>
> src/hotspot/share/cds/heapShared.cpp line 658:
>
>> 656: AOTArtifactFinder::add_cached_class(method_holder);
>> 657: }
>> 658: } else if (AOTCodeCache::is_dumping_code() &&
>
> I suggest to use next check for possible any AOT code caching (see my other comment):
>
> if (CDSConfig::is_dumping_heap() && AOTCodeCache::is_caching_enabled)
This code is not called during regular oop allocation. Instead, it's called when an oop is copied into the AOT cache.
We call `AOTCodeCache::is_dumping_code()` in another places as well:
https://github.com/openjdk/leyden/blob/10172534fc92bc58dcf7eae6145c781ec50ffabc/src/hotspot/share/cds/aotMetaspace.cpp#L1211
Both cases happen after `AOTCodeCache::init2()` has been called, so `AOTCodeCache::is_dumping_code()` should return the correct value.
-------------
PR Review Comment: https://git.openjdk.org/leyden/pull/108#discussion_r2785393675
More information about the leyden-dev
mailing list