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

David Holmes dholmes at openjdk.org
Tue Mar 7 02:55:19 UTC 2023


On Fri, 3 Mar 2023 08:34:21 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> src/hotspot/share/runtime/arguments.cpp line 1460:
>> 
>>> 1458: #if INCLUDE_CDS
>>> 1459:     UseSharedSpaces = false;
>>> 1460: #endif
>> 
>> This doesn't make sense - the entire `no_shared_spaces` method is only meaningful on a JVM with CDS. Otherwise `-Xshare:on` should immediately be rejected. ??
>
> Hi David, unfortunately this has to stay for now, otherwise we would try to set a const in the CDS-disabled build, this does not compile.
> Maybe it would make sense to guard the whole function `no_shared_spaces`  and adjust the calls/usages but I would prefer a separate issue for this.

AFAICS all calls to `no_shared_spaces` are already within INCLUDE_CDS regions so the function itself can also be INCLUDE_CDS only.

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

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


More information about the hotspot-dev mailing list