use of com.ibm.j9ddr.vm29.pointer.generated.OMR_VMThreadPointer in project openj9 by eclipse.
the class J9ThreadHelper method getVMThread.
public static J9VMThreadPointer getVMThread(J9ThreadPointer threadPointer) throws CorruptDataException {
J9VMThreadPointer vmThread = null;
OMR_VMThreadPointer omrVmThread = OMR_VMThreadPointer.cast(getTLS(threadPointer, J9RASHelper.getVM(DataType.getJ9RASPointer()).omrVM()._vmThreadKey()));
if (omrVmThread.isNull()) {
vmThread = J9VMThreadPointer.NULL;
} else {
vmThread = J9VMThreadPointer.cast(omrVmThread._language_vmthread());
}
return vmThread;
}
use of com.ibm.j9ddr.vm29.pointer.generated.OMR_VMThreadPointer in project openj9 by eclipse.
the class DTFJJavaSystemMonitor method getOwner.
public JavaThread getOwner() throws CorruptDataException {
JavaThread javaThread = null;
try {
J9ThreadPointer owner = monitor.owner();
if (!owner.isNull()) {
int vmThreadKey = DTFJContext.getVm().omrVM()._vmThreadKey().intValue() - 1;
OMR_VMThreadPointer omrVmThread = OMR_VMThreadPointer.cast(owner.tlsEA().at(vmThreadKey));
if (!omrVmThread.isNull()) {
javaThread = new DTFJJavaThread(J9VMThreadPointer.cast(omrVmThread._language_vmthread()));
}
}
} catch (Throwable t) {
throw J9DDRDTFJUtils.handleAsCorruptDataException(DTFJContext.getProcess(), t);
}
return javaThread;
}
Aggregations