提交 39fb8857 编写于 作者: S swamyv

6718125: SA: jmap prints negative size for MaxNewHeap.

Summary: Fixed printing of negative value for MaxNewHeap.
Reviewed-by: jjh
上级 41f83f58
......@@ -193,9 +193,13 @@ public class HeapSummary extends Tool {
private static final double FACTOR = 1024*1024;
private void printValMB(String title, long value) {
double mb = value / FACTOR;
if (value < 0) {
System.out.println(alignment + title + (value >>> 20) + " MB");
} else {
double mb = value/FACTOR;
System.out.println(alignment + title + value + " (" + mb + "MB)");
}
}
private void printValue(String title, long value) {
System.out.println(alignment + title + value);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册