8163581: Heap Parameters in HSDB cannot handle G1CollectedHeap
Reviewed-by: dholmes, sjohanss
--- a/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java Thu Aug 25 13:48:42 2016 +0000
+++ b/hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java Thu Aug 25 12:24:05 2016 +0900
@@ -24,6 +24,7 @@
package sun.jvm.hotspot.gc.g1;
+import java.io.PrintStream;
import java.util.Iterator;
import java.util.Observable;
import java.util.Observer;
@@ -125,6 +126,15 @@
return CollectedHeapName.G1_COLLECTED_HEAP;
}
+ @Override
+ public void printOn(PrintStream tty) {
+ MemRegion mr = reservedRegion();
+
+ tty.print("garbage-first heap");
+ tty.print(" [" + mr.start() + ", " + mr.end() + "]");
+ tty.println(" region size " + (HeapRegion.grainBytes() / 1024) + "K");
+ }
+
public G1CollectedHeap(Address addr) {
super(addr);
}