changeset 11880:22c1219edf6f

8163581: Heap Parameters in HSDB cannot handle G1CollectedHeap Reviewed-by: dholmes, sjohanss
author ysuenaga
date Thu, 25 Aug 2016 12:24:05 +0900
parents 12f7e6595b9f
children b50061da090e 2cbbeaf227c1
files src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java	Thu Aug 25 13:48:42 2016 +0000
+++ b/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);
     }