Search in sources :

Example 1 with GCVMThreadIterator

use of com.ibm.j9ddr.vm29.j9.gc.GCVMThreadIterator in project openj9 by eclipse.

the class CheckVMThreads method check.

@Override
public void check() {
    try {
        GCVMThreadListIterator vmThreadListIterator = GCVMThreadListIterator.from();
        while (vmThreadListIterator.hasNext()) {
            J9VMThreadPointer walkThread = vmThreadListIterator.next();
            GCVMThreadIterator vmthreadIterator = GCVMThreadIterator.fromJ9VMThread(walkThread);
            while (vmthreadIterator.hasNext()) {
                PointerPointer slot = PointerPointer.cast(vmthreadIterator.nextAddress());
                if (_engine.checkSlotVMThread(slot, VoidPointer.cast(walkThread), CheckError.check_type_other, vmthreadIterator.getState()) != J9MODRON_SLOT_ITERATOR_OK) {
                    continue;
                }
            }
        }
    } catch (CorruptDataException e) {
    // TODO: handle exception
    }
}
Also used : GCVMThreadListIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadListIterator) PointerPointer(com.ibm.j9ddr.vm29.pointer.PointerPointer) J9VMThreadPointer(com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) GCVMThreadIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadIterator)

Example 2 with GCVMThreadIterator

use of com.ibm.j9ddr.vm29.j9.gc.GCVMThreadIterator in project openj9 by eclipse.

the class CheckVMThreads method print.

@Override
public void print() {
    try {
        GCVMThreadListIterator vmThreadListIterator = GCVMThreadListIterator.from();
        ScanFormatter formatter = new ScanFormatter(this, "VMThread Slots");
        while (vmThreadListIterator.hasNext()) {
            J9VMThreadPointer walkThread = vmThreadListIterator.next();
            formatter.section("thread", walkThread);
            GCVMThreadIterator vmthreadIterator = GCVMThreadIterator.fromJ9VMThread(walkThread);
            while (vmthreadIterator.hasNext()) {
                formatter.entry(vmthreadIterator.next());
            }
            formatter.endSection();
        }
        formatter.end("VMThread Slots");
    } catch (CorruptDataException e) {
    // TODO: handle exception
    }
}
Also used : GCVMThreadListIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadListIterator) J9VMThreadPointer(com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) GCVMThreadIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadIterator)

Aggregations

CorruptDataException (com.ibm.j9ddr.CorruptDataException)2 GCVMThreadIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadIterator)2 GCVMThreadListIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadListIterator)2 J9VMThreadPointer (com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer)2 PointerPointer (com.ibm.j9ddr.vm29.pointer.PointerPointer)1