use of com.ibm.j9ddr.vm29.j9.gc.GCHeapMap.MarkedObject in project openj9 by eclipse.
the class MarkMapCommand method markBits.
protected void markBits(String[] args, Context context, PrintStream out) throws DDRInteractiveCommandException {
try {
long address = CommandUtils.parsePointer(args[1], J9BuildFlags.env_data64);
J9ObjectPointer object = J9ObjectPointer.cast(address);
J9ObjectPointer base = J9ObjectPointer.cast(address).untag(markMap.getPageSize(object) - 1);
J9ObjectPointer top = base.addOffset(markMap.getPageSize(object));
MarkedObject[] result = markMap.queryRange(base, top);
if (result.length > 0) {
if (result[0].wasRelocated()) {
out.format("Mark bits for the compacted range %s -> %s: !j9x %s\n", base.getHexAddress(), top.getHexAddress(), result[0].markBitsSlot.getHexAddress());
} else {
out.format("Mark bits for the range %s -> %s: !j9x %s\n", base.getHexAddress(), top.getHexAddress(), result[0].markBitsSlot.getHexAddress());
}
} else {
/* Either outside the heap, or just nothing there */
try {
UDATA[] indexAndMask = markMap.getSlotIndexAndMask(base);
UDATAPointer markBitsSlot = markMap.getHeapMapBits().add(indexAndMask[0]);
out.format("Mark bits for the range %s -> %s: !j9x %s\n", base.getHexAddress(), top.getHexAddress(), markBitsSlot.getHexAddress());
} catch (IllegalArgumentException ex) {
out.format("Object %s is not in the heap\n", object.getHexAddress());
}
}
} catch (CorruptDataException e) {
throw new DDRInteractiveCommandException(e);
}
}
use of com.ibm.j9ddr.vm29.j9.gc.GCHeapMap.MarkedObject in project openj9 by eclipse.
the class MarkMapCommand method scanRange.
protected void scanRange(String[] args, Context context, PrintStream out) throws DDRInteractiveCommandException {
try {
long baseAddress = CommandUtils.parsePointer(args[1], J9BuildFlags.env_data64);
long topAddress = CommandUtils.parsePointer(args[2], J9BuildFlags.env_data64);
J9ObjectPointer base = J9ObjectPointer.cast(baseAddress);
J9ObjectPointer top = J9ObjectPointer.cast(topAddress);
MarkedObject[] results = markMap.queryRange(base, top);
reportResults(base, top, results, out);
} catch (CorruptDataException e) {
throw new DDRInteractiveCommandException(e);
}
}
Aggregations