1.1 --- a/src/share/vm/runtime/arguments.cpp Wed Feb 13 08:42:03 2013 -0800 1.2 +++ b/src/share/vm/runtime/arguments.cpp Thu Feb 14 11:01:05 2013 +0100 1.3 @@ -1257,7 +1257,7 @@ 1.4 // prefer minuscule survivor spaces so as not to waste 1.5 // space for (non-existent) survivors 1.6 if (FLAG_IS_DEFAULT(SurvivorRatio) && MaxTenuringThreshold == 0) { 1.7 - FLAG_SET_ERGO(intx, SurvivorRatio, MAX2((intx)1024, SurvivorRatio)); 1.8 + FLAG_SET_ERGO(uintx, SurvivorRatio, MAX2((uintx)1024, SurvivorRatio)); 1.9 } 1.10 // If OldPLABSize is set and CMSParPromoteBlocksToClaim is not, 1.11 // set CMSParPromoteBlocksToClaim equal to OldPLABSize. 1.12 @@ -1897,6 +1897,24 @@ 1.13 // Keeping the heap 100% free is hard ;-) so limit it to 99%. 1.14 MinHeapFreeRatio = MIN2(MinHeapFreeRatio, (uintx) 99); 1.15 1.16 + // Min/MaxMetaspaceFreeRatio 1.17 + status = status && verify_percentage(MinMetaspaceFreeRatio, "MinMetaspaceFreeRatio"); 1.18 + status = status && verify_percentage(MaxMetaspaceFreeRatio, "MaxMetaspaceFreeRatio"); 1.19 + 1.20 + if (MinMetaspaceFreeRatio > MaxMetaspaceFreeRatio) { 1.21 + jio_fprintf(defaultStream::error_stream(), 1.22 + "MinMetaspaceFreeRatio (%s" UINTX_FORMAT ") must be less than or " 1.23 + "equal to MaxMetaspaceFreeRatio (%s" UINTX_FORMAT ")\n", 1.24 + FLAG_IS_DEFAULT(MinMetaspaceFreeRatio) ? "Default: " : "", 1.25 + MinMetaspaceFreeRatio, 1.26 + FLAG_IS_DEFAULT(MaxMetaspaceFreeRatio) ? "Default: " : "", 1.27 + MaxMetaspaceFreeRatio); 1.28 + status = false; 1.29 + } 1.30 + 1.31 + // Trying to keep 100% free is not practical 1.32 + MinMetaspaceFreeRatio = MIN2(MinMetaspaceFreeRatio, (uintx) 99); 1.33 + 1.34 if (FullGCALot && FLAG_IS_DEFAULT(MarkSweepAlwaysCompactCount)) { 1.35 MarkSweepAlwaysCompactCount = 1; // Move objects every gc. 1.36 } 1.37 @@ -1904,7 +1922,7 @@ 1.38 if (UseParallelOldGC && ParallelOldGCSplitALot) { 1.39 // Settings to encourage splitting. 1.40 if (!FLAG_IS_CMDLINE(NewRatio)) { 1.41 - FLAG_SET_CMDLINE(intx, NewRatio, 2); 1.42 + FLAG_SET_CMDLINE(uintx, NewRatio, 2); 1.43 } 1.44 if (!FLAG_IS_CMDLINE(ScavengeBeforeFullGC)) { 1.45 FLAG_SET_CMDLINE(bool, ScavengeBeforeFullGC, false);