RFR: 8316969: Improve CDS module graph support for --module option [v3]
Calvin Cheung
ccheung at openjdk.org
Fri Oct 27 16:25:32 UTC 2023
On Fri, 27 Oct 2023 13:57:38 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> I've pushed another update with the following changes:
>>
>> - in the VM code, skip archiving full module graph if there's an incubator module by checking if the ArchivedBootLayer::archivedBootLayer is available;
>> - included your suggested code changes in ModuleBootstrap.java;
>> - added a test scenario with an incubator module.
>
>> I've pushed another update with the following changes:
>>
>> * in the VM code, skip archiving full module graph if there's an incubator module by checking if the ArchivedBootLayer::archivedBootLayer is available;
>
> I think we still have the issue when the archive is created with a main module (meaning a named module) but you run with the class path as the initial module, e.g. java -version. Is the update missing the changes to ArchivedModuleGraph as I think that will need to check that the main module matches the archive.
I reran the script you sent me few days ago and got the expected results with the latest changes.
The checking of the main module name matches between dump time and runtime is performed in the VM code. If an archive (even the default CDS archive classes.jsa) is created with the -m option, running with just `java -version` will disable the optimized module handling.
[0.136s][info ][cds ] _archived_main_module_name m
[0.136s][info ][cds ] Module m specified during dump time but not during runtime
[0.136s][info ][cds ] Disabling optimized module handling
[0.136s][info ][cds ] optimized module handling: disabled
[0.136s][info ][cds ] full module graph: disabled
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16016#discussion_r1374796890
More information about the core-libs-dev
mailing list