RFR: 8318484: Initial version of cdsConfig.hpp

Calvin Cheung ccheung at openjdk.org
Thu Oct 19 22:25:34 UTC 2023


On Thu, 19 Oct 2023 05:56:53 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> This is the first step for [JDK-8318483 - Move CDS configuration management into cdsConfig.hpp](https://bugs.openjdk.org/browse/JDK-8318483)
> 
> - Remove `Arguments::is_dumping_archive()` and `Arguments assert_is_dumping_archive()`
> - Add the following new APIs
> 
> 
> class CDSConfig {
>   static bool is_dumping_archive();
>   static bool is_dumping_static_archive();
>   static bool is_dumping_dynamic_archive();
>   static bool is_dumping_heap();
> };
> 
> 
> - Convert some use of `DumpSharedSpaces` and `DynamicDumpSharedSpaces` to these new APIs
> 
> (More APIs will be added in future sub tasks of [JDK-8318483](https://bugs.openjdk.org/browse/JDK-8318483))

One nit in cdsConfig.hpp.

src/hotspot/share/cds/cdsConfig.hpp line 39:

> 37: 
> 38:   // CDS archived heap
> 39:   static bool      is_dumping_heap()                         NOT_CDS_JAVA_HEAP_RETURN_(false);

Too much blank spaces between the function declarations and NOT_CDS_* macros.
The function declarations could also be shifted more to the left.

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

Marked as reviewed by ccheung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16257#pullrequestreview-1688783121
PR Review Comment: https://git.openjdk.org/jdk/pull/16257#discussion_r1366197088


More information about the serviceability-dev mailing list