Mercurial > hg > truffle
diff src/share/vm/runtime/arguments.cpp @ 8040:a83cd101fd62
8005452: NPG: Create new flags for Metaspace resizing policy
Reviewed-by: johnc, jwilhelm, coleenp, stefank
author | jmasa |
---|---|
date | Wed, 23 Jan 2013 19:08:04 -0800 |
parents | 9425ba04792d |
children | b8d5d7a6c94c |
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp Mon Feb 11 15:24:48 2013 -0800 +++ b/src/share/vm/runtime/arguments.cpp Wed Jan 23 19:08:04 2013 -0800 @@ -1896,6 +1896,24 @@ // Keeping the heap 100% free is hard ;-) so limit it to 99%. MinHeapFreeRatio = MIN2(MinHeapFreeRatio, (uintx) 99); + // Min/MaxMetaspaceFreeRatio + status = status && verify_percentage(MinMetaspaceFreeRatio, "MinMetaspaceFreeRatio"); + status = status && verify_percentage(MaxMetaspaceFreeRatio, "MaxMetaspaceFreeRatio"); + + if (MinMetaspaceFreeRatio > MaxMetaspaceFreeRatio) { + jio_fprintf(defaultStream::error_stream(), + "MinMetaspaceFreeRatio (%s" UINTX_FORMAT ") must be less than or " + "equal to MaxMetaspaceFreeRatio (%s" UINTX_FORMAT ")\n", + FLAG_IS_DEFAULT(MinMetaspaceFreeRatio) ? "Default: " : "", + MinMetaspaceFreeRatio, + FLAG_IS_DEFAULT(MaxMetaspaceFreeRatio) ? "Default: " : "", + MaxMetaspaceFreeRatio); + status = false; + } + + // Trying to keep 100% free is not practical + MinMetaspaceFreeRatio = MIN2(MinMetaspaceFreeRatio, (uintx) 99); + if (FullGCALot && FLAG_IS_DEFAULT(MarkSweepAlwaysCompactCount)) { MarkSweepAlwaysCompactCount = 1; // Move objects every gc. }