RFR: 8354083: Support --add-reads with -XX:+AOTClassLinking

Calvin Cheung ccheung at openjdk.org
Thu May 8 00:28:07 UTC 2025


This fix adds the `--add-reads` support for CDS and AOTClassLinking.
Before the fix, if the `--add-reads` is specified during CDS archive dumping, the user will see the following log if `-Xlog:cds=info` is enabled:
`[0.000s][info][cds] optimized module handling: disabled due to incompatible property: jdk.module.addreads=com.norequires=org.astro`
During runtime, the archived full module graph will be disabled:
`[0.021s][info][cds       ] full module graph: disabled`

With the fix, the optimized module handling won't be disabled during dump time and the full module graph will be enabled during runtime provided the same --add-reads option is specified during dump time and runtime.

Testing: tiers 1 - 4.

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

Commit messages:
 - fix trailing whitespace
 - 8354083: Support --add-reads with -XX:+AOTClassLinking

Changes: https://git.openjdk.org/jdk/pull/25109/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25109&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8354083
  Stats: 111 lines in 4 files changed: 81 ins; 14 del; 16 mod
  Patch: https://git.openjdk.org/jdk/pull/25109.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25109/head:pull/25109

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


More information about the hotspot-runtime-dev mailing list