RFR: 8354887: Preserve runtime blobs in AOT code cache

Vladimir Kozlov kvn at openjdk.org
Sat May 3 17:46:50 UTC 2025


On Sat, 3 May 2025 16:44:52 GMT, Vladimir Kozlov <kvn 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`.
>
> src/hotspot/cpu/x86/x86_64.ad line 1868:
> 
>> 1866:     } else {
>> 1867:       __ mov64(r10, (int64_t) $meth$$method);
>> 1868:     }
> 
> I think we should do it always, not conditionally. On AArch64 it is unconditional - relocation processing know how to do that.

I will update `premain` code too later.

> src/hotspot/share/asm/codeBuffer.hpp line 303:
> 
>> 301:     os::free((void*)_string);
>> 302:     _string = nullptr;
>> 303:   }
> 
> Move it into `.cpp` so you don't need to include `os.hpp` here.

Constructor too.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25019#discussion_r2072427496
PR Review Comment: https://git.openjdk.org/jdk/pull/25019#discussion_r2072427920


More information about the hotspot-runtime-dev mailing list