*** 2083,10 *** --- 2083,20 --- FLAG_SET_CMDLINE(StackReservedPages, 0); warning("Reserved Stack Area not supported on this platform"); } #endif + if (AMD64_ONLY(false &&) AARCH64_ONLY(false &&) !FLAG_IS_DEFAULT(InlineTypePassFieldsAsArgs)) { + FLAG_SET_CMDLINE(InlineTypePassFieldsAsArgs, false); + warning("InlineTypePassFieldsAsArgs is not supported on this platform"); + } + + if (AMD64_ONLY(false &&) AARCH64_ONLY(false &&) !FLAG_IS_DEFAULT(InlineTypeReturnedAsFields)) { + FLAG_SET_CMDLINE(InlineTypeReturnedAsFields, false); + warning("InlineTypeReturnedAsFields is not supported on this platform"); + } + #if !defined(X86) && !defined(AARCH64) && !defined(PPC64) if (UseHeavyMonitors) { jio_fprintf(defaultStream::error_stream(), "UseHeavyMonitors is not fully implemented on this architecture"); return false;
*** 3040,10 *** --- 3050,28 --- } else if (is_bad_option(option, args->ignoreUnrecognized)) { return JNI_ERR; } } + if (EnableValhalla) { + // create_property("valhalla.enableValhalla", "true", InternalProperty) + const char* prop_name = "valhalla.enableValhalla"; + const char* prop_value = "true"; + const size_t prop_len = strlen(prop_name) + strlen(prop_value) + 2; + char* property = AllocateHeap(prop_len, mtArguments); + int ret = jio_snprintf(property, prop_len, "%s=%s", prop_name, prop_value); + if (ret < 0 || ret >= (int)prop_len) { + FreeHeap(property); + return JNI_ENOMEM; + } + bool added = add_property(property, UnwriteableProperty, InternalProperty); + FreeHeap(property); + if (!added) { + return JNI_ENOMEM; + } + } + // PrintSharedArchiveAndExit will turn on // -Xshare:on // -Xlog:class+path=info if (PrintSharedArchiveAndExit) { UseSharedSpaces = true;
*** 4184,10 *** --- 4212,17 --- // verification is not as if both were enabled. if (BytecodeVerificationLocal && !BytecodeVerificationRemote) { log_info(verification)("Turning on remote verification because local verification is on"); FLAG_SET_DEFAULT(BytecodeVerificationRemote, true); } + if (!EnableValhalla || (is_interpreter_only() && !is_dumping_archive() && !UseSharedSpaces)) { + // Disable calling convention optimizations if inline types are not supported. + // Also these aren't useful in -Xint. However, don't disable them when dumping or using + // the CDS archive, as the values must match between dumptime and runtime. + InlineTypePassFieldsAsArgs = false; + InlineTypeReturnedAsFields = false; + } #ifndef PRODUCT if (!LogVMOutput && FLAG_IS_DEFAULT(LogVMOutput)) { if (use_vm_log()) { LogVMOutput = true;