Java Code Examples for java.lang.management.ThreadMXBean#isThreadCpuTimeSupported()

The following examples show how to use java.lang.management.ThreadMXBean#isThreadCpuTimeSupported() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JvmThreadInstanceEntryImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadInstCpuTimeNs" variable.
 */
public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException {
    long l = 0;
    final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();

    try {
        if (tmb.isThreadCpuTimeSupported()) {
            l = tmb.getThreadCpuTime(info.getThreadId());
            log.debug("getJvmThreadInstCpuTimeNs", "Cpu time ns : " + l);

            //Cpu time measurement is disabled or the id is not valid.
            if(l == -1) l = 0;
        }
    } catch (UnsatisfiedLinkError e) {
        // XXX Revisit: catch TO BE EVENTUALLY REMOVED
        log.debug("getJvmThreadInstCpuTimeNs",
                  "Operation not supported: " + e);
    }
    return new Long(l);
}
 
Example 2
Source File: JvmThreadInstanceEntryImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadInstCpuTimeNs" variable.
 */
public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException {
    long l = 0;
    final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();

    try {
        if (tmb.isThreadCpuTimeSupported()) {
            l = tmb.getThreadCpuTime(info.getThreadId());
            log.debug("getJvmThreadInstCpuTimeNs", "Cpu time ns : " + l);

            //Cpu time measurement is disabled or the id is not valid.
            if(l == -1) l = 0;
        }
    } catch (UnsatisfiedLinkError e) {
        // XXX Revisit: catch TO BE EVENTUALLY REMOVED
        log.debug("getJvmThreadInstCpuTimeNs",
                  "Operation not supported: " + e);
    }
    return new Long(l);
}
 
Example 3
Source File: JvmThreadInstanceEntryImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadInstCpuTimeNs" variable.
 */
public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException {
    long l = 0;
    final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();

    try {
        if (tmb.isThreadCpuTimeSupported()) {
            l = tmb.getThreadCpuTime(info.getThreadId());
            log.debug("getJvmThreadInstCpuTimeNs", "Cpu time ns : " + l);

            //Cpu time measurement is disabled or the id is not valid.
            if(l == -1) l = 0;
        }
    } catch (UnsatisfiedLinkError e) {
        // XXX Revisit: catch TO BE EVENTUALLY REMOVED
        log.debug("getJvmThreadInstCpuTimeNs",
                  "Operation not supported: " + e);
    }
    return new Long(l);
}
 
Example 4
Source File: GetInternalThreads.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws Exception {
    long value = mbean.getInternalThreadCount();

    if (value < MIN_VALUE_FOR_PASS || value > MAX_VALUE_FOR_PASS) {
        throw new RuntimeException("Internal thread count " +
                                   "illegal value: " + value + " " +
                                   "(MIN = " + MIN_VALUE_FOR_PASS + "; " +
                                   "MAX = " + MAX_VALUE_FOR_PASS + ")");
    }

    System.out.println("Internal Thread Count = " + value);

    ThreadMXBean thread =
        ManagementFactory.getThreadMXBean();
    if (!thread.isThreadCpuTimeSupported()) {
        System.out.println("Thread Cpu Time is not supported.");
        return;
    }

    while(!testCPUTime()) {
        Thread.sleep(100);
    }
}
 
Example 5
Source File: JvmThreadInstanceEntryImpl.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadInstCpuTimeNs" variable.
 */
public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException {
    long l = 0;
    final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();

    try {
        if (tmb.isThreadCpuTimeSupported()) {
            l = tmb.getThreadCpuTime(info.getThreadId());
            log.debug("getJvmThreadInstCpuTimeNs", "Cpu time ns : " + l);

            //Cpu time measurement is disabled or the id is not valid.
            if(l == -1) l = 0;
        }
    } catch (UnsatisfiedLinkError e) {
        // XXX Revisit: catch TO BE EVENTUALLY REMOVED
        log.debug("getJvmThreadInstCpuTimeNs",
                  "Operation not supported: " + e);
    }
    return new Long(l);
}
 
Example 6
Source File: GetInternalThreads.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws Exception {
    long value = mbean.getInternalThreadCount();

    if (value < MIN_VALUE_FOR_PASS || value > MAX_VALUE_FOR_PASS) {
        throw new RuntimeException("Internal thread count " +
                                   "illegal value: " + value + " " +
                                   "(MIN = " + MIN_VALUE_FOR_PASS + "; " +
                                   "MAX = " + MAX_VALUE_FOR_PASS + ")");
    }

    System.out.println("Internal Thread Count = " + value);

    ThreadMXBean thread =
        ManagementFactory.getThreadMXBean();
    if (!thread.isThreadCpuTimeSupported()) {
        System.out.println("Thread Cpu Time is not supported.");
        return;
    }

    while(!testCPUTime()) {
        Thread.sleep(100);
    }
}
 
Example 7
Source File: GetInternalThreads.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws Exception {
    long value = mbean.getInternalThreadCount();

    if (value < MIN_VALUE_FOR_PASS || value > MAX_VALUE_FOR_PASS) {
        throw new RuntimeException("Internal thread count " +
                                   "illegal value: " + value + " " +
                                   "(MIN = " + MIN_VALUE_FOR_PASS + "; " +
                                   "MAX = " + MAX_VALUE_FOR_PASS + ")");
    }

    System.out.println("Internal Thread Count = " + value);

    ThreadMXBean thread =
        ManagementFactory.getThreadMXBean();
    if (!thread.isThreadCpuTimeSupported()) {
        System.out.println("Thread Cpu Time is not supported.");
        return;
    }

    while(!testCPUTime()) {
        Thread.sleep(100);
    }
}
 
Example 8
Source File: GetInternalThreads.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String[] args) throws Exception {
    long value = mbean.getInternalThreadCount();

    if (value < MIN_VALUE_FOR_PASS || value > MAX_VALUE_FOR_PASS) {
        throw new RuntimeException("Internal thread count " +
                                   "illegal value: " + value + " " +
                                   "(MIN = " + MIN_VALUE_FOR_PASS + "; " +
                                   "MAX = " + MAX_VALUE_FOR_PASS + ")");
    }

    System.out.println("Internal Thread Count = " + value);

    ThreadMXBean thread =
        ManagementFactory.getThreadMXBean();
    if (!thread.isThreadCpuTimeSupported()) {
        System.out.println("Thread Cpu Time is not supported.");
        return;
    }

    while(!testCPUTime()) {
        Thread.sleep(100);
    }
}
 
Example 9
Source File: ThreadDumpProvider.java    From TNT4J with Apache License 2.0 6 votes vote down vote up
@Override
public DumpCollection getDump() {
	Dump dump = new Dump("JavaThreadStack", this);

	ThreadMXBean tmbean = ManagementFactory.getThreadMXBean();
	boolean contentionSupported = tmbean.isThreadContentionMonitoringSupported()
			&& tmbean.isThreadContentionMonitoringEnabled();
	boolean cputSupported = tmbean.isThreadCpuTimeSupported() && tmbean.isThreadCpuTimeEnabled();
	dump.add("java.thread.contention.supported", contentionSupported);
	dump.add("java.thread.cpu.supported", cputSupported);

	long[] dead = tmbean.findMonitorDeadlockedThreads();
	dump.add("java.thread.deadlock.count", dead == null ? 0 : dead.length);

	long[] tids = tmbean.getAllThreadIds();
	ThreadInfo[] tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE);
	for (ThreadInfo ti : tinfos) {
		dump.add(ti.getThreadName() + "-" + ti.getThreadId(), ti);
	}
	return dump;
}
 
Example 10
Source File: JvmThreadInstanceEntryImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Getter for the "JvmThreadInstCpuTimeNs" variable.
 */
public Long getJvmThreadInstCpuTimeNs() throws SnmpStatusException {
    long l = 0;
    final ThreadMXBean tmb = JvmThreadingImpl.getThreadMXBean();

    try {
        if (tmb.isThreadCpuTimeSupported()) {
            l = tmb.getThreadCpuTime(info.getThreadId());
            log.debug("getJvmThreadInstCpuTimeNs", "Cpu time ns : " + l);

            //Cpu time measurement is disabled or the id is not valid.
            if(l == -1) l = 0;
        }
    } catch (UnsatisfiedLinkError e) {
        // XXX Revisit: catch TO BE EVENTUALLY REMOVED
        log.debug("getJvmThreadInstCpuTimeNs",
                  "Operation not supported: " + e);
    }
    return new Long(l);
}
 
Example 11
Source File: JvmThreadingImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Getter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public EnumJvmThreadCpuTimeMonitoring getJvmThreadCpuTimeMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadCpuTimeSupported()) {
        log.debug("getJvmThreadCpuTimeMonitoring",
                  "Unsupported ThreadCpuTimeMonitoring");
        return JvmThreadCpuTimeMonitoringUnsupported;
    }

    try {
        if(mbean.isThreadCpuTimeEnabled()) {
            log.debug("getJvmThreadCpuTimeMonitoring",
                  "Enabled ThreadCpuTimeMonitoring");
            return JvmThreadCpuTimeMonitoringEnabled;
        } else {
            log.debug("getJvmThreadCpuTimeMonitoring",
                      "Disabled ThreadCpuTimeMonitoring");
            return JvmThreadCpuTimeMonitoringDisabled;
        }
    }catch(UnsupportedOperationException e) {
        log.debug("getJvmThreadCpuTimeMonitoring",
                  "Newly unsupported ThreadCpuTimeMonitoring");

        return JvmThreadCpuTimeMonitoringUnsupported;
    }
}
 
Example 12
Source File: JvmThreadingImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

        // Not supported.
        log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 13
Source File: InvalidThreadID.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String argv[]) {

        ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
        int cnt = 0;
        long [] idArr = {0, -1, -2, (Long.MIN_VALUE + 1), Long.MIN_VALUE};

        if (mbean.isThreadCpuTimeSupported()) {
            for (int i = 0; i < idArr.length; i++) {
                try {
                    mbean.getThreadCpuTime(idArr[i]);
                    System.out.println("Test failed. IllegalArgumentException" +
                        " expected for ID = " + idArr[i]);
                } catch (IllegalArgumentException iae) {
                    cnt++;
                }
            }
            if (cnt != idArr.length) {
                throw new RuntimeException("Unexpected number of " +
                    "IllegalArgumentException = " + cnt +
                    " expected = " + idArr.length);
            }

            // CPU time for a non-existence thread
            long time = mbean.getThreadCpuTime(999999);
            if (time < 0 && time != -1) {
                throw new RuntimeException("Cpu time for thread 999999" +
                    " is invalid = " + time + " expected to be -1.");
            }
        }
        System.out.println("Test passed.");
    }
 
Example 14
Source File: JvmThreadingImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

        // Not supported.
        log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 15
Source File: JvmThreadingImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

        // Not supported.
        log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 16
Source File: InvalidThreadID.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String argv[]) {

        ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
        int cnt = 0;
        long [] idArr = {0, -1, -2, (Long.MIN_VALUE + 1), Long.MIN_VALUE};

        if (mbean.isThreadCpuTimeSupported()) {
            for (int i = 0; i < idArr.length; i++) {
                try {
                    mbean.getThreadCpuTime(idArr[i]);
                    System.out.println("Test failed. IllegalArgumentException" +
                        " expected for ID = " + idArr[i]);
                } catch (IllegalArgumentException iae) {
                    cnt++;
                }
            }
            if (cnt != idArr.length) {
                throw new RuntimeException("Unexpected number of " +
                    "IllegalArgumentException = " + cnt +
                    " expected = " + idArr.length);
            }

            // CPU time for a non-existence thread
            long time = mbean.getThreadCpuTime(999999);
            if (time < 0 && time != -1) {
                throw new RuntimeException("Cpu time for thread 999999" +
                    " is invalid = " + time + " expected to be -1.");
            }
        }
        System.out.println("Test passed.");
    }
 
Example 17
Source File: JvmThreadingImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Checker for the "JvmThreadCpuTimeMonitoring" variable.
 */
public void checkJvmThreadCpuTimeMonitoring(EnumJvmThreadCpuTimeMonitoring
                                            x)
    throws SnmpStatusException {

    //Can't be set externaly to unsupported state.
    if(JvmThreadCpuTimeMonitoringUnsupported.intValue() == x.intValue()) {
         log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Try to set to illegal unsupported value");
        throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
    }

    if ((JvmThreadCpuTimeMonitoringEnabled.intValue() == x.intValue()) ||
        (JvmThreadCpuTimeMonitoringDisabled.intValue() == x.intValue())) {

        // The value is a valid value. But is the feature supported?
        ThreadMXBean mbean = getThreadMXBean();
        if(mbean.isThreadCpuTimeSupported()) return;

        // Not supported.
        log.debug("checkJvmThreadCpuTimeMonitoring",
                  "Unsupported operation, can't set state");
        throw new
            SnmpStatusException(SnmpDefinitions.snmpRspInconsistentValue);
    }

    // Unknown value.
    log.debug("checkJvmThreadCpuTimeMonitoring",
              "unknown enum value ");
    throw new SnmpStatusException(SnmpDefinitions.snmpRspWrongValue);
}
 
Example 18
Source File: JvmThreadingImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Getter for the "JvmThreadCpuTimeMonitoring" variable.
 */
public EnumJvmThreadCpuTimeMonitoring getJvmThreadCpuTimeMonitoring()
    throws SnmpStatusException {

    ThreadMXBean mbean = getThreadMXBean();

    if(!mbean.isThreadCpuTimeSupported()) {
        log.debug("getJvmThreadCpuTimeMonitoring",
                  "Unsupported ThreadCpuTimeMonitoring");
        return JvmThreadCpuTimeMonitoringUnsupported;
    }

    try {
        if(mbean.isThreadCpuTimeEnabled()) {
            log.debug("getJvmThreadCpuTimeMonitoring",
                  "Enabled ThreadCpuTimeMonitoring");
            return JvmThreadCpuTimeMonitoringEnabled;
        } else {
            log.debug("getJvmThreadCpuTimeMonitoring",
                      "Disabled ThreadCpuTimeMonitoring");
            return JvmThreadCpuTimeMonitoringDisabled;
        }
    }catch(UnsupportedOperationException e) {
        log.debug("getJvmThreadCpuTimeMonitoring",
                  "Newly unsupported ThreadCpuTimeMonitoring");

        return JvmThreadCpuTimeMonitoringUnsupported;
    }
}
 
Example 19
Source File: InvalidThreadID.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String argv[]) {

        ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
        int cnt = 0;
        long [] idArr = {0, -1, -2, (Long.MIN_VALUE + 1), Long.MIN_VALUE};

        if (mbean.isThreadCpuTimeSupported()) {
            for (int i = 0; i < idArr.length; i++) {
                try {
                    mbean.getThreadCpuTime(idArr[i]);
                    System.out.println("Test failed. IllegalArgumentException" +
                        " expected for ID = " + idArr[i]);
                } catch (IllegalArgumentException iae) {
                    cnt++;
                }
            }
            if (cnt != idArr.length) {
                throw new RuntimeException("Unexpected number of " +
                    "IllegalArgumentException = " + cnt +
                    " expected = " + idArr.length);
            }

            // CPU time for a non-existence thread
            long time = mbean.getThreadCpuTime(999999);
            if (time < 0 && time != -1) {
                throw new RuntimeException("Cpu time for thread 999999" +
                    " is invalid = " + time + " expected to be -1.");
            }
        }
        System.out.println("Test passed.");
    }
 
Example 20
Source File: JavaInformations.java    From javamelody with Apache License 2.0 4 votes vote down vote up
public static List<ThreadInformations> buildThreadInformationsList() {
	final ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
	final Map<Thread, StackTraceElement[]> stackTraces = Thread.getAllStackTraces();
	final List<Thread> threads = new ArrayList<Thread>(stackTraces.keySet());

	// si "1.6.0_01".compareTo(Parameters.JAVA_VERSION) > 0;
	// on récupèrait les threads sans stack trace en contournant bug 6434648 avant 1.6.0_01
	// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6434648
	// hormis pour le thread courant qui obtient sa stack trace différemment sans le bug
	//		threads = getThreadsFromThreadGroups();
	//		final Thread currentThread = Thread.currentThread();
	//		stackTraces = Collections.singletonMap(currentThread, currentThread.getStackTrace());

	final boolean cpuTimeEnabled = threadBean.isThreadCpuTimeSupported()
			&& threadBean.isThreadCpuTimeEnabled();
	final long[] deadlockedThreads = getDeadlockedThreads(threadBean);
	final List<ThreadInformations> threadInfosList = new ArrayList<ThreadInformations>(
			threads.size());
	// hostAddress récupéré ici car il peut y avoir plus de 20000 threads
	final String hostAddress = Parameters.getHostAddress();
	for (final Thread thread : threads) {
		final StackTraceElement[] stackTraceElements = stackTraces.get(thread);
		final List<StackTraceElement> stackTraceElementList = stackTraceElements == null ? null
				: new ArrayList<StackTraceElement>(Arrays.asList(stackTraceElements));
		final long cpuTimeMillis;
		final long userTimeMillis;
		if (cpuTimeEnabled) {
			cpuTimeMillis = threadBean.getThreadCpuTime(thread.getId()) / 1000000;
			userTimeMillis = threadBean.getThreadUserTime(thread.getId()) / 1000000;
		} else {
			cpuTimeMillis = -1;
			userTimeMillis = -1;
		}
		final boolean deadlocked = deadlockedThreads != null
				&& Arrays.binarySearch(deadlockedThreads, thread.getId()) >= 0;
		// stackTraceElementList est une ArrayList et non unmodifiableList pour lisibilité xml
		threadInfosList.add(new ThreadInformations(thread, stackTraceElementList, cpuTimeMillis,
				userTimeMillis, deadlocked, hostAddress));
	}
	// on retourne ArrayList et non unmodifiableList pour lisibilité du xml par xstream
	return threadInfosList;
}