-
Bug
-
Resolution: Unresolved
-
P4
-
25
When --add-opens is specified with "java -XX:AOTMode=create", AOTClassLinking is disabled:
=================================
$ java -cp HelloWorld.jar -XX:AOTMode=record \
-XX:AOTConfiguration=hw.aotconfig HelloWorld
Hello World
AOTConfiguration recorded: hw.aotconfig
$ java -Xlog:cds -XX:+AOTClassLinking --add-opens java.base/java.lang=ALL-UNNAMED \
-cp HelloWorld.jar -XX:AOTMode=create -XX:AOTCache=hw.aot \
-XX:AOTConfiguration=hw.aotconfig
[...]
[0.000s][info][cds] optimized module handling: disabled due to incompatible property: jdk.module.addopens=java.base/java.lang=ALL-UNNAMED
[...]
[0.456s][info][cds] Number of classes 1043
[0.456s][info][cds] instance classes = 891, aot-linked = 0, inited = 0
=================================
Proposal:
We should support --add-opens for AOT cache, and allow the AOT cache to be used as long as the exact same set of options --add-opens are used during assembly phase and production run.
=================================
$ java -cp HelloWorld.jar -XX:AOTMode=record \
-XX:AOTConfiguration=hw.aotconfig HelloWorld
Hello World
AOTConfiguration recorded: hw.aotconfig
$ java -Xlog:cds -XX:+AOTClassLinking --add-opens java.base/java.lang=ALL-UNNAMED \
-cp HelloWorld.jar -XX:AOTMode=create -XX:AOTCache=hw.aot \
-XX:AOTConfiguration=hw.aotconfig
[...]
[0.000s][info][cds] optimized module handling: disabled due to incompatible property: jdk.module.addopens=java.base/java.lang=ALL-UNNAMED
[...]
[0.456s][info][cds] Number of classes 1043
[0.456s][info][cds] instance classes = 891, aot-linked = 0, inited = 0
=================================
Proposal:
We should support --add-opens for AOT cache, and allow the AOT cache to be used as long as the exact same set of options --add-opens are used during assembly phase and production run.
- relates to
-
JDK-8352437 -XX:+AOTClassLinking is not compatible with --add-export
-
- Open
-