src/hotspot/share/runtime/arguments.cpp
changeset 58447 319173c62caa
parent 58394 b1c3d24553e0
child 58679 9c3209ff7550
child 58732 d2da05214592
equal deleted inserted replaced
58446:5c83830390ba 58447:319173c62caa
  1452 const char* unsupported_options[] = { "--limit-modules",
  1452 const char* unsupported_options[] = { "--limit-modules",
  1453                                       "--upgrade-module-path",
  1453                                       "--upgrade-module-path",
  1454                                       "--patch-module"
  1454                                       "--patch-module"
  1455                                     };
  1455                                     };
  1456 void Arguments::check_unsupported_dumping_properties() {
  1456 void Arguments::check_unsupported_dumping_properties() {
  1457   assert(DumpSharedSpaces || DynamicDumpSharedSpaces,
  1457   assert(is_dumping_archive(),
  1458          "this function is only used with CDS dump time");
  1458          "this function is only used with CDS dump time");
  1459   assert(ARRAY_SIZE(unsupported_properties) == ARRAY_SIZE(unsupported_options), "must be");
  1459   assert(ARRAY_SIZE(unsupported_properties) == ARRAY_SIZE(unsupported_options), "must be");
  1460   // If a vm option is found in the unsupported_options array, vm will exit with an error message.
  1460   // If a vm option is found in the unsupported_options array, vm will exit with an error message.
  1461   SystemProperty* sp = system_properties();
  1461   SystemProperty* sp = system_properties();
  1462   while (sp != NULL) {
  1462   while (sp != NULL) {
  3535   }
  3535   }
  3536   if (SharedArchiveFile == NULL) {
  3536   if (SharedArchiveFile == NULL) {
  3537     SharedArchivePath = get_default_shared_archive_path();
  3537     SharedArchivePath = get_default_shared_archive_path();
  3538   } else {
  3538   } else {
  3539     int archives = num_archives(SharedArchiveFile);
  3539     int archives = num_archives(SharedArchiveFile);
  3540     if (DynamicDumpSharedSpaces || DumpSharedSpaces) {
  3540     if (is_dumping_archive()) {
  3541       if (archives > 1) {
  3541       if (archives > 1) {
  3542         vm_exit_during_initialization(
  3542         vm_exit_during_initialization(
  3543           "Cannot have more than 1 archive file specified in -XX:SharedArchiveFile during CDS dumping");
  3543           "Cannot have more than 1 archive file specified in -XX:SharedArchiveFile during CDS dumping");
  3544       }
  3544       }
  3545       if (DynamicDumpSharedSpaces) {
  3545       if (DynamicDumpSharedSpaces) {
  3548             "Cannot have the same archive file specified for -XX:SharedArchiveFile and -XX:ArchiveClassesAtExit",
  3548             "Cannot have the same archive file specified for -XX:SharedArchiveFile and -XX:ArchiveClassesAtExit",
  3549             SharedArchiveFile);
  3549             SharedArchiveFile);
  3550         }
  3550         }
  3551       }
  3551       }
  3552     }
  3552     }
  3553     if (!DynamicDumpSharedSpaces && !DumpSharedSpaces){
  3553     if (!is_dumping_archive()){
  3554       if (archives > 2) {
  3554       if (archives > 2) {
  3555         vm_exit_during_initialization(
  3555         vm_exit_during_initialization(
  3556           "Cannot have more than 2 archive files specified in the -XX:SharedArchiveFile option");
  3556           "Cannot have more than 2 archive files specified in the -XX:SharedArchiveFile option");
  3557       }
  3557       }
  3558       if (archives == 1) {
  3558       if (archives == 1) {