diff options
Diffstat (limited to 'doc/vmintegration.texinfo')
-rw-r--r-- | doc/vmintegration.texinfo | 57 |
1 files changed, 53 insertions, 4 deletions
diff --git a/doc/vmintegration.texinfo b/doc/vmintegration.texinfo index 02c81b5cf..e7f85d088 100644 --- a/doc/vmintegration.texinfo +++ b/doc/vmintegration.texinfo @@ -12,7 +12,7 @@ This file contains important information you will need to know if you are going to write an interface between GNU Classpath and a Virtual Machine. -Copyright (C) 1998-2002, 2004, 2005 Free Software Foundation, Inc. +Copyright (C) 1998-2002, 2004, 2005, 2006 Free Software Foundation, Inc. @ifnotplaintext @dircategory GNU Libraries @@ -66,6 +66,7 @@ This document is incomplete, as we are still in alpha with the interface. * Classpath Hooks:: Hooks from Classpath to the VM * VM Hooks:: Hooks from the underlying VM to Classpath * JNI Implementation:: Hooking the VM to jni.h +* JVMTI Implementation:: Hooking the VM to jvmti.h * Miscellaneous VM Requirements:: @end menu @@ -1550,6 +1551,9 @@ of names of memory managers which manage the specified pool. @item @code{(getPeakUsage(String))} -- Returns a @code{java.lang.management.MemoryUsage} object for the peak usage level of the specified pool. +@item @code{(getType(String))} -- Returns a string containing +either @code{"HEAP"} or @code{"NON_HEAP"} which indicates the type of +memory used by the specified pool. @item @code{(getUsage(String))} -- Returns a @code{java.lang.management.MemoryUsage} object for the current usage level of the specified pool. @@ -1605,7 +1609,7 @@ number of milliseconds for which the garbage collector has run. @end itemize Note that each garbage collector is also a memory manager, and so an -implementation of the @xref{gnu.java.lang.management.VMMemoryManagerMXBeanImpl} +implementation of the @code{gnu.java.lang.management.VMMemoryManagerMXBeanImpl} methods for its name should also be provided. @node java.lang.management, Classpath Callbacks, gnu.java.lang.management, Classpath Hooks @@ -1648,6 +1652,26 @@ the group. @item @code{java.lang.ThreadGroup.removeThread(Thread)} Call this method from @code{Thread} when a @code{Thread} is stopped or destroyed. + +@item @code{gnu.java.lang.management.MemoryMXBeanImpl.fireThresholdExceededNotification(String, long, long, long, long)} +If the monitoring of memory usage thresholds is supported, this method +should be called when the normal usage of a memory pool crosses the +threshold, in order to emit a notification. Another notification +should not be emitted until there is an intermittent period where the +usage is again below the threshold. The parameters are the memory +pool name, the usage levels (init, used, committed and max) and the +number of times the threshold has been crossed. + +@item @code{gnu.java.lang.management.MemoryMXBeanImpl.fireCollectionThresholdExceededNotification(String, long, long, long, long)} +If the monitoring of memory usage thresholds is supported, this method +should be called when the usage of a memory pool after a garbage +collection cycle crosses the threshold, in order to emit a +notification. Another notification should not be emitted until there +is an intermittent period where the usage is again below the +threshold. The parameters are the memory pool name, the usage levels +(init, used, committed and max) and the number of times the threshold +has been crossed. + @end itemize @node VM Hooks, JNI Implementation, Classpath Hooks, Top @@ -1748,7 +1772,7 @@ reinitialize it yourself, there should be no harm. @end itemize -@node JNI Implementation, Miscellaneous VM Requirements, VM Hooks, Top +@node JNI Implementation, JVMTI Implementation, VM Hooks, Top @comment node-name, next, previous, up @chapter JNI Implementation @@ -1791,8 +1815,33 @@ be a sequence of field declarations. @end itemize +@node JVMTI Implementation, Miscellaneous VM Requirements, JNI Implementation, Top +@comment node-name, next, previous, up +@chapter JVMTI Implementation + +Classpath comes with its own implementation of @file{jvmti.h}. This +file can be customized by the VM in a few ways by defining macros that +affect the interpretation of the file. These macros are all intended +for use for use by a VM which uses GNU Classpath and which wants to +use a single copy of @file{jvmti.h} for both internal and external use. + +@itemize @bullet +@item _CLASSPATH_VM_JVMTI_TYPES_DEFINED +Some VMs like to define JVMTI ``object'' types in a special way. If +this macro is defined, the Classpath @file{jvmti.h} will avoid defining +these types. By default these types are defined in @file{jvmti.h}. +The full list of types and macros treated this way is: @samp{jthread}, +@samp{jthreadGroup}, @samp{jlocation}, and @samp{jrawMonitorID}. By +default @samp{jrawMonitorID} is defined as an opaque pointer which +must be defined by the VM. + +@item _CLASSPATH_JVMTIENV_CONTENTS +A VM can add fields to the @samp{jvmtiEnv} structure by defining this +to be a sequence of field declarations. + +@end itemize -@node Miscellaneous VM Requirements, , JNI Implementation, Top +@node Miscellaneous VM Requirements, , JVMTI Implementation, Top @comment node-name, next, previous, up @chapter Miscellaneous VM Requirements |