On Mon, 1 Jun 2026 20:28:08 GMT, Matias Saavedra Silva <[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). > > Matias Saavedra Silva has updated the pull request incrementally with one > additional commit since the last revision: > > Removed fastpath for statics CDS changes look good to me. Some nits. src/hotspot/share/classfile/systemDictionaryShared.cpp line 542: > 540: if (fs.is_flat() || fs.is_null_free_inline_type()) { > 541: InlineKlass* field_klass = > k->get_inline_type_field_klass(fs.index()); > 542: if (is_dependency_excluded(k, InstanceKlass::cast(field_klass), > "inline field")) { "inline field" should be "inline field type", so the error message looks like: Skipping InlineFieldExclusionApp: inline field type ExcludedValueClass is excluded test/hotspot/jtreg/runtime/cds/appcds/InlineFieldExclusionTest.java line 28: > 26: * @test > 27: * @bug 8384756 > 28: * @summary Verify exclusion of classes if their types are also excluded How about: @summary A class should be excluded if the type of one of its inlined fields is excluded. ------------- PR Review: https://git.openjdk.org/valhalla/pull/2464#pullrequestreview-4406649364 PR Review Comment: https://git.openjdk.org/valhalla/pull/2464#discussion_r3338802240 PR Review Comment: https://git.openjdk.org/valhalla/pull/2464#discussion_r3338787754
