Search in sources :

Example 6 with IOSThread

use of com.ibm.j9ddr.corereaders.osthread.IOSThread in project openj9 by eclipse.

the class J9ThreadHelper method getThreadMap.

private static Map<Long, IOSThread> getThreadMap() throws CorruptDataException {
    Map<Long, IOSThread> thrMap = null;
    if (cachedThreads != null) {
        thrMap = cachedThreads.get();
    }
    if (thrMap != null) {
        return thrMap;
    }
    /*
		 * There was no cache of threads, populate a new one while we find the
		 * thread the caller wanted.
		 */
    thrMap = new TreeMap<Long, IOSThread>();
    for (IOSThread thread : DataType.getProcess().getThreads()) {
        thrMap.put(thread.getThreadId(), thread);
    }
    cachedThreads = new WeakReference<Map<Long, IOSThread>>(thrMap);
    return thrMap;
}
Also used : IOSThread(com.ibm.j9ddr.corereaders.osthread.IOSThread) TreeMap(java.util.TreeMap) Map(java.util.Map)

Aggregations

IOSThread (com.ibm.j9ddr.corereaders.osthread.IOSThread)6 DTFJCorruptDataException (com.ibm.j9ddr.view.dtfj.DTFJCorruptDataException)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 Properties (java.util.Properties)2 CorruptDataException (com.ibm.dtfj.image.CorruptDataException)1 DataUnavailable (com.ibm.dtfj.image.DataUnavailable)1 CorruptDataException (com.ibm.j9ddr.CorruptDataException)1 DataUnavailableException (com.ibm.j9ddr.DataUnavailableException)1 IOSStackFrame (com.ibm.j9ddr.corereaders.osthread.IOSStackFrame)1 DDRInteractiveCommandException (com.ibm.j9ddr.tools.ddrinteractive.DDRInteractiveCommandException)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 TreeMap (java.util.TreeMap)1