use of com.ibm.j9ddr.vm29.pointer.generated.MM_OwnableSynchronizerObjectListPointer in project openj9 by eclipse.
the class CheckEngine method checkSlotOwnableSynchronizerList.
public int checkSlotOwnableSynchronizerList(J9ObjectPointer object, MM_OwnableSynchronizerObjectListPointer currentList) {
if (needVerifyOwnableSynchronizerConsistency()) {
_ownableSynchronizerObjectCountOnList += 1;
}
try {
int result = checkObjectIndirect(object);
if (J9MODRON_GCCHK_RC_OK != result) {
CheckError error = new CheckError(currentList, object, _cycle, _currentCheck, result, _cycle.nextErrorCount());
_reporter.report(error);
_reporter.reportHeapWalkError(error, _lastHeapObject1, _lastHeapObject2, _lastHeapObject3);
return J9MODRON_SLOT_ITERATOR_UNRECOVERABLE_ERROR;
}
J9ClassPointer instanceClass = J9ObjectHelper.clazz(object);
if (J9ClassHelper.classFlags(instanceClass).bitAnd(J9AccClassOwnableSynchronizer).eq(0)) {
CheckError error = new CheckError(currentList, object, _cycle, _currentCheck, J9MODRON_GCCHK_RC_INVALID_FLAGS, _cycle.nextErrorCount());
_reporter.report(error);
}
} catch (CorruptDataException e) {
CheckError error = new CheckError(currentList, object, _cycle, _currentCheck, J9MODRON_GCCHK_RC_CORRUPT_DATA_EXCEPTION, _cycle.nextErrorCount());
_reporter.report(error);
_reporter.reportHeapWalkError(error, _lastHeapObject1, _lastHeapObject2, _lastHeapObject3);
return J9MODRON_SLOT_ITERATOR_UNRECOVERABLE_ERROR;
}
return J9MODRON_SLOT_ITERATOR_OK;
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_OwnableSynchronizerObjectListPointer in project openj9 by eclipse.
the class CheckOwnableSynchronizerList method print.
@Override
public void print() {
try {
MM_OwnableSynchronizerObjectListPointer ownableSynchronizerObjectList = getGCExtensions().ownableSynchronizerObjectLists();
ScanFormatter formatter = new ScanFormatter(this, "ownableSynchronizerObjectList");
while (ownableSynchronizerObjectList.notNull()) {
formatter.section("list", ownableSynchronizerObjectList);
J9ObjectPointer object = ownableSynchronizerObjectList._head();
while (object.notNull()) {
formatter.entry(object);
object = ObjectAccessBarrier.getOwnableSynchronizerLink(object);
}
formatter.endSection();
ownableSynchronizerObjectList = ownableSynchronizerObjectList._nextList();
}
formatter.end("ownableSynchronizerObjectList");
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.pointer.generated.MM_OwnableSynchronizerObjectListPointer in project openj9 by eclipse.
the class CheckOwnableSynchronizerList method check.
@Override
public void check() {
try {
MM_HeapRegionManagerPointer heapRegionManager = getGCExtensions().heapRegionManager();
long maximumOwnableSynchronizerCountOnHeap = heapRegionManager._totalHeapSize().longValue() / J9Consts.J9_GC_MINIMUM_OBJECT_SIZE;
MM_OwnableSynchronizerObjectListPointer ownableSynchronizerObjectList = getGCExtensions().ownableSynchronizerObjectLists();
while (ownableSynchronizerObjectList.notNull()) {
J9ObjectPointer object = ownableSynchronizerObjectList._head();
long ownableSynchronizerCount = 0;
_engine.clearPreviousObjects();
while (object.notNull()) {
if (_engine.checkSlotOwnableSynchronizerList(object, ownableSynchronizerObjectList) != CheckBase.J9MODRON_SLOT_ITERATOR_OK) {
break;
}
ownableSynchronizerCount += 1;
if (ownableSynchronizerCount > maximumOwnableSynchronizerCountOnHeap) {
_engine.reportOwnableSynchronizerCircularReferenceError(object, ownableSynchronizerObjectList);
break;
}
_engine.pushPreviousObject(object);
object = ObjectAccessBarrier.getOwnableSynchronizerLink(object);
}
ownableSynchronizerObjectList = ownableSynchronizerObjectList._nextList();
}
} catch (CorruptDataException e) {
// TODO: handle exception
}
if (_engine.needVerifyOwnableSynchronizerConsistency()) {
/* call verifyOwnableSynchronizerObjectCounts() only at the end of CheckOwnableSynchronizerList,
* verifyOwnableSynchronizerObjectCounts need both the count calculated in CheckObjectHeap and in CheckOwnableSynchronizerList
* assumption: CheckOwnableSynchronizerList always happens after CheckObjectHeap in CheckCycle
*/
_engine.verifyOwnableSynchronizerObjectCounts();
}
}
Aggregations