Search in sources :

Example 1 with GCMonitorReferenceIterator

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());
    }
}
Also used : GCMonitorReferenceIterator(com.ibm.j9ddr.vm29.j9.gc.GCMonitorReferenceIterator)

Example 2 with GCMonitorReferenceIterator

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
    }
}
Also used : PointerPointer(com.ibm.j9ddr.vm29.pointer.PointerPointer) J9ObjectMonitorPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectMonitorPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) GCMonitorReferenceIterator(com.ibm.j9ddr.vm29.j9.gc.GCMonitorReferenceIterator) J9ThreadAbstractMonitorPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ThreadAbstractMonitorPointer)

Example 3 with GCMonitorReferenceIterator

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
    }
}
Also used : VoidPointer(com.ibm.j9ddr.vm29.pointer.VoidPointer) J9ObjectMonitorPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ObjectMonitorPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) GCMonitorReferenceIterator(com.ibm.j9ddr.vm29.j9.gc.GCMonitorReferenceIterator) MonitorTable(com.ibm.j9ddr.vm29.j9.MonitorTable) J9ThreadAbstractMonitorPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ThreadAbstractMonitorPointer)

Aggregations

GCMonitorReferenceIterator (com.ibm.j9ddr.vm29.j9.gc.GCMonitorReferenceIterator)3 CorruptDataException (com.ibm.j9ddr.CorruptDataException)2 J9ObjectMonitorPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ObjectMonitorPointer)2 J9ThreadAbstractMonitorPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ThreadAbstractMonitorPointer)2 MonitorTable (com.ibm.j9ddr.vm29.j9.MonitorTable)1 PointerPointer (com.ibm.j9ddr.vm29.pointer.PointerPointer)1 VoidPointer (com.ibm.j9ddr.vm29.pointer.VoidPointer)1