Search in sources :

Example 6 with J9ClassPointer

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

the class GCClassHeapIterator method next.

public J9ClassPointer next() {
    try {
        if (hasNext()) {
            J9ClassPointer clazz = classPointer;
            classPointer = classPointer.nextClassInSegment();
            return clazz;
        } else {
            throw new NoSuchElementException("There are no more items available through this iterator");
        }
    } catch (CorruptDataException cde) {
        // can try to recover from this
        raiseCorruptDataEvent("Could not set the current class", cde, false);
        return null;
    }
}
Also used : J9ClassPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) NoSuchElementException(java.util.NoSuchElementException)

Example 7 with J9ClassPointer

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

the class GCMixedObjectIterator_V1 method initializeDescriptionArray.

protected void initializeDescriptionArray(J9ClassPointer clazz) throws CorruptDataException {
    UDATAPointer descriptionPtr = clazz.instanceDescription();
    long tempDescription;
    if (descriptionPtr.anyBitsIn(1)) {
        // Immediate
        tempDescription = descriptionPtr.getAddress() >>> 1;
        initializeDescriptionArray(tempDescription, 0);
    } else {
        int descriptionSlot = 0;
        int descriptionIndex = 0;
        while (descriptionIndex < scanLimit) {
            tempDescription = descriptionPtr.at(descriptionSlot++).longValue();
            initializeDescriptionArray(tempDescription, descriptionIndex);
            descriptionIndex += objectsInDescriptionSlot;
        }
    }
}
Also used : UDATAPointer(com.ibm.j9ddr.vm29.pointer.UDATAPointer)

Example 8 with J9ClassPointer

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

the class GCObjectModel_V1 method getScanType.

@Override
public long getScanType(J9ObjectPointer object) throws CorruptDataException {
    long result;
    J9ClassPointer clazz = J9ObjectHelper.clazz(object);
    return getScanType(clazz);
}
Also used : J9ClassPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer)

Example 9 with J9ClassPointer

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

the class GCVMClassSlotIterator method next.

public J9ClassPointer next() {
    try {
        if (hasNext()) {
            J9ClassPointer next = J9ClassPointer.cast(scanPtr.at(0));
            scanPtr = scanPtr.add(1);
            return next;
        } else {
            throw new NoSuchElementException("There are no more items available through this iterator");
        }
    } catch (CorruptDataException e) {
        // can try to recover from this
        raiseCorruptDataEvent("Error getting next item", e, false);
        return null;
    }
}
Also used : J9ClassPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) NoSuchElementException(java.util.NoSuchElementException)

Example 10 with J9ClassPointer

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

the class ClassIterator method fromJ9Classloader.

public static Iterator<J9ClassPointer> fromJ9Classloader(J9ClassLoaderPointer loader) throws CorruptDataException {
    J9HashTablePointer table = loader.classHashTable();
    Iterator<J9ClassPointer> iterator = null;
    if (table.listNodePool().notNull()) {
        iterator = new ClassIterator(Pool.fromJ9Pool(table.listNodePool(), J9ClassPointer.class, false).iterator());
    } else {
        iterator = new ArrayIterator<J9ClassPointer>(J9ClassPointer.class, table.tableSize().intValue(), table.nodes()).iterator();
    }
    return new ClassIterator(iterator);
}
Also used : J9ClassPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer) J9HashTablePointer(com.ibm.j9ddr.vm29.pointer.generated.J9HashTablePointer)

Aggregations

J9ClassPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ClassPointer)67 CorruptDataException (com.ibm.j9ddr.CorruptDataException)34 DDRInteractiveCommandException (com.ibm.j9ddr.tools.ddrinteractive.DDRInteractiveCommandException)16 J9JavaVMPointer (com.ibm.j9ddr.vm29.pointer.generated.J9JavaVMPointer)13 J9ROMClassPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ROMClassPointer)13 J9ObjectPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer)12 UDATA (com.ibm.j9ddr.vm29.types.UDATA)12 U32 (com.ibm.j9ddr.vm29.types.U32)11 J9MemorySegmentPointer (com.ibm.j9ddr.vm29.pointer.generated.J9MemorySegmentPointer)9 J9ROMMethodPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ROMMethodPointer)9 ClassSegmentIterator (com.ibm.j9ddr.vm29.j9.walkers.ClassSegmentIterator)8 J9MethodPointer (com.ibm.j9ddr.vm29.pointer.generated.J9MethodPointer)8 PointerPointer (com.ibm.j9ddr.vm29.pointer.PointerPointer)7 NoSuchElementException (java.util.NoSuchElementException)7 J9ObjectFieldOffset (com.ibm.j9ddr.vm29.j9.J9ObjectFieldOffset)6 J9ClassLoaderPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ClassLoaderPointer)6 GCClassHeapIterator (com.ibm.j9ddr.vm29.j9.gc.GCClassHeapIterator)5 GCSegmentIterator (com.ibm.j9ddr.vm29.j9.gc.GCSegmentIterator)5 VoidPointer (com.ibm.j9ddr.vm29.pointer.VoidPointer)5 J9ITablePointer (com.ibm.j9ddr.vm29.pointer.generated.J9ITablePointer)5