RFR: 8371178: Preserve fast version of getfield and putfield in AOTCache

Ashutosh Mehra asmehra at openjdk.org
Tue Nov 4 03:58:00 UTC 2025


On Tue, 4 Nov 2025 02:10:13 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

> Preserve the "fast" version of `getfield` and `putfield` bytecodes in the AOTCache during the assembly phase if the constant pool entry referred by the bytecodes is stored in resolved state in the AOTCache.
> 
> Testing:
> Testing with JTREG="AOT_JDK=true" TEST=hotspot_runtime_no_cds passed on x86-64

For the record, I tried to preserve `_fast_Xaccess_0` bytecodes (these are the fast versions for the pair `(aload_0, getfield)`) but then these bytecodes breaks `serviceability/jvmti/FieldAccessWatch/FieldAccessWatch.java` test because the JVMTI event notifications for field access are skipped. Morevoer, I believe setting JVMTI breakpoint on the original location of the  `getfield` bytecode won't work either.
 While the notifications to field access can be fixed, enabling breakpoint is more challenging and probably not worth the effort.
So in this patch I only preserve the fast versions of `getfield` and `putfield` bytecodes.

@iklam @adinn can you please review this patch.

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

PR Comment: https://git.openjdk.org/jdk/pull/28121#issuecomment-3483654527
PR Comment: https://git.openjdk.org/jdk/pull/28121#issuecomment-3483654973


More information about the hotspot-runtime-dev mailing list