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

Matthias Baesken mbaesken at openjdk.org
Fri Mar 3 08:37:25 UTC 2023


On Fri, 3 Mar 2023 00:50:09 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   adjust some cds related vars
>
> 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.

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

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


More information about the hotspot-dev mailing list