RFR: 8352003: Support --add-opens with -XX:+AOTClassLinking

Ioi Lam iklam at openjdk.org
Thu Apr 17 21:23:55 UTC 2025


On Wed, 16 Apr 2025 18:21:41 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

> This RFE allows --add-opens to be specified for AOT cache creation. AOT cache can be used during production run with --add-opens option as long as the same set of options is used during assembly phase.
> 
> Passed tiers 1 - 4 testing.

Do we have a test case where  `--add-opens` is used both at dump time and run time? That will verify that `--add-opens` at dump time is correctly processed.

If we don't have a test yet, I think we can modify the existing test to iterate this block twice: once with `--add-opens` at dump time and once without. Both iterations should allow the `setAccessible` call.

https://github.com/openjdk/jdk/blob/ad7c475fb1e23f583a33d58f0bd73ea0fb56740c/test/hotspot/jtreg/runtime/cds/appcds/jigsaw/modulepath/AddOpens.java#L85-L105

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

PR Comment: https://git.openjdk.org/jdk/pull/24695#issuecomment-2814049507


More information about the hotspot-runtime-dev mailing list