use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectMonitorPointer in project openj9 by eclipse.
the class CheckMonitorTable method print.
@Override
public void print() {
try {
VoidPointer monitorTableList = VoidPointer.cast(getJavaVM().monitorTableList());
GCMonitorReferenceIterator monitorReferenceIterator = GCMonitorReferenceIterator.from();
MonitorTable previousMonitorTable = null;
ScanFormatter formatter = new ScanFormatter(this, "MonitorTableList", monitorTableList);
while (monitorReferenceIterator.hasNext()) {
J9ObjectMonitorPointer objectMonitor = monitorReferenceIterator.next();
MonitorTable currentMonitorTable = monitorReferenceIterator.currentMonitorTable();
if (!currentMonitorTable.equals(previousMonitorTable)) {
if (null != previousMonitorTable) {
formatter.endSection();
}
formatter.section("MonitorTable", currentMonitorTable.getMonitorTableListEntryPointer());
}
J9ThreadAbstractMonitorPointer monitor = J9ThreadAbstractMonitorPointer.cast(objectMonitor.monitor());
formatter.entry(VoidPointer.cast(monitor.userData()));
previousMonitorTable = currentMonitorTable;
}
if (null != previousMonitorTable) {
formatter.endSection();
}
formatter.end("MonitorTableList", monitorTableList);
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
Aggregations