Search in sources :

Example 1 with GCVMThreadMonitorRecordSlotIterator

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

the class RootScanner method scanThreads.

protected void scanThreads() throws CorruptDataException {
    setReachability(Reachability.STRONG);
    GCVMThreadListIterator vmThreadListIterator = GCVMThreadListIterator.from();
    while (vmThreadListIterator.hasNext()) {
        J9VMThreadPointer walkThread = vmThreadListIterator.next();
        /* "Inline" the behaviour of GC_VMThreadIterator to distinguish between the types of roots */
        GCVMThreadSlotIterator threadSlotIterator = GCVMThreadSlotIterator.fromJ9VMThread(walkThread);
        GCVMThreadSlotIterator threadSlotAddressIterator = GCVMThreadSlotIterator.fromJ9VMThread(walkThread);
        while (threadSlotIterator.hasNext()) {
            doVMThreadSlot(threadSlotIterator.next(), threadSlotAddressIterator.nextAddress());
        }
        GCVMThreadJNISlotIterator jniSlotIterator = GCVMThreadJNISlotIterator.fromJ9VMThread(walkThread);
        GCVMThreadJNISlotIterator jniSlotAddressIterator = GCVMThreadJNISlotIterator.fromJ9VMThread(walkThread);
        while (jniSlotIterator.hasNext()) {
            doVMThreadJNISlot(jniSlotIterator.next(), jniSlotAddressIterator.nextAddress());
        }
        if (J9BuildFlags.interp_hotCodeReplacement) {
            GCVMThreadMonitorRecordSlotIterator monitorRecordSlotIterator = GCVMThreadMonitorRecordSlotIterator.fromJ9VMThread(walkThread);
            GCVMThreadMonitorRecordSlotIterator addressIterator = GCVMThreadMonitorRecordSlotIterator.fromJ9VMThread(walkThread);
            while (monitorRecordSlotIterator.hasNext()) {
                doVMThreadMonitorRecordSlot(monitorRecordSlotIterator.next(), addressIterator.nextAddress());
            }
        }
        if (_scanStackSlots) {
            GCVMThreadStackSlotIterator.scanSlots(walkThread, _stackWalkerCallbacks, _includeStackFrameClassReferences, _trackVisibleStackFrameDepth);
        }
    }
}
Also used : GCVMThreadListIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadListIterator) GCVMThreadJNISlotIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadJNISlotIterator) GCVMThreadSlotIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadSlotIterator) J9VMThreadPointer(com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer) GCVMThreadMonitorRecordSlotIterator(com.ibm.j9ddr.vm29.j9.gc.GCVMThreadMonitorRecordSlotIterator)

Aggregations

GCVMThreadJNISlotIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadJNISlotIterator)1 GCVMThreadListIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadListIterator)1 GCVMThreadMonitorRecordSlotIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadMonitorRecordSlotIterator)1 GCVMThreadSlotIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadSlotIterator)1 J9VMThreadPointer (com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer)1