Search in sources :

Example 1 with GCJVMTIObjectTagTableIterator

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

the class RootScanner method scanJVMTIObjectTagTables.

protected void scanJVMTIObjectTagTables() throws CorruptDataException {
    if (!J9BuildFlags.opt_jvmti)
        return;
    setReachability(Reachability.WEAK);
    J9JVMTIDataPointer jvmtiData = J9JVMTIDataPointer.cast(_vm.jvmtiData());
    if (jvmtiData.notNull()) {
        GCJVMTIObjectTagTableListIterator objectTagTableList = GCJVMTIObjectTagTableListIterator.fromJ9JVMTIData(jvmtiData);
        while (objectTagTableList.hasNext()) {
            J9JVMTIEnvPointer list = objectTagTableList.next();
            GCJVMTIObjectTagTableIterator objectTagTableIterator = GCJVMTIObjectTagTableIterator.fromJ9JVMTIEnv(list);
            GCJVMTIObjectTagTableIterator addressIterator = GCJVMTIObjectTagTableIterator.fromJ9JVMTIEnv(list);
            while (objectTagTableIterator.hasNext()) {
                doJVMTIObjectTagSlot(objectTagTableIterator.next(), addressIterator.nextAddress());
            }
        }
    }
}
Also used : GCJVMTIObjectTagTableListIterator(com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableListIterator) J9JVMTIDataPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIDataPointer) J9JVMTIEnvPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIEnvPointer) GCJVMTIObjectTagTableIterator(com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableIterator)

Example 2 with GCJVMTIObjectTagTableIterator

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

the class CheckJVMTIObjectTagTables method check.

@Override
public void check() {
    try {
        J9JVMTIDataPointer jvmtiData = J9JVMTIDataPointer.cast(getJavaVM().jvmtiData());
        if (jvmtiData.notNull()) {
            GCJVMTIObjectTagTableListIterator objectTagTableList = GCJVMTIObjectTagTableListIterator.fromJ9JVMTIData(jvmtiData);
            while (objectTagTableList.hasNext()) {
                J9JVMTIEnvPointer list = objectTagTableList.next();
                VoidPointer objectTagTable = VoidPointer.cast(list.objectTagTable());
                GCJVMTIObjectTagTableIterator objectTagTableIterator = GCJVMTIObjectTagTableIterator.fromJ9JVMTIEnv(list);
                while (objectTagTableIterator.hasNext()) {
                    PointerPointer slot = PointerPointer.cast(objectTagTableIterator.nextAddress());
                    if (slot.notNull()) {
                        if (_engine.checkSlotPool(slot, objectTagTable) != J9MODRON_SLOT_ITERATOR_OK) {
                            return;
                        }
                    }
                }
            }
        }
    } catch (CorruptDataException e) {
    // TODO: handle exception
    }
}
Also used : GCJVMTIObjectTagTableListIterator(com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableListIterator) VoidPointer(com.ibm.j9ddr.vm29.pointer.VoidPointer) J9JVMTIDataPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIDataPointer) J9JVMTIEnvPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIEnvPointer) PointerPointer(com.ibm.j9ddr.vm29.pointer.PointerPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) GCJVMTIObjectTagTableIterator(com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableIterator)

Example 3 with GCJVMTIObjectTagTableIterator

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

the class CheckJVMTIObjectTagTables method print.

@Override
public void print() {
    try {
        J9JVMTIDataPointer jvmtiData = J9JVMTIDataPointer.cast(getJavaVM().jvmtiData());
        if (jvmtiData.notNull()) {
            ScanFormatter formatter = new ScanFormatter(this, "jvmtiObjectTagTables", jvmtiData);
            GCJVMTIObjectTagTableListIterator objectTagTableList = GCJVMTIObjectTagTableListIterator.fromJ9JVMTIData(jvmtiData);
            while (objectTagTableList.hasNext()) {
                J9JVMTIEnvPointer list = objectTagTableList.next();
                GCJVMTIObjectTagTableIterator objectTagTableIterator = GCJVMTIObjectTagTableIterator.fromJ9JVMTIEnv(list);
                while (objectTagTableIterator.hasNext()) {
                    formatter.entry(objectTagTableIterator.next());
                }
            }
            formatter.end("jvmtiObjectTagTables", jvmtiData);
        }
    } catch (CorruptDataException e) {
    // TODO: handle exception
    }
}
Also used : GCJVMTIObjectTagTableListIterator(com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableListIterator) J9JVMTIDataPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIDataPointer) J9JVMTIEnvPointer(com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIEnvPointer) CorruptDataException(com.ibm.j9ddr.CorruptDataException) GCJVMTIObjectTagTableIterator(com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableIterator)

Aggregations

GCJVMTIObjectTagTableIterator (com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableIterator)3 GCJVMTIObjectTagTableListIterator (com.ibm.j9ddr.vm29.j9.gc.GCJVMTIObjectTagTableListIterator)3 J9JVMTIDataPointer (com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIDataPointer)3 J9JVMTIEnvPointer (com.ibm.j9ddr.vm29.pointer.generated.J9JVMTIEnvPointer)3 CorruptDataException (com.ibm.j9ddr.CorruptDataException)2 PointerPointer (com.ibm.j9ddr.vm29.pointer.PointerPointer)1 VoidPointer (com.ibm.j9ddr.vm29.pointer.VoidPointer)1