RFR: 8364269: Simplify code cache API by storing adapter entry offsets in blob [v3]
Aleksey Shipilev
shade at openjdk.org
Thu Aug 7 17:06:16 UTC 2025
On Thu, 7 Aug 2025 13:57:50 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 incrementally with one additional commit since the last revision:
>
> propagate BufferBlob subclass sizes up constructor chain
This looks fine to me. API got indeed simpler.
src/hotspot/share/code/codeBlob.hpp line 410:
> 408: static const int ENTRY_COUNT = 4;
> 409: private:
> 410: AdapterBlob(int size, CodeBuffer* cb, int entry_offset[ENTRY_COUNT]);
I was today years old when I realized you can pass const-sized arrays as arguments.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26532#pullrequestreview-3097985317
PR Review Comment: https://git.openjdk.org/jdk/pull/26532#discussion_r2260891380
More information about the hotspot-dev
mailing list