use of com.ibm.j9ddr.vm29.j9.gc.GCJNIGlobalReferenceIterator in project openj9 by eclipse.
the class RootScanner method scanJNIGlobalReferences.
protected void scanJNIGlobalReferences() throws CorruptDataException {
setReachability(Reachability.STRONG);
GCJNIGlobalReferenceIterator jniGlobalReferenceIterator = GCJNIGlobalReferenceIterator.from();
GCJNIGlobalReferenceIterator addressIterator = GCJNIGlobalReferenceIterator.from();
while (jniGlobalReferenceIterator.hasNext()) {
doJNIGlobalReferenceSlot(jniGlobalReferenceIterator.next(), addressIterator.nextAddress());
}
}
use of com.ibm.j9ddr.vm29.j9.gc.GCJNIGlobalReferenceIterator in project openj9 by eclipse.
the class CheckJNIGlobalReferences method print.
@Override
public void print() {
try {
VoidPointer globalRefs = VoidPointer.cast(getJavaVM().jniGlobalReferences());
GCJNIGlobalReferenceIterator jniGlobalReferenceIterator = GCJNIGlobalReferenceIterator.from();
ScanFormatter formatter = new ScanFormatter(this, "jniGlobalReferences", globalRefs);
while (jniGlobalReferenceIterator.hasNext()) {
J9ObjectPointer slot = jniGlobalReferenceIterator.next();
if (slot.notNull()) {
formatter.entry(slot);
}
}
formatter.end("jniGlobalReferences", globalRefs);
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.j9.gc.GCJNIGlobalReferenceIterator in project openj9 by eclipse.
the class CheckJNIGlobalReferences method check.
@Override
public void check() {
try {
VoidPointer globalRefs = VoidPointer.cast(getJavaVM().jniGlobalReferences());
GCJNIGlobalReferenceIterator jniGlobalReferenceIterator = GCJNIGlobalReferenceIterator.from();
while (jniGlobalReferenceIterator.hasNext()) {
PointerPointer slot = PointerPointer.cast(jniGlobalReferenceIterator.nextAddress());
if (slot.notNull()) {
if (_engine.checkSlotPool(slot, globalRefs) != J9MODRON_SLOT_ITERATOR_OK) {
return;
}
}
}
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
Aggregations