6718125: SA: jmap prints negative size for MaxNewHeap
Fixed printing of negative value for MaxNewHeap. Reviewed-by: jjh
This commit is contained in:
parent
6144fe8e3e
commit
14b6adc782
@ -193,8 +193,12 @@ public class HeapSummary extends Tool {
|
||||
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user