RFR: 8370377: Avoid resolving constant pool entries during preimage generation in the training run
Ioi Lam
iklam at openjdk.org
Wed Oct 22 17:17:18 UTC 2025
On Wed, 22 Oct 2025 02:23:32 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:
> This patch prevents constant pool entries from getting stored in resolved state in the preimage generated by the training run. Now the information about the constant pool entries to be pre-resolved in the assembly phase is only conveyed through FinalImageRecipes, making it easier to trace the resolution of CP entries.
> Note that this change broke the pre-resolution of CP entries referred by getfield and putfield bytecodes. This is because `AOTConstantPoolResolver::preresolve_field_and_method_cp_entries` was only looking for `getfield` and `putfield` bytecodes, but during the training run, these bytecodes may get replaced by their "fast" versions by the interpreter, or by the "nofast" versions during preimage dumping. So I have to add cases for handling the "fast" and "nofast" variations of the bytecodes as well.
> I also added logging to dump the list of CP entries to be pre-resolved which is stored as part of FinalImageRecipes in preimage.
Marked as reviewed by iklam (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/27927#pullrequestreview-3366731537
More information about the hotspot-dev
mailing list