mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
8213713: Minor issues during MetaspaceShared::initialize_runtime_shared_and_meta_spaces
1)Populate MetaspaceShared::_core_spaces_size early at mapping time; 2)Fix FileMapInfo::validate_shared_path_table to report failure properly; 3)Remove dead code in FileMapInfo::validate_shared_path_table. Reviewed-by: iklam, ccheung
This commit is contained in:
parent
d7d4bc9fdd
commit
f049167354
3 changed files with 17 additions and 6 deletions
|
@ -287,6 +287,12 @@ bool SharedClassPathEntry::validate(bool is_class_path) {
|
|||
" the shared archive file: %s", name);
|
||||
}
|
||||
}
|
||||
|
||||
if (PrintSharedArchiveAndExit && !ok) {
|
||||
// If PrintSharedArchiveAndExit is enabled, don't report failure to the
|
||||
// caller. Please see above comments for more details.
|
||||
ok = true;
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
@ -479,16 +485,17 @@ bool FileMapInfo::validate_shared_path_table() {
|
|||
if (i < module_paths_start_index) {
|
||||
if (shared_path(i)->validate()) {
|
||||
log_info(class, path)("ok");
|
||||
} else {
|
||||
assert(!UseSharedSpaces, "UseSharedSpaces should be disabled");
|
||||
return false;
|
||||
}
|
||||
} else if (i >= module_paths_start_index) {
|
||||
if (shared_path(i)->validate(false /* not a class path entry */)) {
|
||||
log_info(class, path)("ok");
|
||||
} else {
|
||||
assert(!UseSharedSpaces, "UseSharedSpaces should be disabled");
|
||||
return false;
|
||||
}
|
||||
} else if (!PrintSharedArchiveAndExit) {
|
||||
_validating_shared_path_table = false;
|
||||
_shared_path_table = NULL;
|
||||
_shared_path_table_size = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue