Method Summary |
|
long[] | findMonitorDeadlockedThreads()
Finds cycles of threads that are in deadlock waiting to acquire and
object monitor. |
long[] | getAllThreadIds()
The ID of all currently live threads. |
long | getCurrentThreadCpuTime()
The total CPU time (in nanoseconds) for the current thread. |
long | getCurrentThreadUserTime()
The total user time (in nanoseconds) for the current thread. |
int | getDaemonThreadCount()
The current number of live daemon threads. |
int | getPeakThreadCount()
The peak number of live threads since JVM start or the last reset. |
int | getThreadCount()
The current number of live threads (daemon and non-daemon). |
long | getThreadCpuTime(long id)
The total CPU time (in nanoseconds) for the given thread.
Parameters: id - The ID of the thread to get the CPU time for. |
ThreadInfo | getThreadInfo(long id)
The thread information for the given thread with a stack trace depth of
zero.
Parameters: id - The ID of the thread to get information for. |
ThreadInfo[] | getThreadInfo(long[] ids)
The thread information for the given threads with a stack trace depth of
zero.
Parameters: ids - An array of IDs of the threads to get information for. |
ThreadInfo[] | getThreadInfo(long[] ids, int maxDepth)
The thread information for the given threads, which is qualified by a
maximum stack trace depth.
Parameters: ids - An array of IDs of the threads to get information for. Parameters: maxDepth - The maximum depth of the stack trace to return in theThreadInfo. |
ThreadInfo | getThreadInfo(long id, int maxDepth)
The thread information for the given thread with a stack trace depth of
zero.
Parameters: id - The ID of the thread to get information for. Parameters: maxDepth - The maximum depth of the stack trace to return in theThreadInfo. |
long | getThreadUserTime(long id)
The total user time (in nanoseconds) for the given thread.
Parameters: id - The ID of the thread to get the user time for. |
long | getTotalStartedThreadCount()
The total number of threads that have been created and started within the
JVM. |
boolean | isCurrentThreadCpuTimeSupported()
Indicates whether or not current thread CPU time monitoring is supported. |
boolean | isThreadContentionMonitoringEnabled()
Indicates whether or not thread contention monitoring is enabled. |
boolean | isThreadContentionMonitoringSupported()
Indicates whether or not thread contention monitoring is supported. |
boolean | isThreadCpuTimeEnabled()
Indicates whether or not thread CPU time monitoring is enabled. |
boolean | isThreadCpuTimeSupported()
Indicates whether or not thread CPU time monitoring is supported. |
void | resetPeakThreadCount()
Resets the peak thread count to the current thread count. |
void | setThreadContentionMonitoringEnabled(boolean enable)
Enables or disables thread contention monitoring. |
void | setThreadCpuTimeEnabled(boolean enable)
Enables or disables thread CPU time monitoring. |