RFR: 8334898: Resolve static field/method references at CDS dump time [v3]

Ashutosh Mehra asmehra at openjdk.org
Fri Oct 24 18:39:19 UTC 2025


> This patch pre-resolves constant pool entries referred by getstatic, putstatic and invokestatic bytecodes in the assembly phase.
> It also extends ResolvedConstants.java test to run in AOT mode workflow and additional test for checking resolution of static CP entries.
> 
> Before this PR, stats on pre-resolved CP entries in the assembly phase reported by -Xlog:aot=info:
> 
> [2.161s][info ][aot        ] Class  CP entries =  12553, archived =   3707 ( 29.5%), reverted =      0
> [2.161s][info ][aot        ] Field  CP entries =   5236, archived =   1355 ( 25.9%), reverted =      0
> [2.161s][info ][aot        ] Method CP entries =   3835, archived =   3818 ( 99.6%), reverted =     17
> [2.161s][info ][aot        ] Indy   CP entries =      9, archived =      9 (100.0%), reverted =      0
> 
> 
> After this PR:
> 
> 2.323s][info ][aot        ] Class  CP entries =  12553, archived =   3700 ( 29.5%), reverted =      0
> [2.323s][info ][aot        ] Field  CP entries =   5236, archived =   3519 ( 67.2%), reverted =      0
> [2.323s][info ][aot        ] Method CP entries =  21027, archived =   5527 ( 26.3%), reverted =     17
> [2.323s][info ][aot        ] Indy   CP entries =    353, archived =      9 (  2.5%), reverted =      0

Ashutosh Mehra has updated the pull request incrementally with one additional commit since the last revision:

  Move check for VM_Version::supports_fast_class_init_checks() to
  remove_resolved_method_entries_if_non_deterministic()
  
  Signed-off-by: Ashutosh Mehra <asmehra at redhat.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27958/files
  - new: https://git.openjdk.org/jdk/pull/27958/files/5994ead4..61e5653d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27958&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27958&range=01-02

  Stats: 6 lines in 1 file changed: 1 ins; 4 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/27958.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27958/head:pull/27958

PR: https://git.openjdk.org/jdk/pull/27958


More information about the hotspot-dev mailing list