use of com.ibm.j9ddr.vm29.pointer.PointerPointer in project openj9 by eclipse.
the class CheckVMThreadStacks method print.
@Override
public void print() {
try {
GCVMThreadListIterator vmThreadListIterator = GCVMThreadListIterator.from();
final ScanFormatter formatter = new ScanFormatter(this, "thread stacks");
while (vmThreadListIterator.hasNext()) {
J9VMThreadPointer walkThread = vmThreadListIterator.next();
formatter.section("thread slots", walkThread);
WalkState walkState = new WalkState();
walkState.walkThread = walkThread;
walkState.flags = J9_STACKWALK_ITERATE_O_SLOTS | J9_STACKWALK_DO_NOT_SNIFF_AND_WHACK | J9_STACKWALK_SKIP_INLINES;
walkState.callBacks = new BaseStackWalkerCallbacks() {
public void objectSlotWalkFunction(J9VMThreadPointer walkThread, WalkState walkState, PointerPointer objectSlot, VoidPointer stackAddress) {
try {
formatter.entry(objectSlot.at(0));
} catch (CorruptDataException e) {
}
}
};
StackWalker.walkStackFrames(walkState);
formatter.endSection();
formatter.section("thread stack", walkThread);
dumpStackTrace(walkThread);
formatter.endSection();
}
formatter.end("thread stacks");
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.pointer.PointerPointer in project openj9 by eclipse.
the class CheckJNIGlobalReferences method check.
@Override
public void check() {
try {
VoidPointer globalRefs = VoidPointer.cast(getJavaVM().jniGlobalReferences());
GCJNIGlobalReferenceIterator jniGlobalReferenceIterator = GCJNIGlobalReferenceIterator.from();
while (jniGlobalReferenceIterator.hasNext()) {
PointerPointer slot = PointerPointer.cast(jniGlobalReferenceIterator.nextAddress());
if (slot.notNull()) {
if (_engine.checkSlotPool(slot, globalRefs) != J9MODRON_SLOT_ITERATOR_OK) {
return;
}
}
}
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.pointer.PointerPointer in project openj9 by eclipse.
the class CheckMonitorTable method check.
@Override
public void check() {
try {
GCMonitorReferenceIterator monitorReferenceIterator = GCMonitorReferenceIterator.from();
while (monitorReferenceIterator.hasNext()) {
J9ObjectMonitorPointer objectMonitor = monitorReferenceIterator.next();
J9ThreadAbstractMonitorPointer monitor = J9ThreadAbstractMonitorPointer.cast(objectMonitor.monitor());
PointerPointer slot = PointerPointer.cast(monitor.userDataEA());
if (_engine.checkSlotPool(slot, VoidPointer.cast(monitorReferenceIterator.currentMonitorTable().getJ9HashTablePointer())) != J9MODRON_SLOT_ITERATOR_OK) {
return;
}
}
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.pointer.PointerPointer in project openj9 by eclipse.
the class CheckEngine method checkSlotStack.
public int checkSlotStack(PointerPointer objectIndirect, J9VMThreadPointer vmThread, VoidPointer stackLocation) {
J9ObjectPointer object;
try {
object = J9ObjectPointer.cast(objectIndirect.at(0));
int result = checkObjectIndirect(object);
if (J9MODRON_GCCHK_RC_STACK_OBJECT == result) {
result = checkStackObject(object);
}
if (J9MODRON_GCCHK_RC_OK != result) {
CheckError error = new CheckError(vmThread, objectIndirect, stackLocation, _cycle, _currentCheck, result, _cycle.nextErrorCount());
_reporter.report(error);
return J9MODRON_SLOT_ITERATOR_RECOVERABLE_ERROR;
}
} catch (CorruptDataException e) {
// TODO : cde should be part of the error
CheckError error = new CheckError(vmThread, objectIndirect, stackLocation, _cycle, _currentCheck, J9MODRON_GCCHK_RC_CORRUPT_DATA_EXCEPTION, _cycle.nextErrorCount());
_reporter.report(error);
return J9MODRON_SLOT_ITERATOR_RECOVERABLE_ERROR;
}
return J9MODRON_SLOT_ITERATOR_OK;
}
use of com.ibm.j9ddr.vm29.pointer.PointerPointer in project openj9 by eclipse.
the class CheckEngine method checkSlotVMThread.
public int checkSlotVMThread(PointerPointer objectIndirect, VoidPointer objectIndirectBase, int objectType, int iteratorState) {
J9ObjectPointer object;
try {
object = J9ObjectPointer.cast(objectIndirect.at(0));
int result = checkObjectIndirect(object);
if ((GCVMThreadIterator.state_monitor_records == iteratorState) && (J9MODRON_GCCHK_RC_STACK_OBJECT == result)) {
result = checkStackObject(object);
}
if (J9MODRON_GCCHK_RC_OK != result) {
CheckError error = new CheckError(objectIndirectBase, objectIndirect, _cycle, _currentCheck, result, _cycle.nextErrorCount(), objectType);
_reporter.report(error);
}
} catch (CorruptDataException e) {
// TODO : cde should be part of the error
CheckError error = new CheckError(objectIndirectBase, objectIndirect, _cycle, _currentCheck, J9MODRON_GCCHK_RC_CORRUPT_DATA_EXCEPTION, _cycle.nextErrorCount(), objectType);
_reporter.report(error);
}
return J9MODRON_SLOT_ITERATOR_OK;
}
Aggregations