RFR: 8372617: Save and restore stubgen stubs when using an AOT code cache [v4]
Vladimir Kozlov
kvn at openjdk.org
Mon Jan 26 18:01:38 UTC 2026
On Tue, 20 Jan 2026 17:16:15 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 two additional commits since the last revision:
>
> - fix whitespace issue
> - remaining asmehra feedback
Also several tests (including runtime/cds/appcds/aotCache/) filed when run with GC different from G1:
# SIGSEGV (0xb) at pc=0x00007f21738f106d, pid=3522829, tid=3522833
#
# JRE version: Java(TM) SE Runtime Environment (27.0) (fastdebug build 27-internal-2026-01-24-0025574.vladimir.kozlov.jdkgit2)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 27-internal-2026-01-24-0025574.vladimir.kozlov.jdkgit2, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, serial gc, linux-amd64)
# Problematic frame:
# v ~BufferBlob::final_blob (stub gen) 0x00007f21738f106d
-XX:MaxRAMPercentage=4.16667 -XX:+UseSerialGC -Xlog:class+load -Dcom.sun.management.jmxremote=true -Xlog:arguments,aot,cds:file=HelloAOTCache-with-management-agent.production.log::filesize=0 -XX:AOTMode=on -XX:AOTCache=HelloAOTCache-with-management-agent.aot HelloAOTCacheApp
Stack: [0x00007f218dffc000,0x00007f218e0fd000], sp=0x00007f218e0f7af0, free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
v ~BufferBlob::final_blob (stub gen) 0x00007f21738f106d
J 280 c1 java.util.Arrays.copyOf([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object; java.base at 27-internal (40 bytes) @ 0x00007f216c30d2ce [0x00007f216c30d000+0x00000000000002ce]
J 378 c1 java.util.ArrayList.grow(I)[Ljava/lang/Object; java.base at 27-internal (60 bytes) @ 0x00007f216c30cc2c [0x00007f216c30cb00+0x000000000000012c]
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28433#issuecomment-3800913606
More information about the hotspot-dev
mailing list