RFR: 8316969: Improve CDS module graph support for --module option [v3]

Alan Bateman alanb at openjdk.org
Tue Oct 31 09:12:38 UTC 2023


On Tue, 31 Oct 2023 06:17:34 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

> I've added the following field in `ArchivedModuleGraph` so that the `get(String mainModuleName)` will check the `mainModule` before returning `archivedModuleGraph`. `private static String mainModule;` The `mainModule` field is also added in `heapShared.cpp` so that it is stored in the archive.

Thanks, it looks correctly now.

One small question. At ModuleBootstrap L235 we set canArchive as it's okay to archive under specific restrictions. For completeness, shouldn't this set canArchive to CDS.isDumpingStaticArchive? I don't think it matters right now but might be confusing to have canArchive be true when not dumping.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16016#discussion_r1377263985


More information about the core-libs-dev mailing list