--- a/hotspot/src/share/vm/runtime/arguments.cpp Mon Dec 19 15:21:11 2016 +0000
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Mon Dec 19 13:54:33 2016 -0500
@@ -1324,12 +1324,15 @@
"jdk.module.limitmods",
"jdk.module.path",
"jdk.module.upgrade.path",
- "jdk.module.addmods.0" };
- const char* unsupported_options[] = { "-m",
- "--limit-modules",
- "--module-path",
- "--upgrade-module-path",
- "--add-modules" };
+ "jdk.module.addmods.0",
+ "jdk.module.patch.0" };
+ const char* unsupported_options[] = { "-m", // cannot use at dump time
+ "--limit-modules", // cannot use at dump time
+ "--module-path", // ignored at dump time
+ "--upgrade-module-path", // ignored at dump time
+ "--add-modules", // ignored at dump time
+ "--patch-module" // ignored at dump time
+ };
assert(ARRAY_SIZE(unsupported_properties) == ARRAY_SIZE(unsupported_options), "must be");
// If a vm option is found in the unsupported_options array with index less than the warning_idx,
// vm will exit with an error message. Otherwise, it will result in a warning message.
@@ -1420,10 +1423,8 @@
}
}
-#if defined(COMPILER2) || INCLUDE_JVMCI || defined(_LP64) || !INCLUDE_CDS
// Conflict: required to use shared spaces (-Xshare:on), but
// incompatible command line options were chosen.
-
static void no_shared_spaces(const char* message) {
if (RequireSharedSpaces) {
jio_fprintf(defaultStream::error_stream(),
@@ -1433,7 +1434,6 @@
FLAG_SET_DEFAULT(UseSharedSpaces, false);
}
}
-#endif
// Returns threshold scaled with the value of scale.
// If scale < 0.0, threshold is returned without scaling.
@@ -2682,6 +2682,12 @@
return result;
}
+#if INCLUDE_CDS
+ if (UseSharedSpaces && patch_mod_javabase) {
+ no_shared_spaces("CDS is disabled when " JAVA_BASE_NAME " module is patched.");
+ }
+#endif
+
return JNI_OK;
}
@@ -4410,7 +4416,6 @@
}
jint Arguments::apply_ergo() {
-
// Set flags based on ergonomics.
set_ergonomics_flags();