Integrated: 8319343: Improve CDS module graph support for --add-modules option
Calvin Cheung
ccheung at openjdk.org
Thu Oct 31 21:32:35 UTC 2024
On Wed, 16 Oct 2024 22:46:40 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:
> Summary of changes:
>
> Before dumping info the archive, all the module names from `--add-modules` will be sorted and then concatenated into one string with comma as the separator between module names.
>
> During runtime, same function will be used to obtain the string in the same format with sorted module names. The string will be compared with the one from the archive to determine if the same module names were specified during dump time.
>
> ModuleBootstrap.java
> The `addModulesFromRuntimeImage` method is added to check if the modules in `addModules` are from the runtime image. If any of the modules isn't in the runtime image, archiving will be disabled.
>
> ArchivedModuleGraph.java
> The constructor has an addition argument `Set addModules`
> The `get` method also has an addition argument `Set addModules`. It returns the `archivedModuleGraph` only if both the `mainModule` and the `addModules` are the same as the input arguments.
>
> Passed tiers 1 - 4 testing.
This pull request has now been integrated.
Changeset: d4eb2d92
Author: Calvin Cheung <ccheung at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/d4eb2d924e917e9a81c89ba938876f18089c793c
Stats: 385 lines in 12 files changed: 364 ins; 4 del; 17 mod
8319343: Improve CDS module graph support for --add-modules option
Reviewed-by: alanb, iklam
-------------
PR: https://git.openjdk.org/jdk/pull/21553
More information about the core-libs-dev
mailing list