use of com.ibm.j9ddr.vm29.pointer.VoidPointer 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.VoidPointer in project openj9 by eclipse.
the class CheckJNIGlobalReferences method print.
@Override
public void print() {
try {
VoidPointer globalRefs = VoidPointer.cast(getJavaVM().jniGlobalReferences());
GCJNIGlobalReferenceIterator jniGlobalReferenceIterator = GCJNIGlobalReferenceIterator.from();
ScanFormatter formatter = new ScanFormatter(this, "jniGlobalReferences", globalRefs);
while (jniGlobalReferenceIterator.hasNext()) {
J9ObjectPointer slot = jniGlobalReferenceIterator.next();
if (slot.notNull()) {
formatter.entry(slot);
}
}
formatter.end("jniGlobalReferences", globalRefs);
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.pointer.VoidPointer 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.VoidPointer in project openj9 by eclipse.
the class CheckJNIWeakGlobalReferences method print.
@Override
public void print() {
try {
VoidPointer weakRefs = VoidPointer.cast(getJavaVM().jniWeakGlobalReferences());
GCJNIWeakGlobalReferenceIterator jniWeakGlobalReferenceIterator = GCJNIWeakGlobalReferenceIterator.from();
ScanFormatter formatter = new ScanFormatter(this, "jniWeakGlobalReferences", weakRefs);
while (jniWeakGlobalReferenceIterator.hasNext()) {
J9ObjectPointer slot = jniWeakGlobalReferenceIterator.next();
if (slot.notNull()) {
formatter.entry(slot);
}
}
formatter.end("jniWeakGlobalReferences", weakRefs);
} catch (CorruptDataException e) {
// TODO: handle exception
}
}
use of com.ibm.j9ddr.vm29.pointer.VoidPointer 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;
}
Aggregations