Search in sources :

Example 1 with OMR_VMThreadPointer

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;
}
Also used : OMR_VMThreadPointer(com.ibm.j9ddr.vm29.pointer.generated.OMR_VMThreadPointer) J9VMThreadPointer(com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer)

Example 2 with OMR_VMThreadPointer

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;
}
Also used : J9ThreadPointer(com.ibm.j9ddr.vm29.pointer.generated.J9ThreadPointer) OMR_VMThreadPointer(com.ibm.j9ddr.vm29.pointer.generated.OMR_VMThreadPointer) JavaThread(com.ibm.dtfj.java.JavaThread)

Aggregations

OMR_VMThreadPointer (com.ibm.j9ddr.vm29.pointer.generated.OMR_VMThreadPointer)2 JavaThread (com.ibm.dtfj.java.JavaThread)1 J9ThreadPointer (com.ibm.j9ddr.vm29.pointer.generated.J9ThreadPointer)1 J9VMThreadPointer (com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer)1