On Fri, 22 May 2026 16:47:55 GMT, Frederic Parain <[email protected]> wrote:
>> Classes can be excluded from the CDS archive for a variety of different >> reasons, such as having old classfile versions or being stored in a signed >> jar. These exclusions can extend to other classes that depend on an excluded >> class such as supers or interfaces. >> >> Flat and null-restricted fields have layouts that are calculated when a >> classfile is parsed and they rely on the klass of the field being consistent >> between dumptime and runtime, thus adding a new dependency. This patch adds >> inline flat and null-restricted fields as new dependencies that may lead to >> the holding class being excluded from the CDS archive. Verified with a new >> test and tier 1-5 tests. >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > src/hotspot/share/classfile/systemDictionaryShared.cpp line 313: > >> 311: Handle loader(current, k->class_loader()); >> 312: Symbol* field_klass_name = >> Signature::strip_envelope(fs.signature()); >> 313: Klass* field_klass = >> SystemDictionary::find_instance_or_array_klass(current, field_klass_name, >> loader); > > Why doing a system dictionary search for flat fields when a pointer is > already directly available in the _inline_layout_info_array? if the field is a null_free_inline_type is it also available in the _inline_layout_info_array? This search is pretty quick so would be good to have them done the same way. ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2464#discussion_r3290035069
