RFR: 8364269: Simplify code cache API by storing adapter entry offsets in blob [v2]
Ashutosh Mehra
asmehra at openjdk.org
Thu Aug 7 13:57:52 UTC 2025
On Tue, 29 Jul 2025 13:28:15 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> The AOT stub blob save and restore API handles Adapter blobs differently to other single-stub blobs by passing the associated entries in a separate auxiliary array. Storing the entry offsets in the blob, as happens with other generated blobs, simplifies the current save/restore API and implementation. It also makes it easier to define and implement an API extension supporting save and restore of multi-stub (StubGen) blobs.
>
> Andrew Dinn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8364269
> - simplify code cache API by storing adapter entry offsets in blob
If the entry offsets are stored in `AdapterBlob`, `AdapterHandlerEntry` can then just store a pointer to the blob and get rid of the offsets. `SharedRuntime::generate_i2c2i_adapters` can be updated to return the AdapterBlob. And when storing the AdapterHandlerEntry, pointer to the blob can be cleared and restored in `AdapterHandlerLibrary::lookup_aot_cache`.
This assumes the AdapterBlob won't be moved around in the code cache.
@adinn does this make sense?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26532#issuecomment-3137074976
More information about the hotspot-dev
mailing list