On Fri, 22 May 2026 18:58:58 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: > > Fixed test, removed from group, Fred comments test/hotspot/jtreg/runtime/cds/appcds/InlineFieldExclusionTest.java line 32: > 30: * @library /test/lib > 31: * @enablePreview > 32: * @modules java.base/jdk.internal.vm.annotation Is this necessary? test/hotspot/jtreg/runtime/cds/appcds/test-classes/InlineFieldExclusionApp.java line 27: > 25: import excluded.ExcludedValueClass; > 26: > 27: public class InlineFieldExclusionApp { We usually just put this class inside InlineFieldExclusionTest.java to avoid having too many files. test/hotspot/jtreg/runtime/cds/appcds/test-classes/excluded/ExcludedValueClass.java line 28: > 26: > 27: import jdk.internal.vm.annotation.LooselyConsistentValue; > 28: import jdk.internal.vm.annotation.NullRestricted; Are these necessary ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2464#discussion_r3290677879 PR Review Comment: https://git.openjdk.org/valhalla/pull/2464#discussion_r3290681061 PR Review Comment: https://git.openjdk.org/valhalla/pull/2464#discussion_r3290675203
