On Thu, 24 Apr 2025 00:51:31 GMT, Vladimir Ivanov <[email protected]> wrote:
>> Vladimir Kozlov has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Fix message
>
> src/hotspot/share/cds/aotCacheAccess.hpp line 38:
>
>> 36: // AOT Cache API for AOT compiler
>> 37:
>> 38: class AOTCacheAccess : AllStatic {
>
> It looks related to `AOTCodeCache`? Maybe `AOTCodeCacheAccess` then?
This file is called
https://github.com/openjdk/leyden/blob/premain/src/hotspot/share/cds/cdsAccess.hpp
in the Leyden repo and provides an abstract API for accessing contents of the
AOT cache. In Leyden, we have APIs for accessing cached oops:
static int get_archived_object_permanent_index(oop obj)
NOT_CDS_JAVA_HEAP_RETURN_(-1);
static oop get_archived_object(int permanent_index)
NOT_CDS_JAVA_HEAP_RETURN_(nullptr);
and various pointer operations
static uint delta_from_shared_address_base(address addr);
template <typename T>
static void set_pointer(T** ptr, T* value) {
set_pointer((address*)ptr, (address)value);
}
static void set_pointer(address* ptr, address value);
Let's keep the AOTCacheAccess name for now and wait until we merge this PR down
to the Leyden repo. There's some overlap between AOTCacheAccess and CDSConfig.
Maybe we should do a refactor/rename later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24740#discussion_r2057251128