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

Ioi Lam iklam at openjdk.org
Wed Mar 1 12:30:05 UTC 2023


On Wed, 1 Mar 2023 11:26:51 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>> src/hotspot/share/utilities/globalDefinitions.hpp line 594:
>> 
>>> 592: #else
>>> 593: // in non CDS mode do not export it
>>> 594: extern const bool UseSharedSpaces;
>> 
>> How about this?
>> 
>> 
>> const bool RequireSharedSpaces = false;
>> 
>> 
>> This will allow the C++ compiler to eliminate all code that depend on this value when `INCLUDE_CDS` is false.
>
> Hi Ioi, I set this already some lines above (in the non-INCLUDE_CDS case).

You need to remove the `extern` keyword, and add the definition of `= false` in globalDefinitions.hpp.

Then, the corresponding definition should be removed from globalDefinitions.cpp.

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

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


More information about the hotspot-dev mailing list