use of com.ibm.j9ddr.vm29.j9.gc.GCFinalizableObjectIterator in project openj9 by eclipse.
the class RootScanner method scanFinalizableObjects.
protected void scanFinalizableObjects() throws CorruptDataException {
if (!J9BuildFlags.gc_finalization)
return;
setReachability(Reachability.STRONG);
/* New style finalizable object list */
GCFinalizableObjectIterator finalizableObjectIterator = GCFinalizableObjectIterator.from();
while (finalizableObjectIterator.hasNext()) {
doFinalizableObject(finalizableObjectIterator.next());
}
}
use of com.ibm.j9ddr.vm29.j9.gc.GCFinalizableObjectIterator in project openj9 by eclipse.
the class CheckFinalizableList method print.
@Override
public void print() {
try {
ScanFormatter formatter = new ScanFormatter(this, "finalizableList");
GCFinalizableObjectIterator finalizableObjectIterator = GCFinalizableObjectIterator.from();
int state = finalizableObjectIterator.getState();
while (finalizableObjectIterator.hasNext()) {
if (finalizableObjectIterator.getState() != state) {
formatter.endSection();
state = finalizableObjectIterator.getState();
switch(state) {
case GCFinalizableObjectIterator.state_system:
formatter.section("finalizable objects created by the system classloader");
break;
case GCFinalizableObjectIterator.state_default:
formatter.section("finalizable objects created by application class loaders");
break;
case GCFinalizableObjectIterator.state_reference:
formatter.section("reference objects");
break;
}
}
formatter.entry(finalizableObjectIterator.next());
}
formatter.end("finalizableList");
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
Aggregations