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

Ioi Lam iklam at openjdk.org
Tue Aug 30 00:58:16 UTC 2022


On Mon, 29 Aug 2022 23:47:15 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Flags like `VerifySharedSpaces`, `SharedBaseAddress`, `DumpLoadedClassList`, etc, should be moved from globals.hpp to a new file, src/hotspot/share/cds/cds_globals.hpp
>
> 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.

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

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


More information about the hotspot-runtime-dev mailing list