-
Enhancement
-
Resolution: Fixed
-
P4
-
16
if (is_internal_module_property(key) ||
strcmp(key, "jdk.module.main") == 0) {
MetaspaceShared::disable_optimized_module_handling();
log_info(cds)("Using optimized module handling disabled due to incompatible property: %s=%s", key, value);
}
There are a couple of issues with this code placement:
1. We've added module specific property handling to general purpose code, when we already have module specific methods: Arguments::create_module_property and Arguments::create_numbered_module_property. The logic should be handled in one or both of those methods as applicable.
2. The check is_internal_module_property(key) will be true for all module related properties, but it is far from clear that the intent is to disable the optimisation if any module related flag is provided. So this check seems far too broad. We may be getting away with this because when called from Arguments::create_numbered_module_property we have already appended a number to the key and so AFAICS we will fail to match.
This new code is also specific to a build with INCLUDE_CDS defined and we should ensure we use the most effective mechanism to remove this code in non-CDS builds (ref:
- relates to
-
JDK-8266329 Improve CDS module graph support for command-line options
- Open
-
JDK-8247388 Minimal build broken after JDK-8240245 (undefined reference to `MetaspaceShared::_use_optimized_module_handling')
- Closed
-
JDK-8240245 Avoid calling is_shared_class_visible() in SystemDictionary::load_shared_class()
- Resolved