hotspot/src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File jdk10-hs Cdiff hotspot/src/share/vm/runtime/arguments.cpp

hotspot/src/share/vm/runtime/arguments.cpp

Print this page

        

*** 377,386 **** --- 377,389 ---- // -------------- Deprecated Flags -------------- // --- Non-alias flags - sorted by obsolete_in then expired_in: { "MaxGCMinorPauseMillis", JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() }, { "UseConcMarkSweepGC", JDK_Version::jdk(9), 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() }, // --- 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() },
*** 2067,2090 **** } else { warning("Unable to open cgroup memory limit file %s (%s)", lim_file, strerror(errno)); } } // If the maximum heap size has not been set with -Xmx, // then set it as fraction of the size of physical memory, // respecting the maximum and minimum sizes of the heap. if (FLAG_IS_DEFAULT(MaxHeapSize)) { ! julong reasonable_max = phys_mem / MaxRAMFraction; ! ! if (phys_mem <= MaxHeapSize * MinRAMFraction) { // Small physical memory, so use a minimum fraction of it for the heap ! reasonable_max = phys_mem / MinRAMFraction; } else { // Not-small physical memory, so require a heap at least // as large as MaxHeapSize reasonable_max = MAX2(reasonable_max, (julong)MaxHeapSize); } if (!FLAG_IS_DEFAULT(ErgoHeapSizeLimit) && ErgoHeapSizeLimit != 0) { // Limit the heap size to ErgoHeapSizeLimit reasonable_max = MIN2(reasonable_max, (julong)ErgoHeapSizeLimit); } if (UseCompressedOops) { --- 2070,2106 ---- } else { warning("Unable to open cgroup memory limit file %s (%s)", lim_file, strerror(errno)); } } + // Convert deprecated flags + if (FLAG_IS_DEFAULT(MaxRAMPercentage) && + !FLAG_IS_DEFAULT(MaxRAMFraction)) + MaxRAMPercentage = 100.0 / MaxRAMFraction; + + if (FLAG_IS_DEFAULT(MinRAMPercentage) && + !FLAG_IS_DEFAULT(MinRAMFraction)) + MinRAMPercentage = 100.0 / MinRAMFraction; + + if (FLAG_IS_DEFAULT(InitialRAMPercentage) && + !FLAG_IS_DEFAULT(InitialRAMFraction)) + InitialRAMPercentage = 100.0 / InitialRAMFraction; + // If the maximum heap size has not been set with -Xmx, // then set it as fraction of the size of physical memory, // respecting the maximum and minimum sizes of the heap. if (FLAG_IS_DEFAULT(MaxHeapSize)) { ! julong reasonable_max = (julong)((phys_mem * MaxRAMPercentage) / 100); ! if (phys_mem <= (julong)((MaxHeapSize * MinRAMPercentage) / 100)) { // Small physical memory, so use a minimum fraction of it for the heap ! reasonable_max = (julong)((phys_mem * MinRAMPercentage) / 100); } else { // Not-small physical memory, so require a heap at least // as large as MaxHeapSize reasonable_max = MAX2(reasonable_max, (julong)MaxHeapSize); } + if (!FLAG_IS_DEFAULT(ErgoHeapSizeLimit) && ErgoHeapSizeLimit != 0) { // Limit the heap size to ErgoHeapSizeLimit reasonable_max = MIN2(reasonable_max, (julong)ErgoHeapSizeLimit); } if (UseCompressedOops) {
*** 2133,2143 **** reasonable_minimum = MIN2(reasonable_minimum, (julong)MaxHeapSize); reasonable_minimum = limit_by_allocatable_memory(reasonable_minimum); if (InitialHeapSize == 0) { ! julong reasonable_initial = phys_mem / InitialRAMFraction; reasonable_initial = MAX3(reasonable_initial, reasonable_minimum, (julong)min_heap_size()); reasonable_initial = MIN2(reasonable_initial, (julong)MaxHeapSize); reasonable_initial = limit_by_allocatable_memory(reasonable_initial); --- 2149,2159 ---- reasonable_minimum = MIN2(reasonable_minimum, (julong)MaxHeapSize); reasonable_minimum = limit_by_allocatable_memory(reasonable_minimum); if (InitialHeapSize == 0) { ! julong reasonable_initial = (julong)((phys_mem * InitialRAMPercentage) / 100); reasonable_initial = MAX3(reasonable_initial, reasonable_minimum, (julong)min_heap_size()); reasonable_initial = MIN2(reasonable_initial, (julong)MaxHeapSize); reasonable_initial = limit_by_allocatable_memory(reasonable_initial);
hotspot/src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File