RFR: 8293046: Move CDS command-line flags to cds_globals.hpp

David Holmes dholmes at openjdk.org
Tue Aug 30 01:15:09 UTC 2022


On Tue, 30 Aug 2022 00:53:56 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> src/hotspot/share/classfile/classLoader.cpp line 28:
>> 
>>> 26: #include "jvm.h"
>>> 27: #include "jimage.hpp"
>>> 28: #include "cds/cds_globals.hpp"
>> 
>> Doesn't this, and similar, need to be guarded by INCLUDE_CDS?
>
> 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 :)

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

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


More information about the hotspot-runtime-dev mailing list