-
Enhancement
-
Resolution: Unresolved
-
P3
-
None
Currently, the CDS archived full module graph (FMG, implemented in JDK-8244778) is disabled when you specify command-line options that are related to the module system.
We should improve CDS so that we can still take advantage of the FMG when certain command-line options are specified. Here are a few possibilities to consider:
1. At runtime, --add-modules is specified.
One common scenario is when -XX:+EnableJVMCI is specified, we automatically add the jdk.internal.vm.ci module.
We should try to load the FMG, and then add the extra modules as specified.
2. At runtime, --module is specified.
This limits the number of modules visible in the boot layer. We should load the FMG from CDS, and then trim out the unwanted modules.
3. At dump time, --module is specified
This limits the number of modules visible in the boot layer. At runtime, we require that the same --module must be specified in order to load the FMG.
4. At runtime, --module-path is specified.
We should load the FMG from CDS, and then add the extra modules.
5. At dump time, --module-path is specified
We should dump the FMG with the extra modules. At run time, we require that --module-path is the same as (or a superset of) the dump time --module-path in order to load the FMG.
This RFE can be implemented in several steps (to be tracked as subtasks of this RFE).
We should improve CDS so that we can still take advantage of the FMG when certain command-line options are specified. Here are a few possibilities to consider:
1. At runtime, --add-modules is specified.
One common scenario is when -XX:+EnableJVMCI is specified, we automatically add the jdk.internal.vm.ci module.
We should try to load the FMG, and then add the extra modules as specified.
2. At runtime, --module is specified.
This limits the number of modules visible in the boot layer. We should load the FMG from CDS, and then trim out the unwanted modules.
3. At dump time, --module is specified
This limits the number of modules visible in the boot layer. At runtime, we require that the same --module must be specified in order to load the FMG.
4. At runtime, --module-path is specified.
We should load the FMG from CDS, and then add the extra modules.
5. At dump time, --module-path is specified
We should dump the FMG with the extra modules. At run time, we require that --module-path is the same as (or a superset of) the dump time --module-path in order to load the FMG.
This RFE can be implemented in several steps (to be tracked as subtasks of this RFE).
- relates to
-
JDK-8316448 [JVMCI] Do not load jdk.internal.vm.ci automatically if UseJVMCINativeLibrary is true
- Closed
-
JDK-8310108 Skip ReplaceCriticalClassesForSubgraphs when EnableJVMCI is specified
- Resolved
-
JDK-8315127 CDSMapTest fails with incorrect number of oop references
- Resolved
-
JDK-8223077 module path support for dynamic CDS archive
- Resolved
-
JDK-8247449 Revisit the argument processing logic for MetaspaceShared::disable_optimized_module_handling()
- Resolved