[lworld] RFR: 8360530: [lworld] CDS does not preload classes listed in the LoadableDescriptors attribute [v2]
Tobias Hartmann
thartmann at openjdk.org
Mon Jun 30 12:33:07 UTC 2025
On Wed, 25 Jun 2025 20:41:04 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> When a class is loaded, it's loadable descriptors attribute is parsed and the VM attempts to load any classes referred to in the attribute so long as the attribute is associated with a non-static field. A class loaded from the CDS archive should do the same, and this patch corrects the parsing of the descriptors to accomplish this. It also includes additional logging in the same style used when parsing the attribute without CDS. Verified with tier 1-5 tests.
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix copyright
src/hotspot/share/classfile/systemDictionary.cpp line 1108:
> 1106: // Pre-load inline class
> 1107: TempNewSymbol name = Signature::strip_envelope(sig);
> 1108: log_info(class, preload)("Preloading class %s during loading of shared class %s. Cause: field type in LoadableDescriptors attribute", name->as_C_string(), ik->name()->as_C_string());
@matias9927 Sorry I'm late here but shouldn't this read `Cause: a null-free non-static field is declared with this type` similar to the logging done in `ClassFileParser::post_process_parsed_stream`? Only below code actually checks for `is_class_in_loadable_descriptors_attribute`.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1492#discussion_r2174961293
More information about the valhalla-dev
mailing list