RFR: 8293046: Move CDS command-line flags to cds_globals.hpp
Ioi Lam
iklam at openjdk.org
Tue Aug 30 01:37:13 UTC 2022
On Tue, 30 Aug 2022 01:11:42 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> The motivation is modularity and avoid putting everything inside globals.hpp. There are already other files with the same style. E.g., share/gc/shared/tlab_globals.hpp
>>
>> Some of the flags are accessed in contexts where CDS is not enabled, so for the time being I am leaving them always available.
>>
>> If we decide to make some or all of these flags optional, the `#if INCLUDE_CDS` can be put inside cds_globals.hpp, instead of every file that uses it.
>
> Are you saying that none of the CDS flags are already actually gated on INCLUDE_CDS?
>
> But good point about putting the guard inside the cds_globals.hpp file - obvious :)
Unfortunately there are a few references to the CDS flags like SharedBaseAddress that are not gated.
This PR makes it easy to detect such cases (by adding an empty CDS_FLAGS macro in cds_globals.hpp if INCLUDE_CDS is false). I think such cleanup can be done in a follow-up PR.
-------------
PR: https://git.openjdk.org/jdk/pull/10073
More information about the hotspot-runtime-dev
mailing list