use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer 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.generated.J9ObjectPointer 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.generated.J9ObjectPointer 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.generated.J9ObjectPointer 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;
}
use of com.ibm.j9ddr.vm29.pointer.generated.J9ObjectPointer in project openj9 by eclipse.
the class J9ObjectFieldFormatter method postFormat.
@Override
public FormatWalkResult postFormat(String name, String type, String declaredType, int typeCode, long address, PrintStream out, Context context, IStructureFormatter structureFormatter) throws CorruptDataException {
if (typeCode == TYPE_STRUCTURE_POINTER && StructureCommandUtil.typeToCommand(type).equals("!j9object")) {
PointerPointer slotPtr = PointerPointer.cast(address);
J9ObjectPointer object = J9ObjectPointer.cast(slotPtr.at(0));
if (object.isNull()) {
return FormatWalkResult.KEEP_WALKING;
}
J9ClassPointer clazz = J9ObjectHelper.clazz(object);
out.print(" // ");
if (J9ClassHelper.isArrayClass(clazz)) {
out.print(J9ClassHelper.getArrayName(clazz));
} else {
out.print(J9ClassHelper.getName(clazz));
}
}
return FormatWalkResult.KEEP_WALKING;
}
Aggregations