changeset 282:44aea0a1e099

Merge
author swamyv
date Fri, 15 Aug 2008 12:05:41 -0700
parents a2de7dfbfcf0 (diff) 7f9b895777f8 (current diff)
children 92e12124e774 70c4fb9cf899
files
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/agent/src/share/classes/sun/jvm/hotspot/tools/HeapSummary.java	Fri Aug 15 05:55:22 2008 +0200
+++ b/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) {