use of com.ibm.j9ddr.vm29.j9.gc.GCMonitorReferenceIterator in project openj9 by eclipse.
the class RootScanner method scanMonitorReferences.
protected void scanMonitorReferences() throws CorruptDataException {
setReachability(Reachability.WEAK);
GCMonitorReferenceIterator monitorReferenceIterator = GCMonitorReferenceIterator.from();
while (monitorReferenceIterator.hasNext()) {
doMonitorReference(monitorReferenceIterator.next());
}
}
use of com.ibm.j9ddr.vm29.j9.gc.GCMonitorReferenceIterator in project openj9 by eclipse.
the class CheckMonitorTable method check.
@Override
public void check() {
try {
GCMonitorReferenceIterator monitorReferenceIterator = GCMonitorReferenceIterator.from();
while (monitorReferenceIterator.hasNext()) {
J9ObjectMonitorPointer objectMonitor = monitorReferenceIterator.next();
J9ThreadAbstractMonitorPointer monitor = J9ThreadAbstractMonitorPointer.cast(objectMonitor.monitor());
PointerPointer slot = PointerPointer.cast(monitor.userDataEA());
if (_engine.checkSlotPool(slot, VoidPointer.cast(monitorReferenceIterator.currentMonitorTable().getJ9HashTablePointer())) != J9MODRON_SLOT_ITERATOR_OK) {
return;
}
}
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.j9.gc.GCMonitorReferenceIterator 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