RFR: 8352437: Support --add-exports with -XX:+AOTClassLinking [v2]
Ioi Lam
iklam at openjdk.org
Thu Mar 27 20:39:15 UTC 2025
> `-XX:+AOTClassLinking` requires the CDS archived full module graph (FMG).
>
> - Before this PR, when `--add-export` is specified, FMG is disabled, so AOT caches created with `-XX:+AOTClassLinking` cannot be loaded.
> - After this PR, if the exact same `--add-export` flags as specified across the training/assembly/production phases, the FMG can be used, so we can use so AOT caches created with `-XX:+AOTClassLinking`.
>
> The change itself is straight-forward: just remember the `--add-export` flags specified during AOT cache creation, and check the exact same ones are used during the production run.
>
> I did a fair amount of refactoring to change the "exact options specified" checks in modules.cpp, so more such options can be easily added in the future (we need to handle `--add-reads` and `--add-opens` in future RFEs).
>
> (Note: this PR depends on #24122 )
Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24124/files
- new: https://git.openjdk.org/jdk/pull/24124/files/164cd7f5..164cd7f5
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24124&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24124&range=00-01
Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/24124.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24124/head:pull/24124
PR: https://git.openjdk.org/jdk/pull/24124
More information about the hotspot-dev
mailing list