< prev index next > src/hotspot/share/runtime/arguments.cpp
Print this page
#include "precompiled.hpp"
#include "cds/cds_globals.hpp"
#include "cds/cdsConfig.hpp"
#include "cds/filemap.hpp"
+ #include "cds/heapShared.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/javaAssertions.hpp"
#include "classfile/moduleEntry.hpp"
#include "classfile/stringTable.hpp"
#include "classfile/symbolTable.hpp"
status = CompilerConfig::check_args_consistency(status);
#if INCLUDE_JVMCI
if (status && EnableJVMCI) {
PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
AddProperty, UnwriteableProperty, InternalProperty);
! if (ClassLoader::is_module_observable("jdk.internal.vm.ci")) {
if (!create_numbered_module_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
return false;
}
}
}
status = CompilerConfig::check_args_consistency(status);
#if INCLUDE_JVMCI
if (status && EnableJVMCI) {
PropertyList_unique_add(&_system_properties, "jdk.internal.vm.ci.enabled", "true",
AddProperty, UnwriteableProperty, InternalProperty);
! /*
+ * Ioi - 2023/05/19. There's no need for this with my patch-jdk.sh script, which adds
+ * jdk.internal.vm.ci as one of the default modules. Using -Djdk.module.addmods will
+ * cause the full module graph to be disabled and slow down performance.
+ */
+ if (!TempDisableAddJVMCIModule && ClassLoader::is_module_observable("jdk.internal.vm.ci")) {
if (!create_numbered_module_property("jdk.module.addmods", "jdk.internal.vm.ci", addmods_count++)) {
return false;
}
}
}
set_mode_flags(_comp);
mode_flag_cmd_line = true;
// -Xshare:dump
} else if (match_option(option, "-Xshare:dump")) {
CDSConfig::enable_dumping_static_archive();
+ CDSConfig::set_old_cds_flags_used();
// -Xshare:on
} else if (match_option(option, "-Xshare:on")) {
UseSharedSpaces = true;
RequireSharedSpaces = true;
+ CDSConfig::set_old_cds_flags_used();
// -Xshare:auto || -XX:ArchiveClassesAtExit=<archive file>
} else if (match_option(option, "-Xshare:auto")) {
UseSharedSpaces = true;
RequireSharedSpaces = false;
xshare_auto_cmd_line = true;
+ CDSConfig::set_old_cds_flags_used();
// -Xshare:off
} else if (match_option(option, "-Xshare:off")) {
UseSharedSpaces = false;
RequireSharedSpaces = false;
+ CDSConfig::set_old_cds_flags_used();
// -Xverify
} else if (match_option(option, "-Xverify", &tail)) {
if (strcmp(tail, ":all") == 0 || strcmp(tail, "") == 0) {
if (FLAG_SET_CMDLINE(BytecodeVerificationLocal, true) != JVMFlag::SUCCESS) {
return JNI_EINVAL;
if (!check_vm_args_consistency()) {
return JNI_ERR;
}
! if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line)) {
return JNI_ERR;
}
#ifndef CAN_SHOW_REGISTERS_ON_ASSERT
UNSUPPORTED_OPTION(ShowRegistersOnAssert);
#endif // CAN_SHOW_REGISTERS_ON_ASSERT
return JNI_OK;
if (!check_vm_args_consistency()) {
return JNI_ERR;
}
! if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line, xshare_auto_cmd_line)) {
return JNI_ERR;
}
+ if (StoreCachedCode) {
+ FLAG_SET_ERGO_IF_DEFAULT(CachedCodeMaxSize, 512*M);
+ }
+
#ifndef CAN_SHOW_REGISTERS_ON_ASSERT
UNSUPPORTED_OPTION(ShowRegistersOnAssert);
#endif // CAN_SHOW_REGISTERS_ON_ASSERT
return JNI_OK;
FLAG_SET_DEFAULT(UseSecondarySupersTable, VM_Version::supports_secondary_supers_table());
} else if (UseSecondarySupersTable && !VM_Version::supports_secondary_supers_table()) {
warning("UseSecondarySupersTable is not supported");
FLAG_SET_DEFAULT(UseSecondarySupersTable, false);
}
+ UseSecondarySupersTable = false; // FIXME: Disabled for Leyden. Neet to fix SCAddressTable::id_for_address()
if (!UseSecondarySupersTable) {
FLAG_SET_DEFAULT(StressSecondarySupers, false);
FLAG_SET_DEFAULT(VerifySecondarySupers, false);
}
}
FLAG_SET_DEFAULT(UseVectorStubs, false);
}
#endif // COMPILER2_OR_JVMCI
! if (log_is_enabled(Info, perf, class, link)) {
! if (!UsePerfData) {
! warning("Disabling -Xlog:perf+class+link since UsePerfData is turned off.");
LogConfiguration::configure_stdout(LogLevel::Off, false, LOG_TAGS(perf, class, link));
}
}
if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
}
}
FLAG_SET_DEFAULT(UseVectorStubs, false);
}
#endif // COMPILER2_OR_JVMCI
! if (log_is_enabled(Info, init)) {
! if (FLAG_IS_DEFAULT(ProfileVMLocks)) {
! FLAG_SET_DEFAULT(ProfileVMLocks, true);
+ }
+ if (UsePerfData && !log_is_enabled(Info, perf, class, link)) {
+ // automatically enable -Xlog:perf+class+link
+ LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(perf, class, link));
+ }
+ // Don't turn on ProfileVMCalls and ProfileRuntimeCalls by default.
+ } else {
+ if (!FLAG_IS_DEFAULT(ProfileVMLocks) && ProfileVMLocks) {
+ warning("Disabling ProfileVMLocks since logging is turned off.");
+ FLAG_SET_DEFAULT(ProfileVMLocks, false);
+ }
+ if (!FLAG_IS_DEFAULT(ProfileVMCalls) && ProfileVMCalls) {
+ warning("Disabling ProfileVMCalls since logging is turned off.");
+ FLAG_SET_DEFAULT(ProfileVMCalls, false);
+ }
+ if (!FLAG_IS_DEFAULT(ProfileRuntimeCalls) && ProfileRuntimeCalls) {
+ warning("Disabling ProfileRuntimeCalls since logging is turned off.");
+ FLAG_SET_DEFAULT(ProfileRuntimeCalls, false);
+ }
+ if (log_is_enabled(Info, perf, class, link)) {
+ warning("Disabling -Xlog:perf+class+link since logging is turned off.");
LogConfiguration::configure_stdout(LogLevel::Off, false, LOG_TAGS(perf, class, link));
}
}
+ if (FLAG_IS_DEFAULT(PerfDataMemorySize)) {
+ if (ProfileVMLocks || ProfileVMCalls || ProfileRuntimeCalls) {
+ FLAG_SET_DEFAULT(PerfDataMemorySize, 128*K); // reserve more space for extra perf counters
+ }
+ }
if (FLAG_IS_CMDLINE(DiagnoseSyncOnValueBasedClasses)) {
if (DiagnoseSyncOnValueBasedClasses == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, valuebasedclasses)) {
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(valuebasedclasses));
}
< prev index next >