@@ -239,7 +239,7 @@ void ArchiveBuilder::gather_klasses_and_symbols() {
239
239
#endif
240
240
doit.finish ();
241
241
242
- if (DumpSharedSpaces ) {
242
+ if (CDSConfig::is_dumping_static_archive () ) {
243
243
// To ensure deterministic contents in the static archive, we need to ensure that
244
244
// we iterate the MetaspaceObjs in a deterministic order. It doesn't matter where
245
245
// the MetaspaceObjs are located originally, as they are copied sequentially into
@@ -339,7 +339,7 @@ address ArchiveBuilder::reserve_buffer() {
339
339
// The bottom of the archive (that I am writing now) should be mapped at this address by default.
340
340
address my_archive_requested_bottom;
341
341
342
- if (DumpSharedSpaces ) {
342
+ if (CDSConfig::is_dumping_static_archive () ) {
343
343
my_archive_requested_bottom = _requested_static_archive_bottom;
344
344
} else {
345
345
_mapped_static_archive_bottom = (address)MetaspaceObj::shared_metaspace_base ();
@@ -367,7 +367,7 @@ address ArchiveBuilder::reserve_buffer() {
367
367
MetaspaceShared::unrecoverable_writing_error ();
368
368
}
369
369
370
- if (DumpSharedSpaces ) {
370
+ if (CDSConfig::is_dumping_static_archive () ) {
371
371
// We don't want any valid object to be at the very bottom of the archive.
372
372
// See ArchivePtrMarker::mark_pointer().
373
373
rw_region ()->allocate (16 );
@@ -642,7 +642,7 @@ void ArchiveBuilder::make_shallow_copy(DumpRegion *dump_region, SourceObjInfo* s
642
642
memcpy (dest, src, bytes);
643
643
644
644
// Update the hash of buffered sorted symbols for static dump so that the symbols have deterministic contents
645
- if (DumpSharedSpaces && (src_info->msotype () == MetaspaceObj::SymbolType)) {
645
+ if (CDSConfig::is_dumping_static_archive () && (src_info->msotype () == MetaspaceObj::SymbolType)) {
646
646
Symbol* buffered_symbol = (Symbol*)dest;
647
647
assert (((Symbol*)src)->is_permanent (), " archived symbols must be permanent" );
648
648
buffered_symbol->update_identity_hash ();
@@ -825,7 +825,7 @@ uintx ArchiveBuilder::any_to_offset(address p) const {
825
825
826
826
#if INCLUDE_CDS_JAVA_HEAP
827
827
narrowKlass ArchiveBuilder::get_requested_narrow_klass (Klass* k) {
828
- assert (DumpSharedSpaces , " sanity" );
828
+ assert (CDSConfig::is_dumping_heap () , " sanity" );
829
829
k = get_buffered_klass (k);
830
830
Klass* requested_k = to_requested (k);
831
831
address narrow_klass_base = _requested_static_archive_bottom; // runtime encoding base == runtime mapping start
@@ -916,7 +916,7 @@ void ArchiveBuilder::relocate_to_requested() {
916
916
917
917
size_t my_archive_size = buffer_top () - buffer_bottom ();
918
918
919
- if (DumpSharedSpaces ) {
919
+ if (CDSConfig::is_dumping_static_archive () ) {
920
920
_requested_static_archive_top = _requested_static_archive_bottom + my_archive_size;
921
921
RelocateBufferToRequested<true > patcher (this );
922
922
patcher.doit ();
@@ -1238,7 +1238,7 @@ class ArchiveBuilder::CDSMapLogger : AllStatic {
1238
1238
static void log (ArchiveBuilder* builder, FileMapInfo* mapinfo,
1239
1239
ArchiveHeapInfo* heap_info,
1240
1240
char * bitmap, size_t bitmap_size_in_bytes) {
1241
- log_info (cds, map)(" %s CDS archive map for %s" , DumpSharedSpaces ? " Static" : " Dynamic" , mapinfo->full_path ());
1241
+ log_info (cds, map)(" %s CDS archive map for %s" , CDSConfig::is_dumping_static_archive () ? " Static" : " Dynamic" , mapinfo->full_path ());
1242
1242
1243
1243
address header = address (mapinfo->header ());
1244
1244
address header_end = header + mapinfo->header ()->header_size ();
0 commit comments