RFR: 8371178: Preserve fast version of getfield and putfield in AOTCache
Ioi Lam
iklam at openjdk.org
Tue Nov 4 16:41:57 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
src/hotspot/share/cds/aotMetaspace.cpp line 556:
> 554: case ztos:
> 555: new_code = Bytecodes::_fast_bgetfield;
> 556: break;
Why is this `switch` block necessary? Is it possible for `new_code` to be different than `*bcs.bcp()`? If not, it might be easier to initialize `new_code` to `Bytecodes::_illegal` and then do the rewriting only if `new_code` has been updated.
src/hotspot/share/cds/aotMetaspace.cpp line 635:
> 633: }
> 634: case Bytecodes::_aload_0:
> 635: new_code = Bytecodes::_nofast_aload_0;
Maybe add a comment here that `_fast_Xaccess_0` bytecodes will be reverted?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28121#discussion_r2491222034
PR Review Comment: https://git.openjdk.org/jdk/pull/28121#discussion_r2491238312
More information about the hotspot-runtime-dev
mailing list