diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java index 72ec45520751f..ebee276609b4d 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1CollectedHeap.java @@ -30,7 +30,7 @@ import sun.jvm.hotspot.utilities.Observer; import sun.jvm.hotspot.debugger.Address; -import sun.jvm.hotspot.gc.g1.HeapRegionClosure; +import sun.jvm.hotspot.gc.g1.G1HeapRegionClosure; import sun.jvm.hotspot.gc.g1.PrintRegionClosure; import sun.jvm.hotspot.gc.shared.CollectedHeap; import sun.jvm.hotspot.gc.shared.CollectedHeapName; @@ -47,7 +47,7 @@ // Mirror class for G1CollectedHeap. public class G1CollectedHeap extends CollectedHeap { - // HeapRegionManager _hrm; + // G1HeapRegionManager _hrm; private static long hrmFieldOffset; // MemRegion _g1_reserved; private static long g1ReservedFieldOffset; @@ -55,9 +55,9 @@ public class G1CollectedHeap extends CollectedHeap { private static CIntegerField summaryBytesUsedField; // G1MonitoringSupport* _monitoring_support; private static AddressField monitoringSupportField; - // HeapRegionSet _old_set; + // G1HeapRegionSet _old_set; private static long oldSetFieldOffset; - // HeapRegionSet _humongous_set; + // G1HeapRegionSet _humongous_set; private static long humongousSetFieldOffset; static { @@ -90,9 +90,9 @@ public long n_regions() { return hrm().length(); } - public HeapRegionManager hrm() { + public G1HeapRegionManager hrm() { Address hrmAddr = addr.addOffsetTo(hrmFieldOffset); - return VMObjectFactory.newObject(HeapRegionManager.class, hrmAddr); + return VMObjectFactory.newObject(G1HeapRegionManager.class, hrmAddr); } public G1MonitoringSupport monitoringSupport() { @@ -100,30 +100,30 @@ public G1MonitoringSupport monitoringSupport() { return VMObjectFactory.newObject(G1MonitoringSupport.class, monitoringSupportAddr); } - public HeapRegionSetBase oldSet() { + public G1HeapRegionSetBase oldSet() { Address oldSetAddr = addr.addOffsetTo(oldSetFieldOffset); - return VMObjectFactory.newObject(HeapRegionSetBase.class, oldSetAddr); + return VMObjectFactory.newObject(G1HeapRegionSetBase.class, oldSetAddr); } - public HeapRegionSetBase humongousSet() { + public G1HeapRegionSetBase humongousSet() { Address humongousSetAddr = addr.addOffsetTo(humongousSetFieldOffset); - return VMObjectFactory.newObject(HeapRegionSetBase.class, humongousSetAddr); + return VMObjectFactory.newObject(G1HeapRegionSetBase.class, humongousSetAddr); } - private Iterator g1HeapRegionIterator() { - return hrm().g1HeapRegionIterator(); + private Iterator heapRegionIterator() { + return hrm().heapRegionIterator(); } - public void heapRegionIterate(HeapRegionClosure hrcl) { - Iterator iter = g1HeapRegionIterator(); + public void heapRegionIterate(G1HeapRegionClosure hrcl) { + Iterator iter = heapRegionIterator(); while (iter.hasNext()) { G1HeapRegion hr = iter.next(); hrcl.doHeapRegion(hr); } } - public G1HeapRegion g1HeapRegionForAddress(Address addr) { - Iterator iter = g1HeapRegionIterator(); + public G1HeapRegion heapRegionForAddress(Address addr) { + Iterator iter = heapRegionIterator(); while (iter.hasNext()) { G1HeapRegion hr = iter.next(); if (hr.isInRegion(addr)) { @@ -139,7 +139,7 @@ public CollectedHeapName kind() { @Override public void liveRegionsIterate(LiveRegionsClosure closure) { - Iterator iter = g1HeapRegionIterator(); + Iterator iter = heapRegionIterator(); while (iter.hasNext()) { G1HeapRegion hr = iter.next(); closure.doLiveRegions(hr); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionClosure.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionClosure.java similarity index 96% rename from src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionClosure.java rename to src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionClosure.java index d63679d309957..71a9c31d76331 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionClosure.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionClosure.java @@ -24,6 +24,6 @@ package sun.jvm.hotspot.gc.g1; -public interface HeapRegionClosure { +public interface G1HeapRegionClosure { public void doHeapRegion(G1HeapRegion hr); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionManager.java similarity index 92% rename from src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java rename to src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionManager.java index b145fee8ba7bc..0ffec370284bb 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionManager.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionManager.java @@ -39,7 +39,7 @@ // Mirror class for HeapRegionManager. -public class HeapRegionManager extends VMObject { +public class G1HeapRegionManager extends VMObject { // G1HeapRegionTable _regions private static long regionsFieldOffset; @@ -70,11 +70,11 @@ public long length() { return regions().length(); } - public Iterator g1HeapRegionIterator() { - return regions().g1HeapRegionIterator(length()); + public Iterator heapRegionIterator() { + return regions().heapRegionIterator(length()); } - public HeapRegionManager(Address addr) { + public G1HeapRegionManager(Address addr) { super(addr); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionSetBase.java similarity index 95% rename from src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java rename to src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionSetBase.java index 7cfcf938d9ecc..4b5533cbd2935 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/HeapRegionSetBase.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionSetBase.java @@ -39,7 +39,7 @@ // Mirror class for HeapRegionSetBase. Represents a group of regions. -public class HeapRegionSetBase extends VMObject { +public class G1HeapRegionSetBase extends VMObject { // uint _length private static CIntegerField lengthField; @@ -62,7 +62,7 @@ public long length() { return lengthField.getValue(addr); } - public HeapRegionSetBase(Address addr) { + public G1HeapRegionSetBase(Address addr) { super(addr); } } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java index 3b6451a7c36bb..864c931996624 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/G1HeapRegionTable.java @@ -125,7 +125,7 @@ public void remove() { /* not supported */ } } } - public Iterator g1HeapRegionIterator(long committedLength) { + public Iterator heapRegionIterator(long committedLength) { return new G1HeapRegionIterator(committedLength); } diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/PrintRegionClosure.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/PrintRegionClosure.java index fb777f35167c5..f8f682d89b5ec 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/PrintRegionClosure.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/g1/PrintRegionClosure.java @@ -27,7 +27,7 @@ import java.io.PrintStream; import sun.jvm.hotspot.gc.g1.G1HeapRegion; -public class PrintRegionClosure implements HeapRegionClosure { +public class PrintRegionClosure implements G1HeapRegionClosure { private PrintStream tty; public PrintRegionClosure(PrintStream tty) { diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java index 41788757e0c78..409bc7902be44 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/HeapSummary.java @@ -253,8 +253,8 @@ public void printG1HeapSummary(PrintStream tty, G1CollectedHeap g1h) { G1MonitoringSupport monitoringSupport = g1h.monitoringSupport(); long edenSpaceRegionNum = monitoringSupport.edenSpaceRegionNum(); long survivorSpaceRegionNum = monitoringSupport.survivorSpaceRegionNum(); - HeapRegionSetBase oldSet = g1h.oldSet(); - HeapRegionSetBase humongousSet = g1h.humongousSet(); + G1HeapRegionSetBase oldSet = g1h.oldSet(); + G1HeapRegionSetBase humongousSet = g1h.humongousSet(); long oldGenRegionNum = oldSet.length() + humongousSet.length(); printG1Space(tty, "G1 Heap:", g1h.n_regions(), g1h.used(), g1h.capacity()); diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java index 723e981bc3cda..1fea467abebbe 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/PointerFinder.java @@ -120,7 +120,7 @@ public static PointerLocation find(Address a) { // If we are using the G1CollectedHeap, find out which region the address is in if (heap instanceof G1CollectedHeap) { G1CollectedHeap g1 = (G1CollectedHeap)heap; - loc.hr = g1.g1HeapRegionForAddress(a); + loc.hr = g1.heapRegionForAddress(a); // We don't assert that loc.hr is not null like we do for the SerialHeap. This is // because heap.isIn(a) can return true if the address is anywhere in G1's mapped // memory, even if that area of memory is not in use by a G1HeapRegion. So there