Integrated: 8370377: Avoid resolving constant pool entries during preimage generation in the training run
Ashutosh Mehra
asmehra at openjdk.org
Wed Oct 22 19:15:21 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.
This pull request has now been integrated.
Changeset: d8ebe387
Author: Ashutosh Mehra <asmehra at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d8ebe387595af43e2cdbbce396547d6daaf8c7dc
Stats: 114 lines in 4 files changed: 53 ins; 12 del; 49 mod
8370377: Avoid resolving constant pool entries during preimage generation in the training run
Reviewed-by: adinn, iklam
-------------
PR: https://git.openjdk.org/jdk/pull/27927
More information about the hotspot-dev
mailing list