Currently FMG is disabled when -Xbootclasspath/a is used
$ java -Xlog:cds -Xbootclasspath/a:/tmp --version
[0.000s][info][cds] optimized module handling: disabled because bootclasspath was appended
[...]
[0.006s][info][cds] initial optimized module handling: disabled
[0.006s][info][cds] initial full module graph: disabled
[0.006s][info][cds] _archived_main_module_name (null)
[0.006s][info][cds] optimized module handling: disabled
[0.006s][info][cds] full module graph: disabled
[...]
java 23-internal 2024-09-17
Java(TM) SE Runtime Environment (build 23-internal-adhoc.iklam.tea)
JavaHotSpot(TM) 64-Bit Server VM (build 23-internal-adhoc.iklam.tea, mixed mode, sharing)
*************************
Proposal:
We should support FMG as long as -Xbootclasspath/a matches between dumptime and runtime. This is useful because:
- This allows us to use -Xbootclasspath/a in jtreg tests for FMG. For example, we can use WhiteBox to check if some classes are archived, etc.
- Some apps may use -Xbootclasspath/a
- Future CDS optimizations (such as archiving java/lang/reflect/Proxy classes -- see JDK-XXXXXXX) depend on FMG. We don't want to have to disable these optimizations when -Xbootclasspath/a is used.
$ java -Xlog:cds -Xbootclasspath/a:/tmp --version
[0.000s][info][cds] optimized module handling: disabled because bootclasspath was appended
[...]
[0.006s][info][cds] initial optimized module handling: disabled
[0.006s][info][cds] initial full module graph: disabled
[0.006s][info][cds] _archived_main_module_name (null)
[0.006s][info][cds] optimized module handling: disabled
[0.006s][info][cds] full module graph: disabled
[...]
java 23-internal 2024-09-17
Java(TM) SE Runtime Environment (build 23-internal-adhoc.iklam.tea)
JavaHotSpot(TM) 64-Bit Server VM (build 23-internal-adhoc.iklam.tea, mixed mode, sharing)
*************************
Proposal:
We should support FMG as long as -Xbootclasspath/a matches between dumptime and runtime. This is useful because:
- This allows us to use -Xbootclasspath/a in jtreg tests for FMG. For example, we can use WhiteBox to check if some classes are archived, etc.
- Some apps may use -Xbootclasspath/a
- Future CDS optimizations (such as archiving java/lang/reflect/Proxy classes -- see JDK-XXXXXXX) depend on FMG. We don't want to have to disable these optimizations when -Xbootclasspath/a is used.
- relates to
-
JDK-8323032 OptimizedModuleHandlingTest failed in dynamic CDS archive mode
- Resolved