1322 assert(DumpSharedSpaces, "this function is only used with -Xshare:dump"); |
1322 assert(DumpSharedSpaces, "this function is only used with -Xshare:dump"); |
1323 const char* unsupported_properties[] = { "jdk.module.main", |
1323 const char* unsupported_properties[] = { "jdk.module.main", |
1324 "jdk.module.limitmods", |
1324 "jdk.module.limitmods", |
1325 "jdk.module.path", |
1325 "jdk.module.path", |
1326 "jdk.module.upgrade.path", |
1326 "jdk.module.upgrade.path", |
1327 "jdk.module.addmods.0" }; |
1327 "jdk.module.addmods.0", |
1328 const char* unsupported_options[] = { "-m", |
1328 "jdk.module.patch.0" }; |
1329 "--limit-modules", |
1329 const char* unsupported_options[] = { "-m", // cannot use at dump time |
1330 "--module-path", |
1330 "--limit-modules", // cannot use at dump time |
1331 "--upgrade-module-path", |
1331 "--module-path", // ignored at dump time |
1332 "--add-modules" }; |
1332 "--upgrade-module-path", // ignored at dump time |
|
1333 "--add-modules", // ignored at dump time |
|
1334 "--patch-module" // ignored at dump time |
|
1335 }; |
1333 assert(ARRAY_SIZE(unsupported_properties) == ARRAY_SIZE(unsupported_options), "must be"); |
1336 assert(ARRAY_SIZE(unsupported_properties) == ARRAY_SIZE(unsupported_options), "must be"); |
1334 // If a vm option is found in the unsupported_options array with index less than the warning_idx, |
1337 // If a vm option is found in the unsupported_options array with index less than the warning_idx, |
1335 // vm will exit with an error message. Otherwise, it will result in a warning message. |
1338 // vm will exit with an error message. Otherwise, it will result in a warning message. |
1336 uint warning_idx = 2; |
1339 uint warning_idx = 2; |
1337 SystemProperty* sp = system_properties(); |
1340 SystemProperty* sp = system_properties(); |
1418 } |
1421 } |
1419 break; |
1422 break; |
1420 } |
1423 } |
1421 } |
1424 } |
1422 |
1425 |
1423 #if defined(COMPILER2) || INCLUDE_JVMCI || defined(_LP64) || !INCLUDE_CDS |
|
1424 // Conflict: required to use shared spaces (-Xshare:on), but |
1426 // Conflict: required to use shared spaces (-Xshare:on), but |
1425 // incompatible command line options were chosen. |
1427 // incompatible command line options were chosen. |
1426 |
|
1427 static void no_shared_spaces(const char* message) { |
1428 static void no_shared_spaces(const char* message) { |
1428 if (RequireSharedSpaces) { |
1429 if (RequireSharedSpaces) { |
1429 jio_fprintf(defaultStream::error_stream(), |
1430 jio_fprintf(defaultStream::error_stream(), |
1430 "Class data sharing is inconsistent with other specified options.\n"); |
1431 "Class data sharing is inconsistent with other specified options.\n"); |
1431 vm_exit_during_initialization("Unable to use shared archive.", message); |
1432 vm_exit_during_initialization("Unable to use shared archive.", message); |
1432 } else { |
1433 } else { |
1433 FLAG_SET_DEFAULT(UseSharedSpaces, false); |
1434 FLAG_SET_DEFAULT(UseSharedSpaces, false); |
1434 } |
1435 } |
1435 } |
1436 } |
1436 #endif |
|
1437 |
1437 |
1438 // Returns threshold scaled with the value of scale. |
1438 // Returns threshold scaled with the value of scale. |
1439 // If scale < 0.0, threshold is returned without scaling. |
1439 // If scale < 0.0, threshold is returned without scaling. |
1440 intx Arguments::scaled_compile_threshold(intx threshold, double scale) { |
1440 intx Arguments::scaled_compile_threshold(intx threshold, double scale) { |
1441 if (scale == 1.0 || scale < 0.0) { |
1441 if (scale == 1.0 || scale < 0.0) { |
2680 result = finalize_vm_init_args(); |
2680 result = finalize_vm_init_args(); |
2681 if (result != JNI_OK) { |
2681 if (result != JNI_OK) { |
2682 return result; |
2682 return result; |
2683 } |
2683 } |
2684 |
2684 |
|
2685 #if INCLUDE_CDS |
|
2686 if (UseSharedSpaces && patch_mod_javabase) { |
|
2687 no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched."); |
|
2688 } |
|
2689 #endif |
|
2690 |
2685 return JNI_OK; |
2691 return JNI_OK; |
2686 } |
2692 } |
2687 |
2693 |
2688 // Checks if name in command-line argument -agent{lib,path}:name[=options] |
2694 // Checks if name in command-line argument -agent{lib,path}:name[=options] |
2689 // represents a valid JDWP agent. is_path==true denotes that we |
2695 // represents a valid JDWP agent. is_path==true denotes that we |