8231606: _method_ordering is not set during CDS dynamic dump time

Add the missing DynamicDumpSharedSpaces check in sort_methods(); replace the (DumpSharedSpaces || DynamicDumpSharedSpaces) with the Arguments::is_dumping_archive() function call.

Reviewed-by: iklam, coleenp, jiangli
This commit is contained in:
Calvin Cheung 2019-10-02 16:55:08 -07:00
parent 72c2079fd0
commit b08a8c5cc3
24 changed files with 73 additions and 54 deletions

View file

@ -1454,7 +1454,7 @@ const char* unsupported_options[] = { "--limit-modules",
"--patch-module"
};
void Arguments::check_unsupported_dumping_properties() {
assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
assert(is_dumping_archive(),
"this function is only used with CDS dump time");
assert(ARRAY_SIZE(unsupported_properties) == ARRAY_SIZE(unsupported_options), "must be");
// If a vm option is found in the unsupported_options array, vm will exit with an error message.
@ -3537,7 +3537,7 @@ bool Arguments::init_shared_archive_paths() {
SharedArchivePath = get_default_shared_archive_path();
} else {
int archives = num_archives(SharedArchiveFile);
if (DynamicDumpSharedSpaces || DumpSharedSpaces) {
if (is_dumping_archive()) {
if (archives > 1) {
vm_exit_during_initialization(
"Cannot have more than 1 archive file specified in -XX:SharedArchiveFile during CDS dumping");
@ -3550,7 +3550,7 @@ bool Arguments::init_shared_archive_paths() {
}
}
}
if (!DynamicDumpSharedSpaces && !DumpSharedSpaces){
if (!is_dumping_archive()){
if (archives > 2) {
vm_exit_during_initialization(
"Cannot have more than 2 archive files specified in the -XX:SharedArchiveFile option");