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