This patch makes the documentation include the new VM interfaces for the bean.
Changelog:
2006-07-01 Andrew John Hughes <[EMAIL PROTECTED]>
* NEWS:
Mention threading bean and getState().
* doc/vmintegration.texinfo:
Update documentation for threading bean and new
method of VMThread.
--
Andrew :-)
Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
If you use Microsoft Office, support movement towards the end of vendor lock-in:
http://opendocumentfellowship.org/petition/
"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: NEWS
===================================================================
RCS file: /cvsroot/classpath/classpath/NEWS,v
retrieving revision 1.152
diff -u -3 -p -u -r1.152 NEWS
--- NEWS 25 Jun 2006 00:52:34 -0000 1.152
+++ NEWS 1 Jul 2006 15:32:00 -0000
@@ -54,6 +54,13 @@ Runtime interface changes:
are currently loaded, how many have been unloaded and whether
verbose class loading output is on or off. Provision should also
be made for the latter to be toggled at runtime.
+* VMThreadMXBeanImpl is used to implement the low-level support
+ of the thread management bean. Providing this interface requires
+ providing a fair amount of information about threads, including
+ optional time and contention monitoring, and instances of the
+ new ThreadInfo class in java.lang.management. getState() has also
+ been added to the VMThread interface; this is required by the bean
+ as well as java.lang.Thread.
New in release 0.91 (May 15, 2006)
Index: doc/vmintegration.texinfo
===================================================================
RCS file: /cvsroot/classpath/classpath/doc/vmintegration.texinfo,v
retrieving revision 1.30
diff -u -3 -p -u -r1.30 vmintegration.texinfo
--- doc/vmintegration.texinfo 25 Jun 2006 00:52:34 -0000 1.30
+++ doc/vmintegration.texinfo 1 Jul 2006 15:32:03 -0000
@@ -705,6 +705,9 @@ to allow the setting to flow down to the
@item @code{nativeStop(Throwable)} -- The VM should stop the thread abnormally
and throw the specified exception. This is clearly deprecated, due to the
ambiguous state an abruptly-stopped thread may leave.
[EMAIL PROTECTED] @code{getState()} -- Returns the VM's impression of the
current state
+of the thread. The applicable states are supplied by the @code{State}
+enumeration in @code{java.lang.Thread}.
@end itemize
@item Mandatory Class Methods
@itemize @bullet
@@ -1268,6 +1271,7 @@ implementations of the management beans.
@menu
* gnu.java.lang.management.VMRuntimeMXBeanImpl::
* gnu.java.lang.management.VMClassLoadingMXBeanImpl::
+* gnu.java.lang.management.VMThreadMXBeanImpl::
@end menu
@node
gnu.java.lang.management.VMRuntimeMXBeanImpl,gnu.java.lang.management.VMClassLoadingMXBeanImpl,,gnu.java.lang.management
@@ -1312,7 +1316,7 @@ The virtual machine also needs to provid
property in order to support the optional boot class path
retrieval functionality.
[EMAIL PROTECTED]
gnu.java.lang.management.VMClassLoadingMXBeanImpl,,gnu.java.lang.management.VMRuntimeMXBeanImpl,gnu.java.lang.management
[EMAIL PROTECTED]
gnu.java.lang.management.VMClassLoadingMXBeanImpl,gnu.java.lang.management.VMThreadMXBeanImpl,gnu.java.lang.management.VMRuntimeMXBeanImpl,gnu.java.lang.management
@subsection @code{gnu.java.lang.management.VMClassLoadingMXBeanImpl}
The @code{gnu.java.lang.management.ClassLoadingMXBeanImpl} provides an
@@ -1339,6 +1343,97 @@ output is turned or not, respectively.
verbose class loading output to be turned on and off.
@end itemize
[EMAIL PROTECTED]
gnu.java.lang.management.VMThreadMXBeanImpl,,gnu.java.lang.management.VMClassLoadingMXBeanImpl,gnu.java.lang.management
[EMAIL PROTECTED] @code{gnu.java.lang.management.VMThreadMXBeanImpl}
+
+The @code{gnu.java.lang.management.ThreadMXBeanImpl} provides an
+implementation of the @code{java.lang.management.ThreadMXBean} interface,
+and is supported by VM functionality in the form of
[EMAIL PROTECTED] This provides a
+series of methods, which should be implemented by the virtual machine
+in order to provide the required information for the bean. Implementing
+this bean requires the VM to monitor thread-related statistics such as
+how often the blocked and waiting states have been entered, as well as
+additional optional support for time and contention monitoring.
+
+Optional support is determined by the following properties:
+
[EMAIL PROTECTED] @bullet
[EMAIL PROTECTED] @code{gnu.java.lang.management.CurrentThreadTimeSupport} --
+This property should be present if the VM supports monitoring the
+time used by the current thread. If time monitoring for all threads
+is supported, this need not be provided.
[EMAIL PROTECTED] @code{gnu.java.lang.management.ThreadTimeSupport} --
+This property should be present if the VM supports monitoring the
+time used by all threads.
[EMAIL PROTECTED] @code{gnu.java.lang.management.ThreadContentionSupport} --
+This property should be present if the VM supports thread contention
+monitoring.
[EMAIL PROTECTED] itemize
+
+In addition, the property
[EMAIL PROTECTED] may be
+set to the @code{String} value, @code{"true"}, if time monitoring
+is enabled at startup.
+
+The methods are as follows:
+
[EMAIL PROTECTED] @bullet
[EMAIL PROTECTED] @code{(findMonitorDeadlockedThreads())} -- This should return
+an array of thread identifiers which match threads involved in
+deadlock cycles (where each thread is waiting to obtain a lock
+held by one of the others). This is specified as a native method
+in the reference implementation.
[EMAIL PROTECTED] @code{(getAllThreads())} -- This should return an array of
+all live threads and set the @code{filled} variable to the number
+found. A default implementation is provided.
[EMAIL PROTECTED] @code{(getAllThreadIds())} -- This should return an array of
+all live thread identifiers. An implementation is provided against
[EMAIL PROTECTED]()} by default.
[EMAIL PROTECTED] @code{(getCurrentThreadCpuTime())} -- This should return the
+approximate number of nanoseconds of CPU time the current thread
+has used. This is an optional native method, which is used by VMs
+supporting time monitoring.
[EMAIL PROTECTED] @code{(getCurrentThreadUserTime())} -- This should return the
+approximate number of nanoseconds of user time the current thread
+has used. This is an optional native method, which is used by VMs
+supporting time monitoring.
[EMAIL PROTECTED] @code{(getDaemonThreadCount())} -- This should return the
number
+of live daemon threads. A default implementation is provided, based
+on @code{getAllThreads()}.
[EMAIL PROTECTED] @code{(getPeakThreadCount())} -- The VM should maintain a
record
+of the peak number of live threads, and return it when this method is
+called. This is specified as a native method in the reference
+implementation.
[EMAIL PROTECTED] @code{(resetPeakThreadCount())} -- This should reset the
record
+of the peak number of live threads to the current number of live
+threads. This is specified as a native method in the reference
+implementation.
[EMAIL PROTECTED] @code{(getThreadCount())} -- This should return the number of
+live threads. A default implementation is provided, based on
[EMAIL PROTECTED]()}.
[EMAIL PROTECTED] @code{(getThreadCpuTime(long))} -- This should return the
+approximate number of nanoseconds of CPU time the specified thread
+has used. This is an optional native method, which is used by VMs
+supporting time monitoring.
[EMAIL PROTECTED] @code{(getThreadUserTime(long))} -- This should return the
+approximate number of nanoseconds of CPU time the specified thread
+has used. This is an optional native method, which is used by VMs
+supporting time monitoring.
[EMAIL PROTECTED] @code{(getThreadInfoForId(long, int))} -- This return an
instance
+of @code{java.lang.management.ThreadInfo} for the specified thread.
+The class includes a private constructor which VMs should use to initialise
+it with the appropriate values for the thread. The second argument
+given here specifies the depth of the stack trace supplied on construction
+of the instance. Special values are 0 (return an empty array) and
[EMAIL PROTECTED] (return the maximum depth possible). This
+is specified as a native method in the reference implementation.
[EMAIL PROTECTED] @code{(getTotalStartedThreadCount())} -- This should return
the
+total number of threads that have been started by the VM, including ones
+that have died. This is specified as a native method in the reference
+implementation.
[EMAIL PROTECTED] itemize
+
@node Classpath Callbacks, , gnu.java.lang.management, Classpath Hooks
Some of the classes you implement for the VM will need to call back to
package-private methods in Classpath:
signature.asc
Description: Digital signature
