< prev index next > src/hotspot/share/runtime/arguments.cpp
Print this page
static bool patch_mod_javabase = false;
// Check the consistency of vm_init_args
bool Arguments::check_vm_args_consistency() {
// This may modify compiler flags. Must be called before CompilerConfig::check_args_consistency()
- if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line)) {
+ if (!CDSConfig::check_vm_args_consistency(patch_mod_javabase, mode_flag_cmd_line, xshare_auto_cmd_line)) {
return false;
}
// Method for adding checks for flag consistency.
// The intent is to warn the user of all possible conflicts,
if (!check_vm_args_consistency()) {
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
jint Arguments::parse_java_tool_options_environment_variable(ScopedVMInitArgs* args) {
return parse_options_environment_variable("JAVA_TOOL_OPTIONS", args);
}
+ // We return the "initial" options without calling expand_vm_options_as_needed(). The intention is
+ // that the options will be passed verbatim to the child process that assembles the AOT
+ // cache (inside JAVA_TOOL_OPTIONS). The child process will do the expansion when processing
+ // JAVA_TOOL_OPTIONS.
+ jint Arguments::parse_aot_tool_options_environment_variable(GrowableArray<const char*>* options) {
+ ScopedVMInitArgs initial_args("env_var='AOT_TOOL_OPTIONS'");
+ jint code = parse_options_environment_variable("AOT_TOOL_OPTIONS", &initial_args);
+ if (code != JNI_OK) {
+ return code;
+ }
+
+ JavaVMInitArgs* args = initial_args.get();
+ for (int index = 0; index < args->nOptions; index++) {
+ const JavaVMOption *option = args->options + index;
+ const char* optionString = option->optionString;
+ char* s = NEW_RESOURCE_ARRAY(char, strlen(optionString) + 1);
+ strcpy(s, optionString);
+ options->append(s);
+ }
+
+ return JNI_OK;
+ }
+
jint Arguments::parse_options_environment_variable(const char* name,
ScopedVMInitArgs* vm_args) {
char *buffer = ::getenv(name);
// Don't check this environment variable if user has special privileges
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);
}
warning("Disabling UseProfiledLoopPredicate since UseLoopPredicate is turned off.");
FLAG_SET_ERGO(UseProfiledLoopPredicate, false);
}
#endif // COMPILER2
- if (log_is_enabled(Info, perf, class, link)) {
- if (!UsePerfData) {
- warning("Disabling -Xlog:perf+class+link since UsePerfData is turned off.");
+ 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::disable_tags(false, LOG_TAGS(perf, class, link));
assert(!log_is_enabled(Info, perf, class, link), "sanity");
}
}
+ 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 >