Merge
authorswamyv
Fri, 15 Aug 2008 12:05:41 -0700
changeset 990 02bac3e9892a
parent 989 04e4dadeec8a (diff)
parent 988 62dac36a7ebd (current diff)
child 992 494cf8c1a5ed
child 996 7565d0510bb6
Merge
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java	Fri Aug 15 05:55:22 2008 +0200
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java	Fri Aug 15 12:05:41 2008 -0700
@@ -193,8 +193,12 @@
 
    private static final double FACTOR = 1024*1024;
    private void printValMB(String title, long value) {
-      double mb = value / FACTOR;
-      System.out.println(alignment + title + value + " (" + mb + "MB)");
+      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) {