src/hotspot/share/runtime/arguments.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
open Cdiff src/hotspot/share/runtime/arguments.cpp
src/hotspot/share/runtime/arguments.cpp
Print this page
*** 380,389 ****
--- 380,390 ----
{ "AssumeMP", JDK_Version::jdk(10),JDK_Version::undefined(), JDK_Version::undefined() },
{ "MonitorInUseLists", JDK_Version::jdk(10),JDK_Version::undefined(), JDK_Version::undefined() },
{ "MaxRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "MinRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
{ "InitialRAMFraction", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
+ { "UseCGroupMemoryLimitForHeap", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::jdk(11) },
// --- Deprecated alias flags (see also aliased_jvm_flags) - sorted by obsolete_in then expired_in:
{ "DefaultMaxRAMFraction", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
{ "CreateMinidumpOnCrash", JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::undefined() },
{ "MustCallLoadClassInternal", JDK_Version::jdk(10), JDK_Version::undefined(), JDK_Version::undefined() },
*** 2678,2687 ****
--- 2679,2696 ----
result = parse_each_vm_init_arg(java_options_args, &patch_mod_javabase, Flag::ENVIRON_VAR);
if (result != JNI_OK) {
return result;
}
+ // We need to ensure processor and memory resources have been properly
+ // configured - which may rely on arguments we just processed - before
+ // doing the final argument processing. Any argument processing that
+ // needs to know about processor and memory resources must occur after
+ // this point.
+
+ os::init_container_support();
+
// Do final processing now that all arguments have been parsed
result = finalize_vm_init_args(patch_mod_javabase);
if (result != JNI_OK) {
return result;
}
*** 3353,3368 ****
_vfprintf_hook = CAST_TO_FN_PTR(vfprintf_hook_t, option->extraInfo);
} else if (match_option(option, "exit")) {
_exit_hook = CAST_TO_FN_PTR(exit_hook_t, option->extraInfo);
} else if (match_option(option, "abort")) {
_abort_hook = CAST_TO_FN_PTR(abort_hook_t, option->extraInfo);
- // -XX:+AggressiveHeap
- } else if (match_option(option, "-XX:+AggressiveHeap")) {
- jint result = set_aggressive_heap_flags();
- if (result != JNI_OK) {
- return result;
- }
// Need to keep consistency of MaxTenuringThreshold and AlwaysTenure/NeverTenure;
// and the last option wins.
} else if (match_option(option, "-XX:+NeverTenure")) {
if (FLAG_SET_CMDLINE(bool, NeverTenure, true) != Flag::SUCCESS) {
return JNI_EINVAL;
--- 3362,3371 ----
*** 3640,3649 ****
--- 3643,3662 ----
"Use -classpath instead.\n.");
os::closedir(dir);
return JNI_ERR;
}
+ // This must be done after all arguments have been processed
+ // and the container support has been initialized since AggressiveHeap
+ // relies on the amount of total memory available.
+ if (AggressiveHeap) {
+ jint result = set_aggressive_heap_flags();
+ if (result != JNI_OK) {
+ return result;
+ }
+ }
+
// This must be done after all arguments have been processed.
// java_compiler() true means set to "NONE" or empty.
if (java_compiler() && !xdebug_mode()) {
// For backwards compatibility, we switch to interpreted mode if
// -Djava.compiler="NONE" or "" is specified AND "-Xdebug" was
src/hotspot/share/runtime/arguments.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File