use of com.ibm.j9ddr.vm29.pointer.ObjectMonitorReferencePointer in project openj9 by eclipse.
the class RootScanner method scanMonitorLookupCaches.
protected void scanMonitorLookupCaches() throws CorruptDataException {
setReachability(Reachability.WEAK);
GCVMThreadListIterator vmThreadListIterator = GCVMThreadListIterator.from();
while (vmThreadListIterator.hasNext()) {
J9VMThreadPointer walkThread = vmThreadListIterator.next();
if (J9BuildFlags.thr_lockNursery) {
ObjectMonitorReferencePointer objectMonitorLookupCache = walkThread.objectMonitorLookupCacheEA();
for (long cacheIndex = 0; cacheIndex < J9VMThread.J9VMTHREAD_OBJECT_MONITOR_CACHE_SIZE; cacheIndex++) {
ObjectMonitorReferencePointer slotAddress = objectMonitorLookupCache.add(cacheIndex);
doMonitorLookupCacheSlot(slotAddress.at(0), slotAddress);
}
} else {
/* Can't implement this because walkThread.cachedMonitor field does not exist as we've never had a vm29 spec yet with the condition:
* (!J9BuildFlags.thr_lockNursery && !J9BuildFlags.opt_realTimeLockingSupport)
*
* // This cast is ugly but is technically what the c-code is doing
* ObjectMonitorReferencePointer cachedMonitorSlot = ObjectMonitorReferencePointer.cast(walkThread.cachedMonitorEA());
* doMonitorLookupCacheSlot(walkThread.cachedMonitor(), cachedMonitorSlot);
*/
throw new UnsupportedOperationException("Not implemented");
}
}
}
use of com.ibm.j9ddr.vm29.pointer.ObjectMonitorReferencePointer in project openj9 by eclipse.
the class SimpleRootScanner method doMonitorLookupCacheSlot.
@Override
protected void doMonitorLookupCacheSlot(J9ObjectMonitorPointer slot, ObjectMonitorReferencePointer address) {
try {
J9ThreadAbstractMonitorPointer monitor = J9ThreadAbstractMonitorPointer.cast(slot.monitor());
doSlot(J9ObjectPointer.cast(monitor.userData()), VoidPointer.cast(monitor.userDataEA()));
} catch (CorruptDataException e) {
EventManager.raiseCorruptDataEvent("Errror accessing object slot from J9ObjectMonitorPointer: " + slot.getHexAddress(), e, false);
}
}
Aggregations