See https://github.com/openjdk/jdk/blob/56c75453cd69e80b9411b4e1794c953998406342/src/hotspot/share/classfile/modules.cpp#L513-L519
The CDS full module graph is supposed to contain a snapshot of the boot layer, which has 3 unnamed modules for the boot, platform and system class loaders. Each unnamed module is represented by a java.lang.Module Java object and a ModuleEntry C++ object.
Currently, we archive only the java.lang.Module for the platform and system loaders. The other 4 objects are dynamically created in the production run.
Proposal
Archive all of the above 6 objects when CDSConfig::is_dumping_full_module_graph() is true.
This is required for JDK-8350550, as we need the java.lang.Module object for archived classes in the unnamed module of the boot loader prior to executing any Java code.
The CDS full module graph is supposed to contain a snapshot of the boot layer, which has 3 unnamed modules for the boot, platform and system class loaders. Each unnamed module is represented by a java.lang.Module Java object and a ModuleEntry C++ object.
Currently, we archive only the java.lang.Module for the platform and system loaders. The other 4 objects are dynamically created in the production run.
Proposal
Archive all of the above 6 objects when CDSConfig::is_dumping_full_module_graph() is true.
This is required for JDK-8350550, as we need the java.lang.Module object for archived classes in the unnamed module of the boot loader prior to executing any Java code.