Search in sources :

Example 1 with J9DDRStubImageThread

use of com.ibm.j9ddr.view.dtfj.image.J9DDRStubImageThread in project openj9 by eclipse.

the class DTFJJavaThread method getImageThread.

/* (non-Javadoc)
	 * @see com.ibm.dtfj.java.JavaThread#getImageThread()
	 */
public ImageThread getImageThread() throws CorruptDataException, DataUnavailable {
    if (imageThread == null) {
        J9DDRImageProcess imageProcess = DTFJContext.getImageProcess();
        try {
            long tid = thread.osThread().tid().longValue();
            imageThread = imageProcess.getThread(tid);
            // We could't match one of the "proper" ImageThreads - so we'll return a stub image thread instead.
            if (null == imageThread) {
                imageThread = new J9DDRStubImageThread(DTFJContext.getProcess(), tid);
            }
        } catch (Throwable t) {
            throw J9DDRDTFJUtils.handleAsCorruptDataException(DTFJContext.getProcess(), t);
        }
    }
    return imageThread;
}
Also used : J9DDRStubImageThread(com.ibm.j9ddr.view.dtfj.image.J9DDRStubImageThread) J9DDRImageProcess(com.ibm.j9ddr.view.dtfj.image.J9DDRImageProcess)

Aggregations

J9DDRImageProcess (com.ibm.j9ddr.view.dtfj.image.J9DDRImageProcess)1 J9DDRStubImageThread (com.ibm.j9ddr.view.dtfj.image.J9DDRStubImageThread)1