RFR: 8372617: Save and restore stubgen stubs when using an AOT code cache [v15]

Erik Österlund eosterlund at openjdk.org
Thu Feb 26 21:58:32 UTC 2026


On Mon, 23 Feb 2026 10:36:21 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> This PR adds save and restore of all generated stubs to the AOT code cache on x86 and aarch64. Other arches are modified to deal with the related generic PAI changes.
>> 
>> Small changes were required to the aarch64 and x86_64 generator code in order to meet two key constraints:
>> 1. the first declared entry of every stub starts at the first instruction in the stub code range
>> 2. all data/code cross-references from one stub to another target a declared stub entry
>
> Andrew Dinn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   add AOT logging for C strings

Other than repopulating it, which will make GC safepoints keep it up to date, you need to also call its fixup routine to ensure the initial barrier color is right. The dump time colors might be different from the runtime colors.

https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/x86/gc/z/zBarrierSetAssembler_x86.cpp#L1411

This is how we call it from shared code.

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

PR Comment: https://git.openjdk.org/jdk/pull/28433#issuecomment-3969459742
PR Comment: https://git.openjdk.org/jdk/pull/28433#issuecomment-3969461864


More information about the hotspot-dev mailing list