Search in sources :

Example 41 with VoidPointer

use of com.ibm.j9ddr.vm29.pointer.VoidPointer in project openj9 by eclipse.

the class GCCardTable method cardAddrToHeapAddr.

public VoidPointer cardAddrToHeapAddr(U8Pointer cardAddr) {
    /* Check passed card address is within the card table  */
    // Assert_MM_true((void *)cardAddr >= getCardTableStart());
    // Assert_MM_true((void *)cardAddr < _cardTableMemory->getHeapTop());
    UDATA index = UDATA.cast(cardAddr).sub(UDATA.cast(_cardTableStart));
    UDATA delta = index.leftShift(CARD_SIZE_SHIFT);
    return _heapBase.addOffset(delta);
}
Also used : UDATA(com.ibm.j9ddr.vm29.types.UDATA)

Example 42 with VoidPointer

use of com.ibm.j9ddr.vm29.pointer.VoidPointer in project openj9 by eclipse.

the class GCClassIterator method nextAddress.

public VoidPointer nextAddress() {
    if (hasNext()) {
        switch(state) {
            case state_statics:
                return staticsIterator.nextAddress();
            case state_constant_pool:
                return constantPoolSlotIterator.nextAddress();
            case state_slots:
                if (clazz != null) {
                    VoidPointer ea = null;
                    try {
                        ea = VoidPointer.cast(clazz.classObjectEA());
                    } catch (CorruptDataException e) {
                        // can try to recover from this
                        raiseCorruptDataEvent("Error fetching the class object", e, false);
                    }
                    clazz = null;
                    return ea;
                }
        }
    }
    throw new NoSuchElementException("There are no more items available through this iterator");
}
Also used : VoidPointer(com.ibm.j9ddr.vm29.pointer.VoidPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) NoSuchElementException(java.util.NoSuchElementException)

Example 43 with VoidPointer

use of com.ibm.j9ddr.vm29.pointer.VoidPointer in project openj9 by eclipse.

the class GCClassSuperclassesIterator method nextAddress.

public VoidPointer nextAddress() {
    if (hasNext()) {
        VoidPointer next = VoidPointer.cast(superclasses.add(index));
        index = index.add(1);
        return next;
    } else {
        throw new NoSuchElementException("There are no more items available through this iterator");
    }
}
Also used : VoidPointer(com.ibm.j9ddr.vm29.pointer.VoidPointer) NoSuchElementException(java.util.NoSuchElementException)

Example 44 with VoidPointer

use of com.ibm.j9ddr.vm29.pointer.VoidPointer in project openj9 by eclipse.

the class GCVMClassSlotIterator method nextAddress.

public VoidPointer nextAddress() {
    if (hasNext()) {
        VoidPointer next = VoidPointer.cast(scanPtr);
        scanPtr = scanPtr.add(1);
        return next;
    } else {
        throw new NoSuchElementException("There are no more items available through this iterator");
    }
}
Also used : VoidPointer(com.ibm.j9ddr.vm29.pointer.VoidPointer) NoSuchElementException(java.util.NoSuchElementException)

Example 45 with VoidPointer

use of com.ibm.j9ddr.vm29.pointer.VoidPointer in project openj9 by eclipse.

the class MMSublistSlotIterator method next.

public AbstractPointer next() {
    if (hasNext()) {
        VoidPointer currentScanPtr = VoidPointer.cast(scanPtr);
        scanPtr = scanPtr.add(1);
        return currentScanPtr;
    } else {
        throw new NoSuchElementException("There are no more items available through this iterator");
    }
}
Also used : VoidPointer(com.ibm.j9ddr.vm29.pointer.VoidPointer) NoSuchElementException(java.util.NoSuchElementException)

Aggregations

VoidPointer (com.ibm.j9ddr.vm29.pointer.VoidPointer)48 CorruptDataException (com.ibm.j9ddr.CorruptDataException)37 J9ObjectPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer)15 NoSuchElementException (java.util.NoSuchElementException)13 PointerPointer (com.ibm.j9ddr.vm29.pointer.PointerPointer)9 UDATA (com.ibm.j9ddr.vm29.types.UDATA)9 DDRInteractiveCommandException (com.ibm.j9ddr.tools.ddrinteractive.DDRInteractiveCommandException)5 GCVMThreadListIterator (com.ibm.j9ddr.vm29.j9.gc.GCVMThreadListIterator)5 J9VMThreadPointer (com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer)5 U8Pointer (com.ibm.j9ddr.vm29.pointer.U8Pointer)4 UDATAPointer (com.ibm.j9ddr.vm29.pointer.UDATAPointer)3 J9ClassPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer)3 CorruptData (com.ibm.dtfj.image.CorruptData)2 JavaObject (com.ibm.dtfj.java.JavaObject)2 J9DDRCorruptData (com.ibm.j9ddr.view.dtfj.image.J9DDRCorruptData)2 MonitorTable (com.ibm.j9ddr.vm29.j9.MonitorTable)2 GCJNIGlobalReferenceIterator (com.ibm.j9ddr.vm29.j9.gc.GCJNIGlobalReferenceIterator)2 GCJNIWeakGlobalReferenceIterator (com.ibm.j9ddr.vm29.j9.gc.GCJNIWeakGlobalReferenceIterator)2 GCObjectIterator (com.ibm.j9ddr.vm29.j9.gc.GCObjectIterator)2 BaseStackWalkerCallbacks (com.ibm.j9ddr.vm29.j9.stackwalker.BaseStackWalkerCallbacks)2