--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegion.java Mon Mar 19 14:20:28 2018 -0500
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegion.java Tue Mar 20 11:24:32 2018 +0530
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,6 +24,7 @@
package sun.jvm.hotspot.gc.g1;
+import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Observable;
@@ -124,4 +125,9 @@
public static long getPointerSize() {
return pointerSize;
}
+
+ public void printOn(PrintStream tty) {
+ tty.print("Region: " + bottom() + "," + top() + "," + end());
+ tty.println(":" + type.typeAnnotation());
+ }
}