summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2006-12-25 23:58:51 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2006-12-25 23:58:51 +0000
commita850dd23822bd7a67e1f660f2cd056ea29852a81 (patch)
treec83b223da9ae04b27d8a9ea9ff6c108fc471d3ef /vm
parent767e9897197de5459970fe871cf4c2444fd63fff (diff)
downloadclasspath-a850dd23822bd7a67e1f660f2cd056ea29852a81.tar.gz
2006-12-25 Andrew John Hughes <gnu_andrew@member.fsf.org>
* doc/vmintegration.texinfo: Updated to match new threading bean API. * gnu/java/lang/management/ThreadMXBeanImpl.java: (MONITOR_SUPPORT): New constant for object monitor lock support property. (SYNCHRONIZER_SUPPORT): New constant for ownable synchronizer lock support property. (dumpAllThreads(boolean,boolean)): Implemented. (findDeadlockedThreads()): Likewise. (getThreadInfo(long[],boolean,boolean)): Likewise. (isObjectMonitorUsageSupported()): Likewise. (isSynchronizerUsageSupported()): Likewise. * java/lang/management/ThreadInfo.java: (ThreadInfo(Thread,long,long,Object,Thread,long, long,boolean,boolean,StackTraceElement[], MonitorInfo[], LockInfo[])): New constructor. (ThreadInfo(long,String,Thread.State,long,long, String,long,String,long,long,boolean,boolean, StackTraceElement[],MonitorInfo[], LockInfo[])): Likewise. (from(CompositeData)): Updated to handle new attributes. (getLockedMonitors()): Implemented. (getLockedSynchronizers()): Likewise. (getLockInfo()): Likewise. (getLockName()): Handle blocking as documented in 1.6 (getLockOwnerId()): Likewise. (getLockOwnerName()): Likewise. (toString()): Likewise. (isThreadBlocked()): Thread blocked check based on documented 1.6 semantics. * java/lang/management/ThreadMXBean.java: (dumpAllThreads(boolean,boolean)): Implemented. (findDeadlockedThreads()): Likewise. (getThreadInfo(long[],boolean,boolean)): Likewise. (isObjectMonitorUsageSupported()): Likewise. (isSynchronizerUsageSupported()): Likewise. * vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java: (findDeadlockedThreads()): New native method. (getLockInfo(ThreadInfo)): Likewise. (getMonitorInfo(ThreadInfo)): Likewise.
Diffstat (limited to 'vm')
-rw-r--r--vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java b/vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java
index c5bcb6310..1c061aa93 100644
--- a/vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java
+++ b/vm/reference/gnu/java/lang/management/VMThreadMXBeanImpl.java
@@ -60,6 +60,16 @@ final class VMThreadMXBeanImpl
/**
* Returns the ids of cycles of deadlocked threads, occurring
+ * due to monitor ownership or ownable synchronizer ownership.
+ * This will only be called if ownable synchronizer monitoring
+ * is supported.
+ *
+ * @return the ids of the deadlocked threads.
+ */
+ static native long[] findDeadlockedThreads();
+
+ /**
+ * Returns the ids of cycles of deadlocked threads, occurring
* due to monitor ownership.
*
* @return the ids of the deadlocked threads.
@@ -138,6 +148,25 @@ final class VMThreadMXBeanImpl
}
/**
+ * Fill out the given {@link ThreadInfo} object
+ * with ownable synchronizer usage information.
+ * This is only called if ownable synchronizer
+ * usage monitoring is supported.
+ *
+ * @param info the {@link ThreadInfo} object to modify.
+ */
+ static native void getLockInfo(ThreadInfo info);
+
+ /**
+ * Fill out the given {@link ThreadInfo} object
+ * with monitor usage information. This is only
+ * called if monitor usage monitoring is supported.
+ *
+ * @param info the {@link ThreadInfo} object to modify.
+ */
+ static native void getMonitorInfo(ThreadInfo info);
+
+ /**
* Returns the current peak number of live threads.
*
* @return the peak number of live threads.