use of com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionManager in project openj9 by eclipse.
the class ObjectRefsCommand method dumpLiveReferences.
private void dumpLiveReferences(J9JavaVMPointer vm, J9ObjectPointer targetObject, PrintStream out) throws CorruptDataException {
MM_HeapRegionManagerPointer hrmPointer = MM_GCExtensionsPointer.cast(vm.gcExtensions()).heapRegionManager();
GCHeapRegionManager heapRegionManager = GCHeapRegionManager.fromHeapRegionManager(hrmPointer);
Table table = new Table("All Live Objects That Refer To !j9object " + targetObject.getHexAddress());
table.row("Object");
LiveSetWalker.walkLiveSet(new LiveReferenceVisitor(heapRegionManager, targetObject, table));
table.render(out);
}
use of com.ibm.j9ddr.vm29.j9.gc.GCHeapRegionManager in project openj9 by eclipse.
the class ACCommand method dumpLiveReferences.
private void dumpLiveReferences(J9JavaVMPointer vm, MM_AllocationContextPointer allocationContext, PrintStream out) throws CorruptDataException {
if (GCExtensions.isVLHGC()) {
MM_AllocationContextTarokPointer act = MM_AllocationContextTarokPointer.cast(allocationContext);
MM_HeapRegionManagerPointer hrmPointer = MM_GCExtensionsPointer.cast(vm.gcExtensions()).heapRegionManager();
GCHeapRegionManager heapRegionManager = GCHeapRegionManager.fromHeapRegionManager(hrmPointer);
Table table = new Table("Live References into AC " + allocationContext.getHexAddress());
table.row("Object", "Field");
out.println("Walking live set in search of external references into ac: " + allocationContext.getHexAddress());
long totalMillis = System.currentTimeMillis();
LiveReferenceVisitor visitor = new LiveReferenceVisitor(heapRegionManager, act, table);
LiveSetWalker.walkLiveSet(visitor, RootSetType.ALL);
totalMillis = System.currentTimeMillis() - totalMillis;
table.render(out);
out.println("\nFinished live reference walk in " + totalMillis + "ms");
out.println("Found " + visitor.getNumExternalReferencesFound() + " external references.");
}
}
Aggregations