< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java
Print this page
*** 34,43 ****
--- 34,44 ----
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.gc.cms.*;
import sun.jvm.hotspot.gc.shared.*;
import sun.jvm.hotspot.gc.epsilon.*;
import sun.jvm.hotspot.gc.g1.*;
+ import sun.jvm.hotspot.gc.shenandoah.*;
import sun.jvm.hotspot.gc.parallel.*;
import sun.jvm.hotspot.gc.z.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.types.*;
*** 243,259 ****
ConcurrentMarkSweepGeneration concGen = (ConcurrentMarkSweepGeneration)genOld;
cmsSpaceOld = concGen.cmsSpace();
}
}
for (int i = 0; i < liveRegions.size(); i += 2) {
Address bottom = (Address) liveRegions.get(i);
Address top = (Address) liveRegions.get(i+1);
try {
// Traverses the space from bottom to top
! OopHandle handle = bottom.addOffsetToAsOopHandle(0);
while (handle.lessThan(top)) {
Oop obj = null;
try {
--- 244,262 ----
ConcurrentMarkSweepGeneration concGen = (ConcurrentMarkSweepGeneration)genOld;
cmsSpaceOld = concGen.cmsSpace();
}
}
+ int cell_header_size = heap.cell_header_size();
+
for (int i = 0; i < liveRegions.size(); i += 2) {
Address bottom = (Address) liveRegions.get(i);
Address top = (Address) liveRegions.get(i+1);
try {
// Traverses the space from bottom to top
! OopHandle handle = bottom.addOffsetToAsOopHandle(cell_header_size);
while (handle.lessThan(top)) {
Oop obj = null;
try {
*** 286,296 ****
}
}
if ( (cmsSpaceOld != null) && cmsSpaceOld.contains(handle)) {
handle = handle.addOffsetToAsOopHandle(CompactibleFreeListSpace.adjustObjectSizeInBytes(obj.getObjectSize()) );
} else {
! handle = handle.addOffsetToAsOopHandle(obj.getObjectSize());
}
}
}
catch (AddressException e) {
// This is okay at the top of these regions
--- 289,299 ----
}
}
if ( (cmsSpaceOld != null) && cmsSpaceOld.contains(handle)) {
handle = handle.addOffsetToAsOopHandle(CompactibleFreeListSpace.adjustObjectSizeInBytes(obj.getObjectSize()) );
} else {
! handle = handle.addOffsetToAsOopHandle(obj.getObjectSize() + cell_header_size);
}
}
}
catch (AddressException e) {
// This is okay at the top of these regions
*** 365,374 ****
--- 368,380 ----
PSOldGen oldGen = psh.oldGen();
addLiveRegions("old ", oldGen.objectSpace().getLiveRegions(), liveRegions);
} else if (heap instanceof G1CollectedHeap) {
G1CollectedHeap g1h = (G1CollectedHeap) heap;
g1h.heapRegionIterate(lrc);
+ } else if (heap instanceof ShenandoahHeap) {
+ ShenandoahHeap sh = (ShenandoahHeap) heap;
+ sh.heapRegionIterate(lrc);
} else if (heap instanceof ZCollectedHeap) {
// Operation (currently) not supported with ZGC. Print
// a warning and leave the list of live regions empty.
System.err.println("Warning: Operation not supported with ZGC");
} else if (heap instanceof EpsilonHeap) {
< prev index next >