use of com.ibm.j9ddr.CorruptDataException in project openj9 by eclipse.
the class GCMixedObjectIterator_V1 method next.
@Override
public J9ObjectPointer next() {
try {
if (hasNext()) {
if (object != null && includeClassSlot) {
includeClassSlot = false;
return J9ObjectHelper.clazz(object).classObject();
}
J9ObjectPointer next = J9ObjectPointer.cast(data.at(scanIndex));
scanIndex++;
return next;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
} catch (CorruptDataException e) {
// can try to recover from this
raiseCorruptDataEvent("Error getting next item", e, false);
return null;
}
}
use of com.ibm.j9ddr.CorruptDataException in project openj9 by eclipse.
the class GCHeapRegionIterator method hasNext.
public boolean hasNext() {
try {
if (null != currentRegion) {
return true;
}
while ((null != _auxRegion) || (null != _tableRegion)) {
MM_HeapRegionDescriptorPointer region = null;
/* we need to return these in-order */
if ((null != _auxRegion) && ((null == _tableRegion) || (_auxRegion.lt(_tableRegion)))) {
region = _auxRegion;
_auxRegion = getNextAuxiliaryRegion(_auxRegion);
} else if (null != _tableRegion) {
region = _tableRegion;
_tableRegion = getNextTableRegion(_tableRegion);
} else {
break;
}
if (shouldIncludeRegion(region)) {
currentRegion = GCHeapRegionDescriptor.fromHeapRegionDescriptor(region);
return true;
}
}
return false;
} catch (CorruptDataException cde) {
// can try to recover from this
raiseCorruptDataEvent("Error getting next item", cde, false);
return false;
}
}
use of com.ibm.j9ddr.CorruptDataException in project openj9 by eclipse.
the class GCMarkMapStandard method getPageSize.
@Override
public int getPageSize(J9ObjectPointer object) {
int result = super.getPageSize(object);
try {
if ((object != null) && object.gte(_heapBase) && object.lt(_heapTop)) {
UDATA heapBaseOffset = UDATA.cast(object).sub(UDATA.cast(_heapBase));
// pairs of UDATA, so *2
UDATA pageIndex = heapBaseOffset.div(MM_CompactScheme.sizeof_page).mult(2);
UDATA compactTableEntry_addr = _heapMapBits.at(pageIndex);
if (compactTableEntry_addr.allBitsIn(3)) {
result = (int) MM_CompactScheme.sizeof_page;
}
}
} catch (CorruptDataException cde) {
// Ignore this particular error -- surely the calling code will hit it
}
return result;
}
use of com.ibm.j9ddr.CorruptDataException in project openj9 by eclipse.
the class GCVMThreadListIterator method next.
public J9VMThreadPointer next() {
try {
if (hasNext()) {
J9VMThreadPointer next;
next = currentVMThread;
currentVMThread = currentVMThread.linkNext();
if (currentVMThread.equals(initialVMThread)) {
currentVMThread = J9VMThreadPointer.NULL;
}
return next;
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
} catch (CorruptDataException cde) {
// link to next vm thread is broken, terminate iterator
currentVMThread = J9VMThreadPointer.NULL;
raiseCorruptDataEvent("Error getting next item", cde, false);
return null;
}
}
use of com.ibm.j9ddr.CorruptDataException in project openj9 by eclipse.
the class GCVMThreadMonitorRecordSlotIterator method nextAddress.
public VoidPointer nextAddress() {
if (hasNext()) {
try {
VoidPointer next;
if (monitorRecord.notNull()) {
next = VoidPointer.cast(monitorRecord.objectEA());
monitorRecord = monitorRecord.next();
} else {
next = VoidPointer.cast(jniMonitorRecord.objectEA());
jniMonitorRecord = jniMonitorRecord.next();
}
return next;
} catch (CorruptDataException e) {
// can try to recover from this
raiseCorruptDataEvent("Error getting next item", e, false);
return null;
}
} else {
throw new NoSuchElementException("There are no more items available through this iterator");
}
}
Aggregations