RFR: 8364929: Assign unique id to each AdapterBlob stored in AOTCodeCache
Vladimir Kozlov
kvn at openjdk.org
Tue Sep 30 19:55:33 UTC 2025
On Tue, 30 Sep 2025 18:28:41 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> src/hotspot/share/runtime/sharedRuntime.cpp line 3008:
>>
>>> 3006: });
>>> 3007: // Set adapter id to the maximum id found in the AOTCache
>>> 3008: _id_counter = max_id;
>>
>> Is this number the same as number of AOT adapter entries in AdapterHandlerEntry? Do we need `max_id`? In which case they could be different?
>
>> Is this number the same as number of AOT adapter entries in AdapterHandlerEntry? Do we need max_id? In which case they could be different?
>
> I thought about this. It is possible that some adapters generated in assembly phase are not stored in the cache. So there may be gaps in the adapter ids of the adapters in the cache. In such case using the number of entries to decide next adapter id can result in clash of adapter id with the runtime generated adapters. But the maximum id ensures adapter ids are never reused.
Please add comment about that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27553#discussion_r2392674339
More information about the hotspot-dev
mailing list