< prev index next >
src/hotspot/share/runtime/arguments.cpp
Print this page
@@ -2049,10 +2049,47 @@
}
}
status = status && GCArguments::check_args_consistency();
+ if (LP64_ONLY(false &&) !FLAG_IS_DEFAULT(ValueTypePassFieldsAsArgs)) {
+ FLAG_SET_CMDLINE(bool, ValueTypePassFieldsAsArgs, false);
+ warning("ValueTypePassFieldsAsArgs is not supported on this platform");
+ }
+
+ if (LP64_ONLY(false &&) !FLAG_IS_DEFAULT(ValueTypeReturnedAsFields)) {
+ FLAG_SET_CMDLINE(bool, ValueTypeReturnedAsFields, false);
+ warning("ValueTypeReturnedAsFields is not supported on this platform");
+ }
+
+ if (EnableValhalla) {
+ if (!EnableValhallaC1) {
+ // C1 support for value types is incomplete. Don't use it by default.
+ if (!FLAG_IS_DEFAULT(TieredCompilation)) {
+ warning("TieredCompilation disabled because value types are not supported by C1");
+ }
+ FLAG_SET_CMDLINE(bool, TieredCompilation, false);
+ } else {
+ if (TieredStopAtLevel > 1) {
+ warning("C1 doesn't work with C2 yet. Forcing TieredStopAtLevel=1");
+ FLAG_SET_CMDLINE(intx, TieredStopAtLevel, 1);
+ }
+ if (ValueTypePassFieldsAsArgs) {
+ warning("C1 doesn't work with ValueTypePassFieldsAsArgs yet. Forcing ValueTypePassFieldsAsArgs=false");
+ FLAG_SET_CMDLINE(bool, ValueTypePassFieldsAsArgs, false);
+ }
+ if (ValueTypeReturnedAsFields) {
+ warning("C1 doesn't work with ValueTypeReturnedAsFields yet. Forcing ValueTypeReturnedAsFields=false");
+ FLAG_SET_CMDLINE(bool, ValueTypeReturnedAsFields, false);
+ }
+ }
+ } else {
+ FLAG_SET_CMDLINE(bool, ValueArrayFlatten, false);
+ }
+ if (!EnableValhalla && ACmpOnValues != 3) {
+ FLAG_SET_CMDLINE(uint, ACmpOnValues, 0);
+ }
return status;
}
bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
const char* option_type) {
@@ -2925,10 +2962,16 @@
} else if (is_bad_option(option, args->ignoreUnrecognized)) {
return JNI_ERR;
}
}
+ if (EnableValhalla) {
+ if (!create_property("valhalla.enableValhalla", "true", InternalProperty)) {
+ return JNI_ENOMEM;
+ }
+ }
+
// PrintSharedArchiveAndExit will turn on
// -Xshare:on
// -Xlog:class+path=info
if (PrintSharedArchiveAndExit) {
if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != JVMFlag::SUCCESS) {
@@ -3915,10 +3958,16 @@
if (FLAG_IS_CMDLINE(CompressedClassSpaceSize) && !UseCompressedClassPointers) {
warning("Setting CompressedClassSpaceSize has no effect when compressed class pointers are not used");
}
+ if (!EnableValhalla || is_interpreter_only()) {
+ // Disable calling convention optimizations if value types are not supported
+ ValueTypePassFieldsAsArgs = false;
+ ValueTypeReturnedAsFields = false;
+ }
+
#ifndef PRODUCT
if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) {
if (use_vm_log()) {
LogVMOutput = true;
}
< prev index next >