Tue, 12 Aug 2008 12:44:22 -0700
6718125: SA: jmap prints negative size for MaxNewHeap.
Summary: Fixed printing of negative value for MaxNewHeap.
Reviewed-by: jjh
agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java | file | annotate | diff | comparison | revisions |
1.1 --- a/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Sun Aug 10 21:58:54 2008 -0700 1.2 +++ b/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java Tue Aug 12 12:44:22 2008 -0700 1.3 @@ -193,8 +193,12 @@ 1.4 1.5 private static final double FACTOR = 1024*1024; 1.6 private void printValMB(String title, long value) { 1.7 - double mb = value / FACTOR; 1.8 - System.out.println(alignment + title + value + " (" + mb + "MB)"); 1.9 + if (value < 0) { 1.10 + System.out.println(alignment + title + (value >>> 20) + " MB"); 1.11 + } else { 1.12 + double mb = value/FACTOR; 1.13 + System.out.println(alignment + title + value + " (" + mb + "MB)"); 1.14 + } 1.15 } 1.16 1.17 private void printValue(String title, long value) {