RFR: 8354887: Preserve runtime blobs in AOT code cache [v6]
Andrew Dinn
adinn at openjdk.org
Thu May 15 16:39:58 UTC 2025
On Tue, 13 May 2025 18:03:09 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
>> [8350209](https://bugs.openjdk.org/browse/JDK-8350209) introduced the framework for storing code in aot code cache and used it for caching i2c/c2i adapters.
>> This PR extends the `AOTCodeCache` infrastructure and stores various runtime blobs (shared blobs, C1 and C2 runtime blobs) in the AOT code cache. It adds a new diagnostic flag `AOTStubCaching` to enable/disable the caching of these blobs.
>> `AOTCodeFlags.java` test is extended to cover `AOTStubCaching`.
>
> Ashutosh Mehra has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 18 commits:
>
> - Merge branch 'master' into preserve-runtime-blobs-master
> - Address Vladimir's comments
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Update test to make it more resilient
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Remove more unused code
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Fix whitespace issue. Remove unused code.
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Add test for using AOTCodeCache with different CompressedOops
> configuration
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Add check for compressed oops base address; minor refacotring
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Merge branch 'master' into preserve-runtime-blobs-master
> - Address Vladimir's comments
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - Remove irrelevant comment
>
> Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>
> - ... and 8 more: https://git.openjdk.org/jdk/compare/d1543429...5d7c3aa0
I looked through everything and could not spot any issues other than moving the adapter offsets into the blob. If we do decide to change that it can wait until we fold in the StubGen stub save/restore -- where we will need to save the blob plus extra info about the stubs within the blob and offsets to oner more entries within each stub.
We will also eventually need to clean up registration of stub entry addresses in the address table but that has to wait until I have completed implementing generator code to produce an enum that identifies all generated entries.
So I think this is ok to go in for now.
-------------
Marked as reviewed by adinn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/25019#pullrequestreview-2844379139
More information about the hotspot-runtime-dev
mailing list