@@ -194,7 +194,7 @@ void FileMapHeader::populate(FileMapInfo *info, size_t core_region_alignment,
194
194
set_base_archive_name_offset ((unsigned int )base_archive_name_offset);
195
195
set_base_archive_name_size ((unsigned int )base_archive_name_size);
196
196
set_common_app_classpath_prefix_size ((unsigned int )common_app_classpath_prefix_size);
197
- set_magic (DynamicDumpSharedSpaces ? CDS_DYNAMIC_ARCHIVE_MAGIC : CDS_ARCHIVE_MAGIC);
197
+ set_magic (CDSConfig::is_dumping_dynamic_archive () ? CDS_DYNAMIC_ARCHIVE_MAGIC : CDS_ARCHIVE_MAGIC);
198
198
set_version (CURRENT_CDS_ARCHIVE_VERSION);
199
199
200
200
if (!info->is_static () && base_archive_name_size != 0 ) {
@@ -235,7 +235,7 @@ void FileMapHeader::populate(FileMapInfo *info, size_t core_region_alignment,
235
235
_mapped_base_address = (char *)SharedBaseAddress;
236
236
_allow_archiving_with_java_agent = AllowArchivingWithJavaAgent;
237
237
238
- if (!DynamicDumpSharedSpaces ) {
238
+ if (!CDSConfig::is_dumping_dynamic_archive () ) {
239
239
set_shared_path_table (info->_shared_path_table );
240
240
}
241
241
}
@@ -932,7 +932,7 @@ bool FileMapInfo::validate_shared_path_table() {
932
932
933
933
// Load the shared path table info from the archive header
934
934
_shared_path_table = header ()->shared_path_table ();
935
- if (DynamicDumpSharedSpaces ) {
935
+ if (CDSConfig::is_dumping_dynamic_archive () ) {
936
936
// Only support dynamic dumping with the usage of the default CDS archive
937
937
// or a simple base archive.
938
938
// If the base layer archive contains additional path component besides
@@ -942,13 +942,13 @@ bool FileMapInfo::validate_shared_path_table() {
942
942
// to include the application path and stored in the top layer archive.
943
943
assert (shared_path (0 )->is_modules_image (), " first shared_path must be the modules image" );
944
944
if (header ()->app_class_paths_start_index () > 1 ) {
945
- DynamicDumpSharedSpaces = false ;
945
+ CDSConfig::disable_dumping_dynamic_archive () ;
946
946
log_warning (cds)(
947
947
" Dynamic archiving is disabled because base layer archive has appended boot classpath" );
948
948
}
949
949
if (header ()->num_module_paths () > 0 ) {
950
950
if (!check_module_paths ()) {
951
- DynamicDumpSharedSpaces = false ;
951
+ CDSConfig::disable_dumping_dynamic_archive () ;
952
952
log_warning (cds)(
953
953
" Dynamic archiving is disabled because base layer archive has a different module path" );
954
954
}
@@ -1523,7 +1523,7 @@ void FileMapInfo::write_region(int region, char* base, size_t size,
1523
1523
} else if (HeapShared::is_heap_region (region)) {
1524
1524
assert (HeapShared::can_write (), " sanity" );
1525
1525
#if INCLUDE_CDS_JAVA_HEAP
1526
- assert (!DynamicDumpSharedSpaces , " must be" );
1526
+ assert (!CDSConfig::is_dumping_dynamic_archive () , " must be" );
1527
1527
requested_base = (char *)ArchiveHeapWriter::requested_address ();
1528
1528
if (UseCompressedOops) {
1529
1529
mapping_offset = (size_t )((address)requested_base - CompressedOops::base ());
@@ -2272,7 +2272,7 @@ bool FileMapInfo::initialize() {
2272
2272
} else {
2273
2273
log_info (cds)(" Initialize dynamic archive failed." );
2274
2274
if (AutoCreateSharedArchive) {
2275
- DynamicDumpSharedSpaces = true ;
2275
+ CDSConfig::enable_dumping_dynamic_archive () ;
2276
2276
ArchiveClassesAtExit = Arguments::GetSharedDynamicArchivePath ();
2277
2277
}
2278
2278
return false ;
0 commit comments