RFR: 8316969: Improve CDS module graph support for --module option [v3]
Calvin Cheung
ccheung at openjdk.org
Thu Oct 19 18:26:55 UTC 2023
On Thu, 5 Oct 2023 16:23:03 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> simplify some code in modules.cpp
>
> src/hotspot/share/classfile/modules.cpp line 597:
>
>> 595: MetaspaceShared::disable_optimized_module_handling();
>> 596: }
>> 597: }
>
> I think this code can be made less verbose:
>
> bool disable = false;
> if (runtime_main_module == nullptr) {
> if (_archived_main_module_name != nullptr) {
> log_info(cds)("Module %s specified during dump time but not during runtime", _archived_main_module_name);
> disable = true;
> }
> } else {
> if (_archived_main_module_name == nullptr) {
> log_info(cds)("Module %s specified during runtime but not during dump time", runtime_main_module);
> disable = true;
> } else if (strcmp(runtime_main_module, _archived_main_module_name) != 0) {
> log_info(cds)("Mismatched modules: runtime %s dump time %s", runtime_main_module, _archived_main_module_name);
> disable = true;
> }
> }
>
> if (disable) {
> log_info(cds)("Disabling optimized module handling");
> MetaspaceShared::disable_optimized_module_handling();
> }
I've pushed a commit with the above simplification.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16016#discussion_r1365948448
More information about the hotspot-runtime-dev
mailing list