RFR: 8318484: Initial version of cdsConfig.hpp
Ioi Lam
iklam at openjdk.org
Fri Oct 20 02:24:35 UTC 2023
On Thu, 19 Oct 2023 22:21:30 GMT, Calvin Cheung <ccheung 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))
>
> 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.
The spaces are for functions that will be added in the next PR that have longer names:
// Basic CDS features
static bool is_dumping_archive() NOT_CDS_RETURN_(false);
static bool is_dumping_static_archive() NOT_CDS_RETURN_(false);
static bool is_dumping_dynamic_archive() NOT_CDS_RETURN_(false);
// CDS archived heap
static bool is_dumping_heap() NOT_CDS_JAVA_HEAP_RETURN_(false);
static bool is_loading_heap() NOT_CDS_JAVA_HEAP_RETURN_(false);
static void disable_dumping_full_module_graph(const char* reason = nullptr) NOT_CDS_JAVA_HEAP_RETURN;
static bool is_dumping_full_module_graph() NOT_CDS_JAVA_HEAP_RETURN_(false);
static void disable_loading_full_module_graph(const char* reason = nullptr) NOT_CDS_JAVA_HEAP_RETURN;
static bool is_loading_full_module_graph() NOT_CDS_JAVA_HEAP_RETURN_(false);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16257#discussion_r1366367480
More information about the hotspot-dev
mailing list