RFR: JDK-8302989: Add missing INCLUDE_CDS checks [v4]

David Holmes dholmes at openjdk.org
Wed Mar 8 09:30:25 UTC 2023


On Tue, 7 Mar 2023 14:26:49 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Unfortunately with the latest revision of the patch, quite a few tests fail when the build is configured with --disable-cds .

Yes that is to be expected. The tests have not be written to allow them to be run for arbitrary selection of the INCLUDE_XXX features. You will also have to exclude running all the CDS tests on such a build. Arguably any tests that set the -Xshare flag depend on CDS (positvely or negatively) and so should use appropriate @requires or runtime checks before using the flag.

> Maybe we can keep the -Xshare flags and make their behavior consistent with builds that have CDS enabled

This might help the tests but semantically this just seems wrong to me. It would be like accepting G1 flags when you only have SerialGC available.

I think we are just demonstrating that fully conditionalizing CDS code requires some higher-level semantic issues to be dealt with and that it is probably not worth trying to do that. So that brings us back to whether it is worth even trying to make a small step from where we are towards more complete conditionalization? Seems an arbitrary line to set to me when the benefit is minimal. But if you want to revert to an earlier version of the patch that "works" then I won't object further.

-------------

PR: https://git.openjdk.org/jdk/pull/12691


More information about the hotspot-dev mailing list