0N/A<?xml version="1.0" encoding="ISO-8859-1"?>
0N/A<?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
0N/A<!--
1988N/A Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
0N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A
0N/A This code is free software; you can redistribute it and/or modify it
0N/A under the terms of the GNU General Public License version 2 only, as
0N/A published by the Free Software Foundation.
0N/A
0N/A This code is distributed in the hope that it will be useful, but WITHOUT
0N/A ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A version 2 for more details (a copy is included in the LICENSE file that
0N/A accompanied this code).
0N/A
0N/A You should have received a copy of the GNU General Public License version
0N/A 2 along with this work; if not, write to the Free Software Foundation,
0N/A Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A
1472N/A Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A or visit www.oracle.com if you need additional information or have any
1472N/A questions.
0N/A
0N/A-->
0N/A
0N/A<!DOCTYPE specification [
0N/A <!ELEMENT specification (title, intro*, functionsection, errorsection,
0N/A eventsection, datasection, issuessection, changehistory)>
0N/A <!ATTLIST specification label CDATA #REQUIRED
0N/A majorversion CDATA #REQUIRED
0N/A minorversion CDATA #REQUIRED
0N/A microversion CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT title (#PCDATA|jvmti|tm)*>
0N/A <!ATTLIST title subtitle CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT intro ANY>
0N/A <!ATTLIST intro id CDATA #IMPLIED
0N/A label CDATA "">
0N/A
0N/A <!ELEMENT functionsection (intro*, category*)>
0N/A <!ATTLIST functionsection label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT category ((intro|typedef|uniontypedef|capabilitiestypedef)*,
0N/A (function|callback|elide)*)>
0N/A <!ATTLIST category id CDATA #REQUIRED
0N/A label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT function (synopsis, typedef*, description?, origin,
0N/A (capabilities|eventcapabilities),
0N/A parameters, errors)>
0N/A <!ATTLIST function id CDATA #REQUIRED
0N/A num CDATA #REQUIRED
0N/A phase (onload|onloadOnly|start|live|any) #IMPLIED
0N/A callbacksafe (safe|unsafe) #IMPLIED
0N/A impl CDATA #IMPLIED
0N/A hide CDATA #IMPLIED
0N/A jkernel (yes|no) #IMPLIED
0N/A since CDATA "1.0">
0N/A
0N/A <!ELEMENT callback ((jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|jthreadGroup|jobject|
0N/A jvalue|enum|jint|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void),
0N/A synopsis, description?, parameters)>
0N/A <!ATTLIST callback id CDATA #REQUIRED
0N/A since CDATA "1.0">
0N/A
0N/A <!ELEMENT synopsis (#PCDATA|jvmti)*>
0N/A
0N/A <!ELEMENT typedef (description?, field*)>
0N/A <!ATTLIST typedef id CDATA #REQUIRED
0N/A label CDATA #REQUIRED
0N/A since CDATA "1.0">
0N/A
0N/A <!ELEMENT uniontypedef (description?, field*)>
0N/A <!ATTLIST uniontypedef id CDATA #REQUIRED
0N/A label CDATA #REQUIRED
0N/A since CDATA "1.0">
0N/A
0N/A <!ELEMENT field ((jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|jthreadGroup|jobject|
0N/A jvalue|enum|jint|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|allocfieldbuf|inptr|inbuf|outbuf|vmbuf|ptrtype|struct),
0N/A description)>
0N/A <!ATTLIST field id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT capabilitiestypedef (description?, capabilityfield*)>
0N/A <!ATTLIST capabilitiestypedef id CDATA #REQUIRED
0N/A label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT capabilityfield (description)>
0N/A <!ATTLIST capabilityfield id CDATA #REQUIRED
0N/A disp1 CDATA ""
0N/A disp2 CDATA ""
0N/A since CDATA "1.0">
0N/A
0N/A <!ELEMENT description ANY>
0N/A
0N/A <!ELEMENT capabilities (required*, capability*)>
0N/A
0N/A <!ELEMENT eventcapabilities EMPTY>
0N/A
0N/A <!ELEMENT required ANY>
0N/A <!ATTLIST required id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT capability ANY>
0N/A <!ATTLIST capability id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT parameters (param*)>
0N/A
0N/A <!ELEMENT param ((jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|jthreadGroup|jobject|
0N/A jvalue|enum|jint|jlong|jfloat|jdouble|jlocation|jboolean|char|uchar|size_t|void|varargs|struct|ptrtype|
0N/A outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf),
0N/A description)>
0N/A <!ATTLIST param id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT jmethodID EMPTY>
0N/A <!ATTLIST jmethodID class CDATA #IMPLIED
0N/A native CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT jfieldID EMPTY>
0N/A <!ATTLIST jfieldID class CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT jclass EMPTY>
0N/A <!ATTLIST jclass method CDATA #IMPLIED
0N/A field CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT jframeID EMPTY>
0N/A <!ATTLIST jframeID thread CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT jrawMonitorID EMPTY>
0N/A
0N/A <!ELEMENT jthread EMPTY>
0N/A <!ATTLIST jthread started CDATA #IMPLIED
0N/A null CDATA #IMPLIED
0N/A frame CDATA #IMPLIED
0N/A impl CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT varargs EMPTY>
0N/A
0N/A <!ELEMENT jthreadGroup EMPTY>
0N/A <!ELEMENT jobject EMPTY>
0N/A <!ELEMENT jvalue EMPTY>
0N/A <!ELEMENT jchar EMPTY>
0N/A <!ELEMENT jint EMPTY>
0N/A <!ATTLIST jint min CDATA #IMPLIED>
0N/A <!ELEMENT jlong EMPTY>
0N/A <!ELEMENT jfloat EMPTY>
0N/A <!ELEMENT jdouble EMPTY>
0N/A <!ELEMENT jlocation EMPTY>
0N/A <!ELEMENT jboolean EMPTY>
0N/A <!ELEMENT char EMPTY>
0N/A <!ELEMENT uchar EMPTY>
0N/A <!ELEMENT size_t EMPTY>
0N/A <!ELEMENT void EMPTY>
0N/A <!ELEMENT enum (#PCDATA)*>
0N/A <!ELEMENT struct (#PCDATA)*>
0N/A
0N/A <!ELEMENT nullok ANY>
0N/A
0N/A <!ELEMENT ptrtype ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue), nullok?)>
0N/A
0N/A <!ELEMENT outptr ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jchar|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void), nullok?)>
0N/A
0N/A <!ELEMENT allocbuf ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void), nullok?)>
0N/A <!ATTLIST allocbuf incount CDATA #IMPLIED
0N/A outcount CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT allocallocbuf ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void), nullok?)>
0N/A <!ATTLIST allocallocbuf incount CDATA #IMPLIED
0N/A outcount CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT inptr (struct, nullok?)>
0N/A
0N/A <!ELEMENT inbuf ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void), nullok?)>
0N/A <!ATTLIST inbuf incount CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT outbuf ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void|outbuf), nullok?)>
0N/A <!ATTLIST outbuf incount CDATA #IMPLIED
0N/A outcount CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT vmbuf ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jchar|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void), nullok?)>
0N/A <!ATTLIST vmbuf incount CDATA #IMPLIED
0N/A outcount CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT agentbuf ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void), nullok?)>
0N/A <!ATTLIST agentbuf incount CDATA #IMPLIED
0N/A outcount CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT allocfieldbuf ((struct|jmethodID|jfieldID|jframeID|jrawMonitorID|jclass|jthread|
0N/A jthreadGroup|jobject|jvalue|enum|jint|jlong|jfloat|jdouble|
0N/A jlocation|jboolean|char|uchar|size_t|void))>
0N/A <!ATTLIST allocfieldbuf outcount CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT errors (error*)>
0N/A
0N/A <!ELEMENT error ANY>
0N/A <!ATTLIST error id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT errorsection (intro*, errorcategory*)>
0N/A <!ATTLIST errorsection label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT errorcategory (intro*, errorid*)>
0N/A <!ATTLIST errorcategory id CDATA #REQUIRED
0N/A label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT errorid ANY>
0N/A <!ATTLIST errorid id CDATA #REQUIRED
0N/A num CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT datasection (intro*, basetypes*)>
0N/A
0N/A <!ELEMENT basetypes (intro*, basetype*)>
0N/A <!ATTLIST basetypes id CDATA #REQUIRED
0N/A label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT basetype (definition?,description)>
0N/A <!ATTLIST basetype id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT definition (#PCDATA|jvmti)*>
0N/A
0N/A <!ELEMENT eventsection (intro*, (event|elide)*)>
0N/A <!ATTLIST eventsection label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT event (description, origin, typedef*, capabilities, parameters)>
0N/A <!ATTLIST event id CDATA #REQUIRED
0N/A label CDATA #REQUIRED
0N/A const CDATA #REQUIRED
0N/A num CDATA #REQUIRED
0N/A phase (onload|start|live|any) #IMPLIED
0N/A filtered (thread|global) #IMPLIED
0N/A since CDATA "1.0">
0N/A
0N/A <!ELEMENT issuessection (intro*)>
0N/A <!ATTLIST issuessection label CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT changehistory (intro*, change*)>
0N/A <!ATTLIST changehistory update CDATA #REQUIRED
0N/A id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT change ANY>
0N/A <!ATTLIST change date CDATA #REQUIRED
0N/A version CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT functionlink (#PCDATA|jvmti|code|i|b)*>
0N/A <!ATTLIST functionlink id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT datalink (#PCDATA|jvmti|code|i|b)*>
0N/A <!ATTLIST datalink id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT typelink (#PCDATA|jvmti|code|i|b)*>
0N/A <!ATTLIST typelink id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT fieldlink (#PCDATA|jvmti|code|i|b)*>
0N/A <!ATTLIST fieldlink id CDATA #REQUIRED
0N/A struct CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT paramlink (#PCDATA|jvmti|code|i|b)*>
0N/A <!ATTLIST paramlink id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT eventlink (#PCDATA|jvmti|code|i|b)*>
0N/A <!ATTLIST eventlink id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT errorlink (#PCDATA|jvmti|code|i|b|tm)*>
0N/A <!ATTLIST errorlink id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT externallink (#PCDATA|jvmti|code|i|b|tm)*>
0N/A <!ATTLIST externallink id CDATA #REQUIRED>
0N/A
2427N/A <!ELEMENT vmspec EMPTY>
2427N/A <!ATTLIST vmspec chapter CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT internallink (#PCDATA|jvmti|code|i|b)*>
0N/A <!ATTLIST internallink id CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT functionphaselist EMPTY>
0N/A <!ATTLIST functionphaselist phase (onload|onloadOnly|start|live|any) #REQUIRED>
0N/A
0N/A <!ELEMENT eventphaselist EMPTY>
0N/A <!ATTLIST eventphaselist phase (onload|start|live|any) #REQUIRED>
0N/A
0N/A <!ELEMENT issue ANY>
0N/A
0N/A <!ELEMENT rationale ANY>
0N/A
0N/A <!ELEMENT todo ANY>
0N/A
0N/A <!ELEMENT origin (#PCDATA)*>
0N/A
0N/A <!ELEMENT elide (intro|function|callback|event)*>
0N/A <!ATTLIST elide why CDATA #IMPLIED>
0N/A
0N/A <!ELEMENT constants (constant*)>
0N/A <!ATTLIST constants id CDATA #REQUIRED
0N/A label CDATA #REQUIRED
0N/A kind (enum|bits|const) #REQUIRED
0N/A since CDATA "1.0">
0N/A
0N/A <!ELEMENT constant ANY>
0N/A <!ATTLIST constant id CDATA #REQUIRED
0N/A num CDATA #REQUIRED>
0N/A
0N/A <!ELEMENT tm (#PCDATA)>
0N/A
0N/A <!ELEMENT i (#PCDATA|jvmti|tm)*>
0N/A
0N/A <!ELEMENT b (#PCDATA|jvmti|code)*>
0N/A
0N/A <!ELEMENT code (#PCDATA|space)*>
0N/A
0N/A <!ELEMENT pre ANY>
0N/A
0N/A <!ELEMENT space EMPTY>
0N/A
0N/A <!ELEMENT jvmti EMPTY>
0N/A
0N/A <!ELEMENT example (#PCDATA|i)*>
0N/A
0N/A <!ELEMENT br EMPTY>
0N/A
0N/A <!ELEMENT p EMPTY>
0N/A
0N/A <!ELEMENT dl (dt|dd)+>
0N/A
0N/A <!ELEMENT dd ANY>
0N/A
0N/A <!ELEMENT dt (#PCDATA|jvmti|code|i|b)*>
0N/A
0N/A <!ELEMENT table (tr)+>
0N/A
0N/A <!ELEMENT tr (td|th)*>
0N/A
0N/A <!ELEMENT td ANY>
0N/A <!ATTLIST td align (left|right|center) "center">
0N/A
0N/A <!ELEMENT th ANY>
0N/A <!ATTLIST th align (left|right|center) "center">
0N/A
0N/A <!ELEMENT ul (li)+>
0N/A <!ATTLIST ul type (disc|circle|square) "disc">
0N/A
0N/A <!ELEMENT li ANY>
0N/A ]>
0N/A
0N/A<specification label="JVM(TM) Tool Interface"
0N/A majorversion="1"
1895N/A minorversion="2"
1895N/A microversion="1">
0N/A <title subtitle="Version">
0N/A <tm>JVM</tm> Tool Interface
0N/A </title>
0N/A
0N/A <intro id="whatIs" label="What is the JVM Tool Interface?">
0N/A The <tm>JVM</tm> Tool Interface (<jvmti/>)
0N/A is a programming interface used by development and monitoring tools.
0N/A It provides both a way to inspect the state and
0N/A to control the execution of applications running in the
0N/A <tm>Java</tm> virtual machine (VM).
0N/A <p/>
0N/A <jvmti/> is intended to provide a VM interface for the full breadth of tools
0N/A that need access to VM state, including but not limited to: profiling,
0N/A debugging, monitoring, thread analysis, and coverage analysis tools.
0N/A <p/>
0N/A <jvmti/> may not be available in all implementations of the <tm>Java</tm> virtual
0N/A machine.
0N/A <p/>
0N/A <jvmti/> is a two-way interface.
0N/A A client of <jvmti/>, hereafter called an <i>agent</i>,
0N/A can be notified of
0N/A interesting occurrences through <internallink id="EventSection">events</internallink>.
0N/A <jvmti/>
0N/A can query and control the application through many
0N/A <internallink id="FunctionSection">functions</internallink>,
0N/A either in response to events or
0N/A independent of them.
0N/A <p/>
0N/A Agents run in the same process with and communicate directly with
0N/A the virtual machine executing
0N/A the application being examined. This communication is
0N/A through a native interface (<jvmti/>). The native in-process interface allows
0N/A maximal control with minimal intrusion on the part of a tool.
0N/A Typically, agents are relatively compact. They can be controlled
0N/A by a separate process which implements the bulk of a tool's
0N/A function without interfering with the target application's normal execution.
0N/A </intro>
0N/A
0N/A <intro id="architecture" label="Architecture">
0N/A Tools can be written directly to <jvmti/> or indirectly
0N/A through higher level interfaces.
0N/A The Java Platform Debugger Architecture includes <jvmti/>, but also
0N/A contains higher-level, out-of-process debugger interfaces. The higher-level
0N/A interfaces are more appropriate than <jvmti/> for many tools.
0N/A For more information on the Java Platform Debugger Architecture,
0N/A see the
0N/A <externallink id="http://java.sun.com/products/jpda/">Java
0N/A Platform Debugger Architecture website</externallink>.
0N/A </intro>
0N/A
0N/A <intro id="writingAgents" label="Writing Agents">
0N/A Agents can be written in any native language that supports C
0N/A language calling conventions and C or C++
0N/A definitions.
0N/A <p/>
0N/A The function, event, data type, and constant definitions needed for
0N/A using <jvmti/> are defined in the include file <code>jvmti.h</code>.
0N/A To use these definitions add the <tm>J2SE</tm> include directory
0N/A to your include path and add
0N/A <example>
0N/A#include &lt;jvmti.h&gt;
0N/A </example>
0N/A to your source code.
0N/A </intro>
0N/A
0N/A <intro id="deployingAgents" label="Deploying Agents">
0N/A An agent is deployed in a platform specific manner but is typically the
0N/A platform equivalent of a dynamic library. On the <tm>Windows</tm> operating
0N/A system, for example, an agent library is a "Dynamic Linked Library" (DLL).
0N/A On the <tm>Solaris</tm> Operating Environment, an agent library is a shared
0N/A object (<code>.so</code> file).
0N/A <p/>
0N/A An agent may be started at VM startup by specifying the agent library
0N/A name using a <internallink id="starting">command line option</internallink>.
0N/A Some implementations may support a mechanism to <internallink id="onattach">
0N/A start agents</internallink> in the live <functionlink id="GetPhase">phase</functionlink>.
0N/A The details of how this is initiated are implementation specific.
0N/A </intro>
0N/A
0N/A <intro id="starting" label="Agent Command Line Options">
0N/A The term "command-line option" is used below to
0N/A mean options supplied in the <code>JavaVMInitArgs</code> argument
0N/A to the <code>JNI_CreateJavaVM</code> function of the JNI
0N/A Invocation API.
0N/A <p/>
0N/A One of the two following
0N/A command-line options is used on VM startup to
0N/A properly load and run agents.
0N/A These arguments identify the library containing
0N/A the agent as well as an options
0N/A string to be passed in at startup.
0N/A <dl>
0N/A <dt><code>-agentlib:</code><i>&lt;agent-lib-name&gt;</i><code>=</code><i>&lt;options&gt;</i></dt>
0N/A <dd>
0N/A The name following <code>-agentlib:</code> is the name of the
0N/A library to load. Lookup of the library, both its full name and location,
0N/A proceeds in a platform-specific manner.
0N/A Typically, the <i>&lt;agent-lib-name&gt;</i> is expanded to an
0N/A operating system specific file name.
0N/A The <i>&lt;options&gt;</i> will be passed to the agent on start-up.
0N/A For example, if the option
0N/A <code>-agentlib:foo=opt1,opt2</code> is specified, the VM will attempt to
0N/A load the shared library <code>foo.dll</code> from the system <code>PATH</code>
0N/A under <tm>Windows</tm> or <code>libfoo.so</code> from the
0N/A <code>LD_LIBRARY_PATH</code> under the <tm>Solaris</tm> operating environment.
0N/A </dd>
0N/A <dt><code>-agentpath:</code><i>&lt;path-to-agent&gt;</i><code>=</code><i>&lt;options&gt;</i></dt>
0N/A <dd>
0N/A The path following <code>-agentpath:</code> is the absolute path from which
0N/A to load the library.
0N/A No library name expansion will occur.
0N/A The <i>&lt;options&gt;</i> will be passed to the agent on start-up.
0N/A For example, if the option
0N/A <code>-agentpath:c:\myLibs\foo.dll=opt1,opt2</code> is specified, the VM will attempt to
0N/A load the shared library <code>c:\myLibs\foo.dll</code>.
0N/A </dd>
0N/A </dl>
0N/A The start-up routine <internallink id="onload"><code>Agent_OnLoad</code></internallink>
0N/A in the library will be invoked.
0N/A <p/>
0N/A Libraries loaded with <code>-agentlib:</code> or <code>-agentpath:</code>
0N/A will be searched for JNI native method implementations to facilitate the
0N/A use of Java programming language code in tools, as is needed for
0N/A <internallink id="bci">bytecode instrumentation</internallink>.
0N/A <p/>
0N/A The agent libraries will be searched after all other libraries have been
0N/A searched (agents wishing to override or intercept the native method
0N/A implementations of non-agent methods can use the
0N/A <eventlink id="NativeMethodBind">NativeMethodBind event</eventlink>).
0N/A <p/>
0N/A These switches do the above and nothing more - they do not change the
0N/A state of the VM or <jvmti/>. No command line options are needed
0N/A to enable <jvmti/>
0N/A or aspects of <jvmti/>, this is handled programmatically
0N/A by the use of
0N/A <internallink id="capability">capabilities</internallink>.
0N/A </intro>
0N/A
0N/A <intro id="startup" label="Agent Start-Up">
0N/A The VM starts each agent by invoking a start-up function.
0N/A If the agent is started in the <code>OnLoad</code>
0N/A <functionlink id="GetPhase">phase</functionlink> the function
0N/A <internallink id="onload"><code>Agent_OnLoad</code></internallink>
0N/A will be invoked.
0N/A If the agent is started in the live
0N/A <functionlink id="GetPhase">phase</functionlink> the function
0N/A <internallink id="onattach"><code>Agent_OnAttach</code></internallink>
0N/A will be invoked.
0N/A Exactly one call to a start-up function is made per agent.
0N/A </intro>
0N/A
0N/A <intro id="onload" label="Agent Start-Up (OnLoad phase)">
0N/A If an agent is started during the <code>OnLoad</code> phase then its
0N/A agent library must export a start-up function with the following prototype:
0N/A <example>
0N/AJNIEXPORT jint JNICALL
0N/AAgent_OnLoad(JavaVM *vm, char *options, void *reserved)</example>
0N/A The VM will start the agent by calling this function.
0N/A It will be called early enough in VM initialization that:
0N/A <ul>
0N/A <li><functionlink id="SetSystemProperty">system properties</functionlink>
0N/A may be set before they have been used in the start-up of the VM</li>
0N/A <li>the full set of
0N/A <internallink id="capability">capabilities</internallink>
0N/A is still available (note that capabilities that configure the VM
0N/A may only be available at this time--see the
0N/A <internallink id="capability">Capability function section</internallink>)</li>
0N/A <li>no bytecodes have executed</li>
0N/A <li>no classes have been loaded</li>
0N/A <li>no objects have been created</li>
0N/A </ul>
0N/A <p/>
0N/A The VM will call the <code>Agent_OnLoad</code> function with
0N/A <i>&lt;options&gt;</i> as the second argument -
0N/A that is, using the command-line option examples,
0N/A <code>"opt1,opt2"</code> will be passed to the <code>char *options</code>
0N/A argument of <code>Agent_OnLoad</code>.
0N/A The <code>options</code> argument is encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A If <i>=&lt;options&gt;</i> is not specified,
0N/A a zero length string is passed to <code>options</code>.
0N/A The lifespan of the <code>options</code> string is the <code>Agent_OnLoad</code>
0N/A call. If needed beyond this time the string or parts of the string must
0N/A be copied.
0N/A The period between when <code>Agent_OnLoad</code> is called and when it
0N/A returns is called the <i>OnLoad phase</i>.
0N/A Since the VM is not initialized during the OnLoad
0N/A <functionlink id="GetPhase">phase</functionlink>,
0N/A the set of allowed operations
0N/A inside <code>Agent_OnLoad</code> is restricted (see the function descriptions for the
0N/A functionality available at this time).
0N/A The agent can safely process the options and set
0N/A event callbacks with <functionlink id="SetEventCallbacks"></functionlink>. Once
0N/A the VM initialization event is received
0N/A (that is, the <eventlink id="VMInit">VMInit</eventlink>
0N/A callback is invoked), the agent
0N/A can complete its initialization.
0N/A <rationale>
0N/A Early startup is required so that agents can set the desired capabilities,
0N/A many of which must be set before the VM is initialized.
0N/A In JVMDI, the -Xdebug command-line option provided
0N/A very coarse-grain control of capabilities.
0N/A JVMPI implementations use various tricks to provide a single "JVMPI on" switch.
0N/A No reasonable command-line
0N/A option could provide the fine-grain of control required to balance needed capabilities vs
0N/A performance impact.
0N/A Early startup is also needed so that agents can control the execution
0N/A environment - modifying the file system and system properties to install
0N/A their functionality.
0N/A </rationale>
0N/A <p/>
0N/A The return value from <code>Agent_OnLoad</code> is used to indicate an error.
0N/A Any value other than zero indicates an error and causes termination of the VM.
0N/A </intro>
0N/A
0N/A <intro id="onattach" label="Agent Start-Up (Live phase)">
0N/A A VM may support a mechanism that allows agents to be started in the VM during the live
0N/A <functionlink id="GetPhase">phase</functionlink>. The details of how this is supported,
0N/A are implementation specific. For example, a tool may use some platform specific mechanism,
0N/A or implementation specific API, to attach to the running VM, and request it start a given
0N/A agent.
0N/A <p/>
0N/A If an agent is started during the live phase then its agent library
0N/A must export a start-up function
0N/A with the following prototype:
0N/A <example>
0N/AJNIEXPORT jint JNICALL
0N/AAgent_OnAttach(JavaVM* vm, char *options, void *reserved)</example>
0N/A <p/>
0N/A The VM will start the agent by calling this function.
0N/A It will be called in the context of a thread
0N/A that is attached to the VM. The first argument <i>&lt;vm&gt;</i> is the Java VM.
0N/A The <i>&lt;options&gt;</i> argument is the startup options provided to the agent.
0N/A <i>&lt;options&gt;</i> is encoded as a <internallink id="mUTF">modified UTF-8
0N/A </internallink> string.
0N/A If startup options were not provided, a zero length string is passed to
0N/A <code>options</code>. The lifespan of the <code>options</code> string is the
0N/A <code>Agent_OnAttach</code> call. If needed beyond this time the string or parts of
0N/A the string must be copied.
0N/A <p/>
0N/A Note that some <internallink id="capability">capabilities</internallink>
0N/A may not be available in the live phase.
0N/A <p/>
0N/A The <code>Agent_OnAttach</code> function initializes the agent and returns a value
0N/A to the VM to indicate if an error occurred. Any value other than zero indicates an error.
0N/A An error does not cause the VM to terminate. Instead the VM ignores the error, or takes
0N/A some implementation specific action -- for example it might print an error to standard error,
0N/A or record the error in a system log.
0N/A </intro>
0N/A
0N/A <intro id="onunload" label="Agent Shutdown">
0N/A The library may optionally export a
0N/A shutdown function with the following prototype:
0N/A <example>
0N/AJNIEXPORT void JNICALL
0N/AAgent_OnUnload(JavaVM *vm)</example>
0N/A This function will be called by the VM when the library is about to be unloaded.
0N/A The library will be unloaded and this function will be called if some platform specific
0N/A mechanism causes the unload (an unload mechanism is not specified in this document)
0N/A or the library is (in effect) unloaded by the termination of the VM whether through
0N/A normal termination or VM failure, including start-up failure.
0N/A Uncontrolled shutdown is, of couse, an exception to this rule.
0N/A Note the distinction between this function and the
0N/A <eventlink id="VMDeath">VM Death event</eventlink>: for the VM Death event
0N/A to be sent, the VM must have run at least to the point of initialization and a valid
0N/A <jvmti/> environment must exist which has set a callback for VMDeath
0N/A and enabled the event
0N/A None of these are required for <code>Agent_OnUnload</code> and this function
0N/A is also called if the library is unloaded for other reasons.
0N/A In the case that a VM Death event is sent, it will be sent before this
0N/A function is called (assuming this function is called due to VM termination).
0N/A This function can be used to clean-up resources allocated by the agent.
0N/A </intro>
0N/A
0N/A <intro id="tooloptions" label="JAVA_TOOL_OPTIONS">
0N/A Since the command-line cannot always be accessed or modified, for example in embedded VMs
0N/A or simply VMs launched deep within scripts, a <code>JAVA_TOOL_OPTIONS</code> variable is
0N/A provided so that agents may be launched in these cases.
0N/A <p/>
0N/A Platforms which support environment variables or other named strings, may support the
0N/A <code>JAVA_TOOL_OPTIONS</code> variable. This variable will be broken into options at white-space
0N/A boundaries. White-space characters include space, tab, carriage-return, new-line,
0N/A vertical-tab, and form-feed. Sequences of white-space characters are considered
0N/A equivalent to a single white-space character. No white-space is included in the options
0N/A unless quoted. Quoting is as follows:
0N/A <ul>
0N/A <li>All characters enclosed between a pair of single quote marks (''), except a single
0N/A quote, are quoted.</li>
0N/A <li>Double quote characters have no special meaning inside a pair of single quote marks.</li>
0N/A <li>All characters enclosed between a pair of double quote marks (""), except a double
0N/A quote, are quoted.</li>
0N/A <li>Single quote characters have no special meaning inside a pair of double quote marks.</li>
0N/A <li>A quoted part can start or end anywhere in the variable.</li>
0N/A <li>White-space characters have no special meaning when quoted -- they are included in
0N/A the option like any other character and do not mark white-space boundaries.</li>
0N/A <li>The pair of quote marks is not included in the option.</li>
0N/A </ul>
0N/A <code>JNI_CreateJavaVM</code> (in the JNI Invocation API) will prepend these options to the options supplied
0N/A in its <code>JavaVMInitArgs</code> argument. Platforms may disable this feature in cases where security is
0N/A a concern; for example, the Reference Implementation disables this feature on Unix systems when
0N/A the effective user or group ID differs from the real ID.
0N/A This feature is intended to support the initialization of tools -- specifically including the
0N/A launching of native or Java programming language agents. Multiple tools may wish to use this
0N/A feature, so the variable should not be overwritten, instead, options should be appended to
0N/A the variable. Note that since the variable is processed at the time of the JNI Invocation
0N/A API create VM call, options processed by a launcher (e.g., VM selection options) will not be handled.
0N/A </intro>
0N/A
0N/A <intro id="environments" label="Environments">
0N/A The <jvmti/> specification supports the use of multiple simultaneous
0N/A <jvmti/> agents.
0N/A Each agent has its own <jvmti/> environment.
0N/A That is, the <jvmti/> state is
0N/A separate for each agent - changes to one environment do not affect the
0N/A others. The state of a <jvmti/>
0N/A environment includes:
0N/A <ul>
0N/A <li><functionlink id="SetEventCallbacks">the event callbacks</functionlink></li>
0N/A <li><functionlink id="SetEventNotificationMode">the set of events which are enabled</functionlink></li>
0N/A <li><internallink id="capability">the capabilities</internallink></li>
0N/A <li><internallink id="memory">the memory allocation/deallocation hooks</internallink></li>
0N/A </ul>
0N/A Although their <jvmti/> state
0N/A is separate, agents inspect and modify the shared state
0N/A of the VM, they also share the native environment in which they execute.
0N/A As such, an agent can perturb the results of other agents or cause them
0N/A to fail. It is the responsibility of the agent writer to specify the level
0N/A of compatibility with other agents. <jvmti/> implementations are not capable
0N/A of preventing destructive interactions between agents. Techniques to reduce
0N/A the likelihood of these occurrences are beyond the scope of this document.
0N/A <p/>
0N/A An agent creates a <jvmti/> environment
0N/A by passing a <jvmti/> version
0N/A as the interface ID to the JNI Invocation API function
0N/A <externallink id="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html#GetEnv"><code>GetEnv</code></externallink>.
0N/A See <internallink id="jvmtiEnvAccess">Accessing <jvmti/> Functions</internallink>
0N/A for more details on the creation and use of
0N/A <jvmti/> environments.
0N/A Typically, <jvmti/> environments are created by calling <code>GetEnv</code> from
0N/A <internallink id="onload"><code>Agent_OnLoad</code></internallink>.
0N/A </intro>
0N/A
0N/A <intro id="bci" label="Bytecode Instrumentation">
0N/A This interface does not include some events that one might expect in an interface with
0N/A profiling support. Some examples include object allocation events and full speed
0N/A method enter and exit events. The interface instead provides support for
0N/A <i>bytecode instrumentation</i>, the ability to alter the Java virtual machine
0N/A bytecode instructions which comprise the target program. Typically, these alterations
0N/A are to add "events" to the code of a method - for example, to add, at the beginning of a method,
0N/A a call to <code>MyProfiler.methodEntered()</code>.
0N/A Since the changes are purely additive, they do not modify application
0N/A state or behavior.
0N/A Because the inserted agent code is standard bytecodes, the VM can run at full speed,
0N/A optimizing not only the target program but also the instrumentation. If the
0N/A instrumentation does not involve switching from bytecode execution, no expensive
0N/A state transitions are needed. The result is high performance events.
0N/A This approach also provides complete control to the agent: instrumentation can be
0N/A restricted to "interesting" portions of the code (e.g., the end user's code) and
0N/A can be conditional. Instrumentation can run entirely in Java programming language
0N/A code or can call into the native agent. Instrumentation can simply maintain
0N/A counters or can statistically sample events.
0N/A <p/>
0N/A Instrumentation can be inserted in one of three ways:
0N/A <ul>
0N/A <li>
0N/A Static Instrumentation: The class file is instrumented before it
0N/A is loaded into the VM - for example, by creating a duplicate directory of
0N/A <code>*.class</code> files which have been modified to add the instrumentation.
0N/A This method is extremely awkward and, in general, an agent cannot know
0N/A the origin of the class files which will be loaded.
0N/A </li>
0N/A <li>
0N/A Load-Time Instrumentation: When a class file is loaded by the VM, the raw
0N/A bytes of the class file are sent for instrumentation to the agent.
0N/A The <eventlink id="ClassFileLoadHook"/>
0N/A event, triggered by the class load,
0N/A provides this functionality. This mechanism provides efficient
0N/A and complete access to one-time instrumentation.
0N/A </li>
0N/A <li>
0N/A Dynamic Instrumentation: A class which is already loaded (and possibly
0N/A even running) is modified. This optional feature is provided by the
0N/A <eventlink id="ClassFileLoadHook"/> event, triggered by calling the
0N/A <functionlink id="RetransformClasses"/> function.
0N/A Classes can be modified multiple times and can be returned to their
0N/A original state.
0N/A The mechanism allows instrumentation which changes during the
0N/A course of execution.
0N/A </li>
0N/A </ul>
0N/A <p/>
0N/A The class modification functionality provided in this interface
0N/A is intended to provide a mechanism for instrumentation
0N/A (the <eventlink id="ClassFileLoadHook"/> event
0N/A and the <functionlink id="RetransformClasses"/> function)
0N/A and, during development, for fix-and-continue debugging
0N/A (the <functionlink id="RedefineClasses"/> function).
0N/A <p/>
0N/A Care must be taken to avoid perturbing dependencies, especially when
0N/A instrumenting core classes. For example, an approach to getting notification
0N/A of every object allocation is to instrument the constructor on
0N/A <code>Object</code>. Assuming that the constructor is initially
0N/A empty, the constructor could be changed to:
0N/A <example>
0N/A public Object() {
0N/A MyProfiler.allocationTracker(this);
0N/A }
0N/A </example>
0N/A However, if this change was made using the
0N/A <eventlink id="ClassFileLoadHook"/>
0N/A event then this might impact a typical VM as follows:
0N/A the first created object will call the constructor causing a class load of
0N/A <code>MyProfiler</code>; which will then cause
0N/A object creation, and since <code>MyProfiler</code> isn't loaded yet,
0N/A infinite recursion; resulting in a stack overflow. A refinement of this
0N/A would be to delay invoking the tracking method until a safe time. For
0N/A example, <code>trackAllocations</code> could be set in the
0N/A handler for the <code>VMInit</code> event.
0N/A <example>
0N/A static boolean trackAllocations = false;
0N/A
0N/A public Object() {
0N/A if (trackAllocations) {
0N/A MyProfiler.allocationTracker(this);
0N/A }
0N/A }
0N/A </example>
0N/A <p/>
0N/A The <functionlink id="SetNativeMethodPrefix"/> allows native methods
0N/A to be instrumented by the use of wrapper methods.
0N/A </intro>
0N/A
0N/A <intro id="mUTF" label="Modified UTF-8 String Encoding">
0N/A <jvmti/> uses modified UTF-8 to encode character strings.
0N/A This is the same encoding used by JNI.
0N/A Modified UTF-8 differs
0N/A from standard UTF-8 in the representation of supplementary characters
0N/A and of the null character. See the
0N/A <externallink id="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/types.html#wp16542">
0N/A Modified UTF-8 Strings</externallink>
0N/A section of the JNI specification for details.
0N/A </intro>
0N/A
0N/A <intro id="context" label="Specification Context">
0N/A Since this interface provides access to the state of applications running in the
0N/A Java virtual machine;
0N/A terminology refers to the Java platform and not the native
0N/A platform (unless stated otherwise). For example:
0N/A <ul>
0N/A <li>"thread" means Java programming language thread.</li>
0N/A <li>"stack frame" means Java virtual machine stack frame.</li>
0N/A <li>"class" means Java programming language class.</li>
0N/A <li>"heap" means Java virtual machine heap.</li>
0N/A <li>"monitor" means Java programming language object monitor.</li>
0N/A </ul>
0N/A <p/>
0N/A Sun, Sun Microsystems, the Sun logo, Java, and JVM
1472N/A are trademarks or registered trademarks of Oracle
1472N/A and/or its affiliates, in the U.S. and other countries.
0N/A </intro>
0N/A
0N/A
0N/A<functionsection label="Functions">
0N/A <intro id="jvmtiEnvAccess" label="Accessing Functions">
0N/A Native code accesses <jvmti/> features
0N/A by calling <jvmti/> functions.
0N/A Access to <jvmti/> functions is by use of an interface pointer
0N/A in the same manner as
0N/A <externallink id="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/design.html">Java
0N/A Native Interface (JNI) functions</externallink> are accessed.
0N/A The <jvmti/> interface pointer is called the
0N/A <i>environment pointer</i>.
0N/A <p/>
0N/A An environment pointer is a pointer to an environment and has
0N/A the type <code>jvmtiEnv*</code>.
0N/A An environment has information about its <jvmti/> connection.
0N/A The first value in the environment is a pointer to the function table.
0N/A The function table is an array of pointers to <jvmti/> functions.
0N/A Every function pointer is at a predefined offset inside the
0N/A array.
0N/A <p/>
0N/A When used from the C language:
0N/A double indirection is used to access the functions;
0N/A the environment pointer provides context and is the first
0N/A parameter of each function call; for example:
0N/A <example>
0N/AjvmtiEnv *jvmti;
0N/A...
0N/AjvmtiError err = (*jvmti)->GetLoadedClasses(jvmti, &amp;class_count, &amp;classes);
0N/A </example>
0N/A <p/>
0N/A When used from the C++ language:
0N/A functions are accessed as member functions of <code>jvmtiEnv</code>;
0N/A the environment pointer is not passed to the function call; for example:
0N/A <example>
0N/AjvmtiEnv *jvmti;
0N/A...
0N/AjvmtiError err = jvmti->GetLoadedClasses(&amp;class_count, &amp;classes);
0N/A </example>
0N/A Unless otherwise stated, all examples and declarations in this
0N/A specification use the C language.
0N/A <p/>
0N/A A <jvmti/> environment can be obtained through the JNI Invocation API
0N/A <code>GetEnv</code> function:
0N/A <example>
0N/AjvmtiEnv *jvmti;
0N/A...
0N/A(*jvm)->GetEnv(jvm, &amp;jvmti, JVMTI_VERSION_1_0);
0N/A </example>
0N/A Each call to <code>GetEnv</code>
0N/A creates a new <jvmti/> connection and thus
0N/A a new <jvmti/> environment.
0N/A The <code>version</code> argument of <code>GetEnv</code> must be
0N/A a <jvmti/> version.
0N/A The returned environment may have a different version than the
0N/A requested version but the returned environment must be compatible.
0N/A <code>GetEnv</code> will return <code>JNI_EVERSION</code> if a
0N/A compatible version is not available, if <jvmti/> is not supported or
0N/A <jvmti/> is not supported in the current VM configuration.
0N/A Other interfaces may be added for creating <jvmti/> environments
0N/A in specific contexts.
0N/A Each environment has its own state (for example,
0N/A <functionlink id="SetEventNotificationMode">desired events</functionlink>,
0N/A <functionlink id="SetEventCallbacks">event handling functions</functionlink>, and
0N/A <functionlink id="AddCapabilities">capabilities</functionlink>).
0N/A An environment is released with
0N/A <functionlink id="DisposeEnvironment"></functionlink>.
0N/A Thus, unlike JNI which has one environment per thread, <jvmti/> environments work
0N/A across threads and are created dynamically.
0N/A </intro>
0N/A
0N/A <intro id="functionReturn" label="Function Return Values">
0N/A <jvmti/> functions always return an
0N/A <internallink id="ErrorSection">error code</internallink> via the
0N/A <datalink id="jvmtiError"/> function return value.
0N/A Some functions can return additional
0N/A values through pointers provided by the calling function.
0N/A In some cases, <jvmti/> functions allocate memory that your program must
0N/A explicitly deallocate. This is indicated in the individual <jvmti/>
0N/A function descriptions. Empty lists, arrays, sequences, etc are
0N/A returned as <code>NULL</code>.
0N/A <p/>
0N/A In the event that the <jvmti/> function encounters
0N/A an error (any return value other than <code>JVMTI_ERROR_NONE</code>) the values
0N/A of memory referenced by argument pointers is undefined, but no memory
0N/A will have been allocated and no global references will have been allocated.
0N/A If the error occurs because of invalid input, no action will have occurred.
0N/A </intro>
0N/A
0N/A<intro id="refs" label="Managing JNI Object References">
0N/A <jvmti/> functions identify objects with JNI references
0N/A (<datalink id="jobject"/> and <datalink id="jclass"/>)
0N/A and their derivatives
0N/A (<datalink id="jthread"/> and <datalink id="jthreadGroup"/>).
0N/A References passed to
0N/A <jvmti/> functions can be either global or local, but they must be
0N/A strong references. All references returned by <jvmti/> functions are
0N/A local references--these local references are created
0N/A during the <jvmti/> call.
0N/A Local references are a resource that must be managed (see the
0N/A <externallink id="http://java.sun.com/javase/6/docs/guide/jni/spec/functions.html#wp18654">JNI Documentation</externallink>).
0N/A When threads return from native code all local references
0N/A are freed. Note that some threads, including typical
0N/A agent threads, will never return from native code.
0N/A A thread is ensured the ability to create sixteen local
0N/A references without the need for any explicit management.
0N/A For threads executing a limited number of <jvmti/> calls before
0N/A returning from native code
0N/A (for example, threads processing events),
0N/A it may be determined that no explicit management
0N/A is needed.
0N/A However, long running agent threads will need explicit
0N/A local reference management--usually with the JNI functions
0N/A <code>PushLocalFrame</code> and <code>PopLocalFrame</code>.
0N/A Conversely, to preserve references beyond the
0N/A return from native code, they must be converted to global references.
0N/A These rules do not apply to <datalink id="jmethodID"/> and <datalink id="jfieldID"/>
0N/A as they are not <datalink id="jobject"/>s.
0N/A</intro>
0N/A
0N/A <intro id="prereqState" label="Prerequisite State for Calling Functions">
0N/A Unless the function explicitly states that the agent must bring
0N/A a thread or the VM to a particular state (for example, suspended),
0N/A the <jvmti/> implementation is responsible for bringing the VM to a
0N/A safe and consistent state for performing the function.
0N/A </intro>
0N/A
0N/A <intro id="functionsExceptions" label="Exceptions and Functions">
0N/A <jvmti/> functions never throw exceptions; error conditions are
0N/A communicated via the
0N/A <internallink id="functionReturn">function return value</internallink>.
0N/A Any existing exception state is preserved across a call to a
0N/A <jvmti/> function.
0N/A See the
0N/A <externallink
0N/A id="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/design.html#wp770"
0N/A >Java Exceptions</externallink>
0N/A section of the JNI specification for information on handling exceptions.
0N/A </intro>
0N/A
0N/A <category id="memory" label="Memory Management">
0N/A <intro>
0N/A These functions provide for the allocation and deallocation of
0N/A memory used by <jvmti/> functionality and can be used to provide
0N/A working memory for agents.
0N/A Memory managed by <jvmti/> is not compatible with other memory
0N/A allocation libraries and mechanisms.
0N/A </intro>
0N/A
0N/A <function id="Allocate" jkernel="yes" phase="any" callbacksafe="safe" impl="notrace" num="46">
0N/A <synopsis>Allocate</synopsis>
0N/A <description>
0N/A Allocate an area of memory through the <jvmti/> allocator.
0N/A The allocated
0N/A memory should be freed with <functionlink id="Deallocate"></functionlink>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A The number of bytes to allocate.
0N/A <rationale>
0N/A <code>jlong</code> is used for compatibility with JVMDI.
0N/A </rationale>
0N/A </description>
0N/A </param>
0N/A <param id="mem_ptr">
0N/A <allocbuf incount="size"><uchar/></allocbuf>
0N/A <description>
0N/A On return, a pointer to the beginning of the allocated memory.
0N/A If <code>size</code> is zero, <code>NULL</code> is returned.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OUT_OF_MEMORY">
0N/A Memory request cannot be honored.
0N/A </error>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A <paramlink id="size"></paramlink> is less than zero.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="Deallocate" jkernel="yes" phase="any" callbacksafe="safe" impl="notrace" num="47">
0N/A <synopsis>Deallocate</synopsis>
0N/A <description>
0N/A Deallocate <code>mem</code> using the <jvmti/> allocator.
0N/A This function should
0N/A be used to deallocate any memory allocated and returned
0N/A by a <jvmti/> function
0N/A (including memory allocated with <functionlink id="Allocate"></functionlink>).
0N/A All allocated memory must be deallocated
0N/A or the memory cannot be reclaimed.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="mem">
0N/A <outbuf>
0N/A <uchar/>
0N/A <nullok>the call is ignored</nullok>
0N/A </outbuf>
0N/A <description>
0N/A A pointer to the beginning of the allocated memory.
0N/A Please ignore "On return, the elements are set."
0N/A <todo>keep it from generating "On return, the elements are set"</todo>
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A </category>
0N/A
0N/A <category id="threadCategory" label="Thread">
0N/A <intro>
0N/A </intro>
0N/A
0N/A <function id="GetThreadState" num="17">
0N/A <synopsis>Get Thread State</synopsis>
0N/A <description>
0N/A Get the state of a thread. The state of the thread is represented by the
0N/A answers to the hierarchical set of questions below:
0N/A <ul type="circle">
0N/A <li><i>Alive?</i>
0N/A <ul>
0N/A <li>Not alive.
0N/A <ul type="circle">
0N/A <li><i>Why not alive?</i>
0N/A <ul>
0N/A <li>New.</li>
0N/A <li>Terminated (<datalink
0N/A id="JVMTI_THREAD_STATE_TERMINATED"><code>JVMTI_THREAD_STATE_TERMINATED</code></datalink>)</li>
0N/A </ul>
0N/A </li>
0N/A </ul>
0N/A </li>
0N/A <li>Alive (<datalink
0N/A id="JVMTI_THREAD_STATE_ALIVE"><code>JVMTI_THREAD_STATE_ALIVE</code></datalink>)
0N/A <ul type="circle">
0N/A <li><i>Suspended?</i>
0N/A <ul>
0N/A <li>Suspended (<datalink
0N/A id="JVMTI_THREAD_STATE_SUSPENDED"><code>JVMTI_THREAD_STATE_SUSPENDED</code></datalink>)</li>
0N/A <li>Not suspended</li>
0N/A </ul>
0N/A </li>
0N/A <li><i>Interrupted?</i>
0N/A <ul>
0N/A <li>Interrupted (<datalink
0N/A id="JVMTI_THREAD_STATE_INTERRUPTED"><code>JVMTI_THREAD_STATE_INTERRUPTED</code></datalink>)</li>
0N/A <li>Not interrupted.</li>
0N/A </ul>
0N/A </li>
0N/A <li><i>In native?</i>
0N/A <ul>
0N/A <li>In native code (<datalink
0N/A id="JVMTI_THREAD_STATE_IN_NATIVE"><code>JVMTI_THREAD_STATE_IN_NATIVE</code></datalink>)</li>
0N/A <li>In Java programming language code</li>
0N/A </ul>
0N/A </li>
0N/A <li><i>What alive state?</i>
0N/A <ul>
0N/A <li>Runnable (<datalink
0N/A id="JVMTI_THREAD_STATE_RUNNABLE"><code>JVMTI_THREAD_STATE_RUNNABLE</code></datalink>)</li>
0N/A <li>Blocked (<datalink
0N/A id="JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER"><code>JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER</code></datalink>)</li>
0N/A <li>Waiting (<datalink
0N/A id="JVMTI_THREAD_STATE_WAITING"><code>JVMTI_THREAD_STATE_WAITING</code></datalink>)
0N/A <ul type="circle">
0N/A <li><i>Timed wait?</i>
0N/A <ul>
0N/A <li>Indefinite (<datalink
0N/A id="JVMTI_THREAD_STATE_WAITING_INDEFINITELY"><code>JVMTI_THREAD_STATE_WAITING_INDEFINITELY</code></datalink></li>
0N/A <li>Timed (<datalink
0N/A id="JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT"><code>JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT</code></datalink>)</li>
0N/A </ul>
0N/A </li>
0N/A <li><i>Why waiting?</i>
0N/A <ul>
0N/A <li>Object.wait (<datalink
0N/A id="JVMTI_THREAD_STATE_IN_OBJECT_WAIT"><code>JVMTI_THREAD_STATE_IN_OBJECT_WAIT</code></datalink>)</li>
0N/A <li>LockSupport.park (<datalink
0N/A id="JVMTI_THREAD_STATE_PARKED"><code>JVMTI_THREAD_STATE_PARKED</code></datalink>)</li>
0N/A <li>Sleeping (<datalink
0N/A id="JVMTI_THREAD_STATE_SLEEPING"><code>JVMTI_THREAD_STATE_SLEEPING</code></datalink>)</li>
0N/A </ul>
0N/A </li>
0N/A </ul>
0N/A </li>
0N/A </ul>
0N/A </li>
0N/A </ul>
0N/A </li>
0N/A </ul>
0N/A </li>
0N/A </ul>
0N/A <p/>
0N/A The answers are represented by the following bit vector.
0N/A <constants id="jvmtiThreadState" label="Thread State Flags" kind="bits">
0N/A <constant id="JVMTI_THREAD_STATE_ALIVE" num="0x0001">
0N/A Thread is alive. Zero if thread is new (not started) or terminated.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_TERMINATED" num="0x0002">
0N/A Thread has completed execution.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_RUNNABLE" num="0x0004">
0N/A Thread is runnable.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER" num="0x0400">
0N/A Thread is waiting to enter a synchronization block/method or,
0N/A after an <code>Object.wait()</code>, waiting to re-enter a
0N/A synchronization block/method.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_WAITING" num="0x0080">
0N/A Thread is waiting.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_WAITING_INDEFINITELY" num="0x0010">
0N/A Thread is waiting without a timeout.
0N/A For example, <code>Object.wait()</code>.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT" num="0x0020">
0N/A Thread is waiting with a maximum time to wait specified.
0N/A For example, <code>Object.wait(long)</code>.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_SLEEPING" num="0x0040">
0N/A Thread is sleeping -- <code>Thread.sleep(long)</code>.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_IN_OBJECT_WAIT" num="0x0100">
0N/A Thread is waiting on an object monitor -- <code>Object.wait</code>.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_PARKED" num="0x0200">
0N/A Thread is parked, for example: <code>LockSupport.park</code>,
0N/A <code>LockSupport.parkUtil</code> and <code>LockSupport.parkNanos</code>.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_SUSPENDED" num="0x100000">
0N/A Thread suspended.
0N/A <code>java.lang.Thread.suspend()</code>
0N/A or a <jvmti/> suspend function
0N/A (such as <functionlink id="SuspendThread"></functionlink>)
0N/A has been called on the thread. If this bit
0N/A is set, the other bits refer to the thread state before suspension.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_INTERRUPTED" num="0x200000">
0N/A Thread has been interrupted.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_IN_NATIVE" num="0x400000">
0N/A Thread is in native code--that is, a native method is running
0N/A which has not called back into the VM or Java programming
0N/A language code.
0N/A <p/>
0N/A This flag is not set when running VM compiled Java programming
0N/A language code nor is it set when running VM code or
0N/A VM support code. Native VM interface functions, such as JNI and
0N/A <jvmti/> functions, may be implemented as VM code.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_VENDOR_1" num="0x10000000">
0N/A Defined by VM vendor.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_VENDOR_2" num="0x20000000">
0N/A Defined by VM vendor.
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_STATE_VENDOR_3" num="0x40000000">
0N/A Defined by VM vendor.
0N/A </constant>
0N/A </constants>
0N/A The following definitions are used to convert <jvmti/> thread state
0N/A to <code>java.lang.Thread.State</code> style states.
0N/A <constants id="jvmtiJavaLangThreadState" label="java.lang.Thread.State Conversion Masks" kind="bits">
0N/A <constant id="JVMTI_JAVA_LANG_THREAD_STATE_MASK"
0N/A num="JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT">
0N/A Mask the state with this before comparison
0N/A </constant>
0N/A <constant id="JVMTI_JAVA_LANG_THREAD_STATE_NEW"
0N/A num="0">
0N/A <code>java.lang.Thread.State.NEW</code>
0N/A </constant>
0N/A <constant id="JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED"
0N/A num="JVMTI_THREAD_STATE_TERMINATED">
0N/A <code>java.lang.Thread.State.TERMINATED</code>
0N/A </constant>
0N/A <constant id="JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE"
0N/A num="JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE">
0N/A <code>java.lang.Thread.State.RUNNABLE</code>
0N/A </constant>
0N/A <constant id="JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED"
0N/A num="JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER">
0N/A <code>java.lang.Thread.State.BLOCKED</code>
0N/A </constant>
0N/A <constant id="JVMTI_JAVA_LANG_THREAD_STATE_WAITING"
0N/A num="JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY">
0N/A <code>java.lang.Thread.State.WAITING</code>
0N/A </constant>
0N/A <constant id="JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING"
0N/A num="JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT">
0N/A <code>java.lang.Thread.State.TIMED_WAITING</code>
0N/A </constant>
0N/A </constants>
0N/A <b>Rules</b>
0N/A <p/>
0N/A There can be no more than one answer to a question, although there can be no
0N/A answer (because the answer is unknown, does not apply, or none of the answers is
0N/A correct). An answer is set only when the enclosing answers match.
0N/A That is, no more than one of
0N/A <ul type="circle">
0N/A <li><code>JVMTI_THREAD_STATE_RUNNABLE</code></li>
0N/A <li><code>JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER</code></li>
0N/A <li><code>JVMTI_THREAD_STATE_WAITING</code></li>
0N/A </ul>
0N/A can be set (a <tm>J2SE</tm> compliant implementation will always set
0N/A one of these if <code>JVMTI_THREAD_STATE_ALIVE</code> is set).
0N/A And if any of these are set, the enclosing answer
0N/A <code>JVMTI_THREAD_STATE_ALIVE</code> is set.
0N/A No more than one of
0N/A <ul type="circle">
0N/A <li><code>JVMTI_THREAD_STATE_WAITING_INDEFINITELY</code></li>
0N/A <li><code>JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT</code></li>
0N/A </ul>
0N/A can be set (a <tm>J2SE</tm> compliant implementation will always set
0N/A one of these if <code>JVMTI_THREAD_STATE_WAITING</code> is set).
0N/A And if either is set, the enclosing answers
0N/A <code>JVMTI_THREAD_STATE_ALIVE</code> and
0N/A <code>JVMTI_THREAD_STATE_WAITING</code> are set.
0N/A No more than one of
0N/A <ul type="circle">
0N/A <li><code>JVMTI_THREAD_STATE_IN_OBJECT_WAIT</code></li>
0N/A <li><code>JVMTI_THREAD_STATE_PARKED</code></li>
0N/A <li><code>JVMTI_THREAD_STATE_SLEEPING</code></li>
0N/A </ul>
0N/A can be set. And if any of these is set, the enclosing answers
0N/A <code>JVMTI_THREAD_STATE_ALIVE</code> and
0N/A <code>JVMTI_THREAD_STATE_WAITING</code> are set.
0N/A Also, if <code>JVMTI_THREAD_STATE_SLEEPING</code> is set,
0N/A then <code>JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT</code> is set.
0N/A If a state <i>A</i> is implemented using the mechanism of
0N/A state <i>B</i> then it is state <i>A</i> which
0N/A is returned by this function.
0N/A For example, if <code>Thread.sleep(long)</code>
0N/A is implemented using <code>Object.wait(long)</code>
0N/A then it is still <code>JVMTI_THREAD_STATE_SLEEPING</code>
0N/A which is returned.
0N/A More than one of
0N/A <ul type="circle">
0N/A <li><code>JVMTI_THREAD_STATE_SUSPENDED</code></li>
0N/A <li><code>JVMTI_THREAD_STATE_INTERRUPTED</code></li>
0N/A <li><code>JVMTI_THREAD_STATE_IN_NATIVE</code></li>
0N/A </ul>
0N/A can be set, but if any is set,
0N/A <code>JVMTI_THREAD_STATE_ALIVE</code> is set.
0N/A <p/>
0N/A And finally,
0N/A <code>JVMTI_THREAD_STATE_TERMINATED</code> cannot be set unless
0N/A <code>JVMTI_THREAD_STATE_ALIVE</code> is not set.
0N/A <p/>
0N/A The thread state representation is designed for extension in future versions
0N/A of the specification; thread state values should be used accordingly, that is
0N/A they should not be used as ordinals.
0N/A Most queries can be made by testing a single bit, if use in a switch statement is desired,
0N/A the state bits should be masked with the interesting bits.
0N/A All bits not defined above are reserved for future use.
0N/A A VM, compliant to the current specification, must set reserved bits to zero.
0N/A An agent should ignore reserved bits --
0N/A they should not be assumed to be zero and thus should not be included in comparisons.
0N/A <p/>
0N/A <b>Examples</b>
0N/A <p/>
0N/A Note that the values below exclude reserved and vendor bits.
0N/A <p/>
0N/A The state of a thread blocked at a <code>synchronized</code>-statement would be:
0N/A <example>
0N/A JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER
0N/A </example>
0N/A The state of a thread which hasn't started yet would be:
0N/A <example>
0N/A 0
0N/A </example>
0N/A The state of a thread at a <code>Object.wait(3000)</code> would be:
0N/A <example>
0N/A JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_WAITING +
0N/A JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT +
0N/A JVMTI_THREAD_STATE_MONITOR_WAITING
0N/A </example>
0N/A The state of a thread suspended while runnable would be:
0N/A <example>
0N/A JVMTI_THREAD_STATE_ALIVE + JVMTI_THREAD_STATE_RUNNABLE + JVMTI_THREAD_STATE_SUSPENDED
0N/A </example>
0N/A <p/>
0N/A <b>Testing the State</b>
0N/A <p/>
0N/A In most cases, the thread state can be determined by testing the one bit corresponding
0N/A to that question. For example, the code to test if a thread is sleeping:
0N/A <example>
0N/A jint state;
0N/A jvmtiError err;
0N/A
0N/A err = (*jvmti)-&gt;GetThreadState(jvmti, thread, &amp;state);
0N/A if (err == JVMTI_ERROR_NONE) {
0N/A if (state &amp; JVMTI_THREAD_STATE_SLEEPING) { ...
0N/A </example>
0N/A <p/>
0N/A For waiting (that is, in <code>Object.wait</code>, parked, or sleeping) it would be:
0N/A <example>
0N/A if (state &amp; JVMTI_THREAD_STATE_WAITING) { ...
0N/A </example>
0N/A For some states, more than one bit will need to be tested as is the case
0N/A when testing if a thread has not yet been started:
0N/A <example>
0N/A if ((state &amp; (JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_TERMINATED)) == 0) { ...
0N/A </example>
0N/A To distinguish timed from untimed <code>Object.wait</code>:
0N/A <example>
0N/A if (state &amp; JVMTI_THREAD_STATE_IN_OBJECT_WAIT) {
0N/A if (state &amp; JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT) {
0N/A printf("in Object.wait(long timeout)\n");
0N/A } else {
0N/A printf("in Object.wait()\n");
0N/A }
0N/A }
0N/A </example>
0N/A <p/>
0N/A <b>Relationship to <code>java.lang.Thread.State</code></b>
0N/A <p/>
0N/A The thread state represented by <code>java.lang.Thread.State</code>
0N/A returned from <code>java.lang.Thread.getState()</code> is a subset of the
0N/A information returned from this function.
0N/A The corresponding <code>java.lang.Thread.State</code> can be determined
0N/A by using the provided conversion masks.
0N/A For example, this returns the name of the <code>java.lang.Thread.State</code> thread state:
0N/A <example>
0N/A err = (*jvmti)-&gt;GetThreadState(jvmti, thread, &amp;state);
0N/A abortOnError(err);
0N/A switch (state &amp; JVMTI_JAVA_LANG_THREAD_STATE_MASK) {
0N/A case JVMTI_JAVA_LANG_THREAD_STATE_NEW:
0N/A return "NEW";
0N/A case JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED:
0N/A return "TERMINATED";
0N/A case JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE:
0N/A return "RUNNABLE";
0N/A case JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED:
0N/A return "BLOCKED";
0N/A case JVMTI_JAVA_LANG_THREAD_STATE_WAITING:
0N/A return "WAITING";
0N/A case JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING:
0N/A return "TIMED_WAITING";
0N/A }
0N/A </example>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" started="maybe" impl="noconvert"/>
0N/A <description>
0N/A The thread to query.
0N/A </description>
0N/A </param>
0N/A <param id="thread_state_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to state flags,
0N/A as defined by the <internallink id="jvmtiThreadState">Thread State Flags</internallink>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetCurrentThread" phase="start" num="18" since="1.1">
0N/A <synopsis>Get Current Thread</synopsis>
0N/A <description>
0N/A Get the current thread.
0N/A The current thread is the Java programming language thread which has called the function.
0N/A <p/>
0N/A Note that most <jvmti/> functions that take a thread
0N/A as an argument will accept <code>NULL</code> to mean
0N/A the current thread.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread_ptr">
0N/A <outptr><jthread/></outptr>
0N/A <description>
0N/A On return, points to the current thread.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetAllThreads" num="4">
0N/A <synopsis>Get All Threads</synopsis>
0N/A <description>
0N/A Get all live threads.
0N/A The threads are Java programming language threads;
0N/A that is, threads that are attached to the VM.
0N/A A thread is live if <code>java.lang.Thread.isAlive()</code>
0N/A would return <code>true</code>, that is, the thread has
0N/A been started and has not yet died.
0N/A The universe of threads is determined by the context of the <jvmti/>
0N/A environment, which typically is all threads attached to the VM.
0N/A Note that this includes <jvmti/> agent threads
0N/A (see <functionlink id="RunAgentThread"/>).
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="threads_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of running threads.
0N/A </description>
0N/A </param>
0N/A <param id="threads_ptr">
0N/A <allocbuf outcount="threads_count_ptr"><jthread/></allocbuf>
0N/A <description>
0N/A On return, points to an array of references, one
0N/A for each running thread.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SuspendThread" num="5">
0N/A <synopsis>Suspend Thread</synopsis>
0N/A <description>
0N/A Suspend the specified thread. If the calling thread is specified,
0N/A this function will not return until some other thread calls
0N/A <functionlink id="ResumeThread"></functionlink>.
0N/A If the thread is currently suspended, this function
0N/A does nothing and returns an error.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_suspend"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread to suspend.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_THREAD_SUSPENDED">
0N/A Thread already suspended.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <elide>
0N/A <function id="SuspendAllThreads" num="101">
0N/A <synopsis>Suspend All Threads</synopsis>
0N/A <description>
0N/A <issue>
0N/A There has been no explicit call for this function, and it will
0N/A thus be removed if there is no interest.
0N/A </issue>
0N/A Suspend all live threads except:
0N/A <ul>
0N/A <li>already suspended threads</li>
0N/A <li>those listed in <paramlink id="except_list"></paramlink></li>
0N/A <li>certain system (non application) threads, as determined
0N/A by the VM implementation</li>
0N/A </ul>
0N/A The threads are Java programming language threads;
0N/A native threads which are not attached to the VM are not
0N/A Java programming language threads.
0N/A A thread is live if <code>java.lang.Thread.isAlive()</code>
0N/A would return <code>true</code>, that is, the thread has
0N/A been started and has not yet died.
0N/A The universe of threads is determined
0N/A by the context of the <jvmti/>
0N/A environment, which, typically, is all threads attached to the VM,
0N/A except critical VM internal threads and <jvmti/> agent threads
0N/A (see <functionlink id="RunAgentThread"/>).
0N/A <p/>
0N/A If the calling thread is specified,
0N/A all other threads are suspended first then the caller thread is suspended -
0N/A this function will not return until some other thread calls
0N/A <functionlink id="ResumeThread"></functionlink>.
0N/A <p/>
0N/A The list of actually
0N/A suspended threads is returned in
0N/A <paramlink id="suspended_list_ptr"></paramlink>.
0N/A Suspension is as defined in <functionlink id="SuspendThread"></functionlink>.
0N/A <functionlink id="ResumeThreadList"></functionlink>
0N/A can be used to resume the suspended threads.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_suspend"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="except_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The number of threads in the list of threads not to be suspended.
0N/A </description>
0N/A </param>
0N/A <param id="except_list">
0N/A <inbuf incount="except_count">
0N/A <jthread/>
0N/A <nullok>not an error if <code>except_count == 0</code></nullok>
0N/A </inbuf>
0N/A <description>
0N/A The list of threads not to be suspended.
0N/A </description>
0N/A </param>
0N/A <param id="suspended_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of threads suspended by this call.
0N/A </description>
0N/A </param>
0N/A <param id="suspended_list_ptr">
0N/A <allocbuf outcount="suspended_count_ptr"><jthread/></allocbuf>
0N/A <description>
0N/A On return, points to an array of references, one
0N/A for each thread suspended.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_THREAD">
0N/A A thread in <paramlink id="except_list"></paramlink> was invalid.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NULL_POINTER">
0N/A Both <paramlink id="except_list"></paramlink> was <code>NULL</code>
0N/A and <paramlink id="except_count"></paramlink> was non-zero.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A </elide>
0N/A
0N/A <function id="SuspendThreadList" num="92">
0N/A <synopsis>Suspend Thread List</synopsis>
0N/A <description>
0N/A Suspend the <paramlink id="request_count"></paramlink>
0N/A threads specified in the
0N/A <paramlink id="request_list"></paramlink> array.
0N/A Threads may be resumed with
0N/A <functionlink id="ResumeThreadList"></functionlink> or
0N/A <functionlink id="ResumeThread"></functionlink>.
0N/A If the calling thread is specified in the
0N/A <paramlink id="request_list"></paramlink> array, this function will
0N/A not return until some other thread resumes it.
0N/A Errors encountered in the suspension of a thread
0N/A are returned in the <paramlink id="results"></paramlink>
0N/A array, <b>not</b> in the return value of this function.
0N/A Threads that are currently suspended do not change state.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_suspend"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="request_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The number of threads to suspend.
0N/A </description>
0N/A </param>
0N/A <param id="request_list">
0N/A <inbuf incount="request_count"><jthread/></inbuf>
0N/A <description>
0N/A The list of threads to suspend.
0N/A </description>
0N/A </param>
0N/A <param id="results">
0N/A <outbuf incount="request_count"><enum>jvmtiError</enum></outbuf>
0N/A <description>
0N/A An agent supplied array of
0N/A <paramlink id="request_count"></paramlink> elements.
0N/A On return, filled with the error code for
0N/A the suspend of the corresponding thread.
0N/A The error code will be
0N/A <errorlink id="JVMTI_ERROR_NONE"></errorlink>
0N/A if the thread was suspended by this call.
0N/A Possible error codes are those specified
0N/A for <functionlink id="SuspendThread"></functionlink>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ResumeThread" num="6">
0N/A <synopsis>Resume Thread</synopsis>
0N/A <description>
0N/A Resume a suspended thread.
0N/A Any threads currently suspended through
0N/A a <jvmti/> suspend function (eg.
0N/A <functionlink id="SuspendThread"></functionlink>)
0N/A or <code>java.lang.Thread.suspend()</code>
0N/A will resume execution;
0N/A all other threads are unaffected.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_suspend"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A The thread to resume.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_INVALID_TYPESTATE">
0N/A The state of the thread has been modified, and is now inconsistent.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ResumeThreadList" num="93">
0N/A <synopsis>Resume Thread List</synopsis>
0N/A <description>
0N/A Resume the <paramlink id="request_count"></paramlink>
0N/A threads specified in the
0N/A <paramlink id="request_list"></paramlink> array.
0N/A Any thread suspended through
0N/A a <jvmti/> suspend function (eg.
0N/A <functionlink id="SuspendThreadList"></functionlink>)
0N/A or <code>java.lang.Thread.suspend()</code>
0N/A will resume execution.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_suspend"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="request_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The number of threads to resume.
0N/A </description>
0N/A </param>
0N/A <param id="request_list">
0N/A <inbuf incount="request_count"><jthread/></inbuf>
0N/A <description>
0N/A The threads to resume.
0N/A </description>
0N/A </param>
0N/A <param id="results">
0N/A <outbuf incount="request_count"><enum>jvmtiError</enum></outbuf>
0N/A <description>
0N/A An agent supplied array of
0N/A <paramlink id="request_count"></paramlink> elements.
0N/A On return, filled with the error code for
0N/A the resume of the corresponding thread.
0N/A The error code will be
0N/A <errorlink id="JVMTI_ERROR_NONE"></errorlink>
0N/A if the thread was suspended by this call.
0N/A Possible error codes are those specified
0N/A for <functionlink id="ResumeThread"></functionlink>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="StopThread" num="7">
0N/A <synopsis>Stop Thread</synopsis>
0N/A <description>
0N/A Send the specified asynchronous exception to the specified thread
0N/A (similar to <code>java.lang.Thread.stop</code>).
0N/A Normally, this function is used to kill the specified thread with an
0N/A instance of the exception <code>ThreadDeath</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_signal_thread"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A The thread to stop.
0N/A </description>
0N/A </param>
0N/A <param id="exception">
0N/A <jobject/>
0N/A <description>
0N/A The asynchronous exception object.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="InterruptThread" num="8">
0N/A <synopsis>Interrupt Thread</synopsis>
0N/A <description>
0N/A Interrupt the specified thread
0N/A (similar to <code>java.lang.Thread.interrupt</code>).
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_signal_thread"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread impl="noconvert"/>
0N/A <description>
0N/A The thread to interrupt.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetThreadInfo" num="9">
0N/A <synopsis>Get Thread Info</synopsis>
0N/A <typedef id="jvmtiThreadInfo" label="Thread information structure">
0N/A <field id="name">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The thread name, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </field>
0N/A <field id="priority">
0N/A <jint/>
0N/A <description>
0N/A The thread priority. See the thread priority constants:
0N/A <datalink id="jvmtiThreadPriority"></datalink>.
0N/A </description>
0N/A </field>
0N/A <field id="is_daemon">
0N/A <jboolean/>
0N/A <description>
0N/A Is this a daemon thread?
0N/A </description>
0N/A </field>
0N/A <field id="thread_group">
0N/A <jthreadGroup/>
0N/A <description>
0N/A The thread group to which this thread belongs.
0N/A <code>NULL</code> if the thread has died.
0N/A </description>
0N/A </field>
0N/A <field id="context_class_loader">
0N/A <jobject/>
0N/A <description>
0N/A The context class loader associated with this thread.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <description>
0N/A Get thread information. The fields of the <datalink id="jvmtiThreadInfo"/> structure
0N/A are filled in with details of the specified thread.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" impl="noconvert" started="maybe"/>
0N/A <description>
0N/A The thread to query.
0N/A </description>
0N/A </param>
0N/A <param id="info_ptr">
0N/A <outptr><struct>jvmtiThreadInfo</struct></outptr>
0N/A <description>
0N/A On return, filled with information describing the specified thread.
0N/A <p/>
0N/A For JDK 1.1 implementations that don't
0N/A recognize context class loaders,
0N/A the <code>context_class_loader</code> field will be NULL.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetOwnedMonitorInfo" num="10">
0N/A <synopsis>Get Owned Monitor Info</synopsis>
0N/A <description>
0N/A Get information about the monitors owned by the
0N/A specified thread.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A <required id="can_get_owned_monitor_info"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread to query.
0N/A </description>
0N/A </param>
0N/A <param id="owned_monitor_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A The number of monitors returned.
0N/A </description>
0N/A </param>
0N/A <param id="owned_monitors_ptr">
0N/A <allocbuf outcount="owned_monitor_count_ptr"><jobject/></allocbuf>
0N/A <description>
0N/A The array of owned monitors.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetOwnedMonitorStackDepthInfo" num="153" since="1.1">
0N/A <synopsis>Get Owned Monitor Stack Depth Info</synopsis>
0N/A <typedef id="jvmtiMonitorStackDepthInfo"
0N/A label="Monitor stack depth information structure">
0N/A <field id="monitor">
0N/A <jobject/>
0N/A <description>
0N/A The owned monitor.
0N/A </description>
0N/A </field>
0N/A <field id="stack_depth">
0N/A <jint/>
0N/A <description>
0N/A The stack depth. Corresponds to the stack depth used in the
0N/A <internallink id="stack">Stack Frame functions</internallink>.
0N/A That is, zero is the current frame, one is the frame which
0N/A called the current frame. And it is negative one if the
0N/A implementation cannot determine the stack depth (e.g., for
0N/A monitors acquired by JNI <code>MonitorEnter</code>).
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <description>
0N/A Get information about the monitors owned by the
0N/A specified thread and the depth of the stack frame which locked them.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_owned_monitor_stack_depth_info"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread to query.
0N/A </description>
0N/A </param>
0N/A <param id="monitor_info_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A The number of monitors returned.
0N/A </description>
0N/A </param>
0N/A <param id="monitor_info_ptr">
0N/A <allocbuf outcount="owned_monitor_depth_count_ptr">
0N/A <struct>jvmtiMonitorStackDepthInfo</struct>
0N/A </allocbuf>
0N/A <description>
0N/A The array of owned monitor depth information.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetCurrentContendedMonitor" num="11">
0N/A <synopsis>Get Current Contended Monitor</synopsis>
0N/A <description>
0N/A Get the object, if any, whose monitor the specified thread is waiting to
0N/A enter or waiting to regain through <code>java.lang.Object.wait</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_current_contended_monitor"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread to query.
0N/A </description>
0N/A </param>
0N/A <param id="monitor_ptr">
0N/A <outptr><jobject/></outptr>
0N/A <description>
0N/A On return, filled with the current contended monitor, or
0N/A NULL if there is none.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <callback id="jvmtiStartFunction">
0N/A <void/>
0N/A <synopsis>Agent Start Function</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A This function is the entry point for an agent thread
0N/A started with
0N/A <functionlink id="RunAgentThread"></functionlink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="jvmti_env">
0N/A <outptr>
0N/A <struct>jvmtiEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The <jvmti/> environment.
0N/A </description>
0N/A </param>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment.
0N/A </description>
0N/A </param>
0N/A <param id="arg">
0N/A <outptr>
0N/A <void/>
0N/A </outptr>
0N/A <description>
0N/A The <code>arg</code> parameter passed to
0N/A <functionlink id="RunAgentThread"></functionlink>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <function id="RunAgentThread" num="12">
0N/A <synopsis>Run Agent Thread</synopsis>
0N/A <description>
0N/A Starts the execution of an agent thread. with the specified native function.
0N/A The parameter <paramlink id="arg"></paramlink> is forwarded on to the
0N/A <functionlink id="jvmtiStartFunction">start function</functionlink>
0N/A (specified with <paramlink id="proc"></paramlink>) as its single argument.
0N/A This function allows the creation of agent threads
0N/A for handling communication with another process or for handling events
0N/A without the need to load a special subclass of <code>java.lang.Thread</code> or
0N/A implementer of <code>java.lang.Runnable</code>.
0N/A Instead, the created thread can run entirely in native code.
0N/A However, the created thread does require a newly created instance
0N/A of <code>java.lang.Thread</code> (referenced by the argument <code>thread</code>) to
0N/A which it will be associated.
0N/A The thread object can be created with JNI calls.
0N/A <p/>
0N/A The following common thread priorities are provided for your convenience:
0N/A <constants id="jvmtiThreadPriority" label="Thread Priority Constants" kind="const">
0N/A <constant id="JVMTI_THREAD_MIN_PRIORITY" num="1">
0N/A Minimum possible thread priority
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_NORM_PRIORITY" num="5">
0N/A Normal thread priority
0N/A </constant>
0N/A <constant id="JVMTI_THREAD_MAX_PRIORITY" num="10">
0N/A Maximum possible thread priority
0N/A </constant>
0N/A </constants>
0N/A <p/>
0N/A The new thread is started as a daemon thread with the specified
0N/A <paramlink id="priority"></paramlink>.
0N/A If enabled, a <eventlink id="ThreadStart"/> event will be sent.
0N/A <p/>
0N/A Since the thread has been started, the thread will be live when this function
0N/A returns, unless the thread has died immediately.
0N/A <p/>
0N/A The thread group of the thread is ignored -- specifically, the thread is not
0N/A added to the thread group and the thread is not seen on queries of the thread
0N/A group at either the Java programming language or <jvmti/> levels.
0N/A <p/>
0N/A The thread is not visible to Java programming language queries but is
0N/A included in <jvmti/> queries (for example,
0N/A <functionlink id="GetAllThreads"/> and
0N/A <functionlink id="GetAllStackTraces"/>).
0N/A <p/>
0N/A Upon execution of <code>proc</code>, the new thread will be attached to the
0N/A VM--see the JNI documentation on
0N/A <externallink id="http://java.sun.com/javase/6/docs/technotes/guides/jni/spec/invocation.html#wp1060"
0N/A >Attaching to the VM</externallink>.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread impl="noconvert" started="no"/>
0N/A <description>
0N/A The thread to run.
0N/A </description>
0N/A </param>
0N/A <param id="proc">
0N/A <ptrtype>
0N/A <struct>jvmtiStartFunction</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The start function.
0N/A </description>
0N/A </param>
0N/A <param id="arg">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok><code>NULL</code> is passed to the start function</nullok>
0N/A </inbuf>
0N/A <description>
0N/A The argument to the start function.
0N/A </description>
0N/A </param>
0N/A <param id="priority">
0N/A <jint/>
0N/A <description>
0N/A The priority of the started thread. Any thread
0N/A priority allowed by <code>java.lang.Thread.setPriority</code> can be used including
0N/A those in <datalink id="jvmtiThreadPriority"></datalink>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_PRIORITY">
0N/A <paramlink id="priority"/> is less than
0N/A <datalink id="JVMTI_THREAD_MIN_PRIORITY"/>
0N/A or greater than
0N/A <datalink id="JVMTI_THREAD_MAX_PRIORITY"/>
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetThreadLocalStorage" jkernel="yes" impl="notrace" phase="start" num="103">
0N/A <synopsis>Set Thread Local Storage</synopsis>
0N/A <description>
0N/A The VM stores a pointer value associated with each environment-thread
0N/A pair. This pointer value is called <i>thread-local storage</i>.
0N/A This value is <code>NULL</code> unless set with this function.
0N/A Agents can allocate memory in which they store thread specific
0N/A information. By setting thread-local storage it can then be
0N/A accessed with
0N/A <functionlink id="GetThreadLocalStorage"></functionlink>.
0N/A <p/>
0N/A This function is called by the agent to set the value of the <jvmti/>
0N/A thread-local storage. <jvmti/> supplies to the agent a pointer-size
0N/A thread-local storage that can be used to record per-thread
0N/A information.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A Store to this thread.
0N/A </description>
0N/A </param>
0N/A <param id="data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok>value is set to <code>NULL</code></nullok>
0N/A </inbuf>
0N/A <description>
0N/A The value to be entered into the thread-local storage.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetThreadLocalStorage" jkernel="yes" impl="innative notrace" phase="start" num="102">
0N/A <synopsis>Get Thread Local Storage</synopsis>
0N/A <description>
0N/A Called by the agent to get the value of the <jvmti/> thread-local
0N/A storage.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" impl="noconvert"/>
0N/A <description>
0N/A Retrieve from this thread.
0N/A </description>
0N/A </param>
0N/A <param id="data_ptr">
0N/A <agentbuf><void/></agentbuf>
0N/A <description>
0N/A Pointer through which the value of the thread local
0N/A storage is returned.
0N/A If thread-local storage has not been set with
0N/A <functionlink id="SetThreadLocalStorage"></functionlink> the returned
0N/A pointer is <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="thread_groups" label="Thread Group">
0N/A <intro>
0N/A </intro>
0N/A
0N/A <function id="GetTopThreadGroups" num="13">
0N/A <synopsis>Get Top Thread Groups</synopsis>
0N/A <description>
0N/A Return all top-level (parentless) thread groups in the VM.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="group_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of top-level thread groups.
0N/A </description>
0N/A </param>
0N/A <param id="groups_ptr">
0N/A <allocbuf outcount="group_count_ptr"><jthreadGroup/></allocbuf>
0N/A <description>
0N/A On return, refers to a pointer to the top-level thread group array.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetThreadGroupInfo" num="14">
0N/A <synopsis>Get Thread Group Info</synopsis>
0N/A <typedef id="jvmtiThreadGroupInfo" label="Thread group information structure">
0N/A <field id="parent">
0N/A <jthreadGroup/>
0N/A <description>
0N/A The parent thread group.
0N/A </description>
0N/A </field>
0N/A <field id="name">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The thread group's name, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </field>
0N/A <field id="max_priority">
0N/A <jint/>
0N/A <description>
0N/A The maximum priority for this thread group.
0N/A </description>
0N/A </field>
0N/A <field id="is_daemon">
0N/A <jboolean/>
0N/A <description>
0N/A Is this a daemon thread group?
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <description>
0N/A Get information about the thread group. The fields of the
0N/A <functionlink id="jvmtiThreadGroupInfo"></functionlink> structure
0N/A are filled in with details of the specified thread group.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="group">
0N/A <jthreadGroup/>
0N/A <description>
0N/A The thread group to query.
0N/A </description>
0N/A </param>
0N/A <param id="info_ptr">
0N/A <outptr><struct>jvmtiThreadGroupInfo</struct></outptr>
0N/A <description>
0N/A On return, filled with information describing the specified
0N/A thread group.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetThreadGroupChildren" num="15">
0N/A <synopsis>Get Thread Group Children</synopsis>
0N/A <description>
0N/A Get the live threads and active subgroups in this thread group.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="group">
0N/A <jthreadGroup/>
0N/A <description>
0N/A The group to query.
0N/A </description>
0N/A </param>
0N/A <param id="thread_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of live threads in this thread group.
0N/A </description>
0N/A </param>
0N/A <param id="threads_ptr">
0N/A <allocbuf outcount="thread_count_ptr"><jthread/></allocbuf>
0N/A <description>
0N/A On return, points to an array of the live threads in this thread group.
0N/A </description>
0N/A </param>
0N/A <param id="group_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of active child thread groups
0N/A </description>
0N/A </param>
0N/A <param id="groups_ptr">
0N/A <allocbuf outcount="group_count_ptr"><jthreadGroup/></allocbuf>
0N/A <description>
0N/A On return, points to an array of the active child thread groups.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A </category>
0N/A
0N/A <category id="stack" label="Stack Frame">
0N/A <intro>
0N/A These functions provide information about the stack of a thread.
0N/A Stack frames are referenced by depth.
0N/A The frame at depth zero is the current frame.
0N/A <p/>
2427N/A Stack frames are as described in
2427N/A <vmspec chapter="3.6"/>,
0N/A That is, they correspond to method
0N/A invocations (including native methods) but do not correspond to platform native or
0N/A VM internal frames.
0N/A <p/>
0N/A A <jvmti/> implementation may use method invocations to launch a thread and
0N/A the corresponding frames may be included in the stack as presented by these functions --
0N/A that is, there may be frames shown
0N/A deeper than <code>main()</code> and <code>run()</code>.
0N/A However this presentation must be consistent across all <jvmti/> functionality which
0N/A uses stack frames or stack depth.
0N/A </intro>
0N/A
0N/A <typedef id="jvmtiFrameInfo" label="Stack frame information structure">
0N/A <description>
0N/A Information about a stack frame is returned in this structure.
0N/A </description>
0N/A <field id="method">
0N/A <jmethodID/>
0N/A <description>
0N/A The method executing in this frame.
0N/A </description>
0N/A </field>
0N/A <field id="location">
0N/A <jlocation/>
0N/A <description>
0N/A The index of the instruction executing in this frame.
0N/A <code>-1</code> if the frame is executing a native method.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <typedef id="jvmtiStackInfo" label="Stack information structure">
0N/A <description>
0N/A Information about a set of stack frames is returned in this structure.
0N/A </description>
0N/A <field id="thread">
0N/A <jthread/>
0N/A <description>
0N/A On return, the thread traced.
0N/A </description>
0N/A </field>
0N/A <field id="state">
0N/A <jint/>
0N/A <description>
0N/A On return, the thread state. See <functionlink id="GetThreadState"></functionlink>.
0N/A </description>
0N/A </field>
0N/A <field id="frame_buffer">
0N/A <outbuf incount="max_frame_count">
0N/A <struct>jvmtiFrameInfo</struct>
0N/A </outbuf>
0N/A <description>
0N/A On return, this agent allocated buffer is filled
0N/A with stack frame information.
0N/A </description>
0N/A </field>
0N/A <field id="frame_count">
0N/A <jint/>
0N/A <description>
0N/A On return, the number of records filled into
0N/A <code>frame_buffer</code>.
0N/A This will be
0N/A min(<code>max_frame_count</code>, <i>stackDepth</i>).
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <function id="GetStackTrace" num="104">
0N/A <synopsis>Get Stack Trace</synopsis>
0N/A <description>
0N/A Get information about the stack of a thread.
0N/A If <paramlink id="max_frame_count"></paramlink> is less than the depth of the stack,
0N/A the <paramlink id="max_frame_count"></paramlink> topmost frames are returned,
0N/A otherwise the entire stack is returned.
0N/A The topmost frames, those most recently invoked, are at the beginning of the returned buffer.
0N/A <p/>
0N/A The following example causes up to five of the topmost frames
0N/A to be returned and (if there are any frames) the currently
0N/A executing method name to be printed.
0N/A <example>
0N/AjvmtiFrameInfo frames[5];
0N/Ajint count;
0N/AjvmtiError err;
0N/A
0N/Aerr = (*jvmti)-&gt;GetStackTrace(jvmti, aThread, 0, 5,
0N/A &amp;frames, &amp;count);
0N/Aif (err == JVMTI_ERROR_NONE &amp;&amp; count &gt;= 1) {
0N/A char *methodName;
0N/A err = (*jvmti)-&gt;GetMethodName(jvmti, frames[0].method,
0N/A &amp;methodName, NULL);
0N/A if (err == JVMTI_ERROR_NONE) {
0N/A printf("Executing method: %s", methodName);
0N/A }
0N/A}
0N/A </example>
0N/A <todo>
0N/A check example code.
0N/A </todo>
0N/A <p/>
0N/A The <paramlink id="thread"></paramlink> need not be suspended
0N/A to call this function.
0N/A <p/>
0N/A The <functionlink id="GetLineNumberTable"></functionlink>
0N/A function can be used to map locations to line numbers. Note that
0N/A this mapping can be done lazily.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A Fetch the stack trace of this thread.
0N/A </description>
0N/A </param>
0N/A <param id="start_depth">
0N/A <jint/>
0N/A <description>
0N/A Begin retrieving frames at this depth.
0N/A If non-negative, count from the current frame,
0N/A the first frame retrieved is at depth <code>start_depth</code>.
0N/A For example, if zero, start from the current frame; if one, start from the
0N/A caller of the current frame; if two, start from the caller of the
0N/A caller of the current frame; and so on.
0N/A If negative, count from below the oldest frame,
0N/A the first frame retrieved is at depth <i>stackDepth</i><code> + start_depth</code>,
0N/A where <i>stackDepth</i> is the count of frames on the stack.
0N/A For example, if negative one, only the oldest frame is retrieved;
0N/A if negative two, start from the frame called by the oldest frame.
0N/A </description>
0N/A </param>
0N/A <param id="max_frame_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The maximum number of <datalink id="jvmtiFrameInfo"/> records to retrieve.
0N/A </description>
0N/A </param>
0N/A <param id="frame_buffer">
0N/A <outbuf incount="max_frame_count" outcount="count_ptr">
0N/A <struct>jvmtiFrameInfo</struct>
0N/A </outbuf>
0N/A <description>
0N/A On return, this agent allocated buffer is filled
0N/A with stack frame information.
0N/A </description>
0N/A </param>
0N/A <param id="count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of records filled in.
0N/A For non-negative <code>start_depth</code>, this will be
0N/A min(<code>max_frame_count</code>, <i>stackDepth</i><code> - start_depth</code>).
0N/A For negative <code>start_depth</code>, this will be
0N/A min(<code>max_frame_count</code>, <code>-start_depth</code>).
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A <paramlink id="start_depth"/> is positive and greater than or equal to <i>stackDepth</i>.
0N/A Or <paramlink id="start_depth"/> is negative and less than <i>-stackDepth</i>.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A
0N/A <function id="GetAllStackTraces" num="100">
0N/A <synopsis>Get All Stack Traces</synopsis>
0N/A <description>
0N/A Get information about the stacks of all live threads
0N/A (including <internallink id="RunAgentThread">agent threads</internallink>).
0N/A If <paramlink id="max_frame_count"/> is less than the depth of a stack,
0N/A the <paramlink id="max_frame_count"/> topmost frames are returned for that thread,
0N/A otherwise the entire stack is returned.
0N/A The topmost frames, those most recently invoked, are at the beginning of the returned buffer.
0N/A <p/>
0N/A All stacks are collected simultaneously, that is, no changes will occur to the
0N/A thread state or stacks between the sampling of one thread and the next.
0N/A The threads need not be suspended.
0N/A
0N/A <example>
0N/AjvmtiStackInfo *stack_info;
0N/Ajint thread_count;
0N/Aint ti;
0N/AjvmtiError err;
0N/A
0N/Aerr = (*jvmti)-&gt;GetAllStackTraces(jvmti, MAX_FRAMES, &amp;stack_info, &amp;thread_count);
0N/Aif (err != JVMTI_ERROR_NONE) {
0N/A ...
0N/A}
0N/Afor (ti = 0; ti &lt; thread_count; ++ti) {
0N/A jvmtiStackInfo *infop = &amp;stack_info[ti];
0N/A jthread thread = infop-&gt;thread;
0N/A jint state = infop-&gt;state;
0N/A jvmtiFrameInfo *frames = infop-&gt;frame_buffer;
0N/A int fi;
0N/A
0N/A myThreadAndStatePrinter(thread, state);
0N/A for (fi = 0; fi &lt; infop-&gt;frame_count; fi++) {
0N/A myFramePrinter(frames[fi].method, frames[fi].location);
0N/A }
0N/A}
0N/A/* this one Deallocate call frees all data allocated by GetAllStackTraces */
0N/Aerr = (*jvmti)-&gt;Deallocate(jvmti, stack_info);
0N/A </example>
0N/A <todo>
0N/A check example code.
0N/A </todo>
0N/A
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="max_frame_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The maximum number of <datalink id="jvmtiFrameInfo"/> records to retrieve per thread.
0N/A </description>
0N/A </param>
0N/A <param id="stack_info_ptr">
0N/A <allocbuf>
0N/A <struct>jvmtiStackInfo</struct>
0N/A </allocbuf>
0N/A <description>
0N/A On return, this buffer is filled
0N/A with stack information for each thread.
0N/A The number of <datalink id="jvmtiStackInfo"/> records is determined
0N/A by <paramlink id="thread_count_ptr"/>.
0N/A <p/>
0N/A Note that this buffer is allocated to include the <datalink id="jvmtiFrameInfo"/>
0N/A buffers pointed to by <datalink id="jvmtiStackInfo.frame_buffer"/>.
0N/A These buffers must not be separately deallocated.
0N/A </description>
0N/A </param>
0N/A <param id="thread_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A The number of threads traced.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetThreadListStackTraces" num="101">
0N/A <synopsis>Get Thread List Stack Traces</synopsis>
0N/A <description>
0N/A Get information about the stacks of the supplied threads.
0N/A If <paramlink id="max_frame_count"/> is less than the depth of a stack,
0N/A the <paramlink id="max_frame_count"/> topmost frames are returned for that thread,
0N/A otherwise the entire stack is returned.
0N/A The topmost frames, those most recently invoked, are at the beginning of the returned buffer.
0N/A <p/>
0N/A All stacks are collected simultaneously, that is, no changes will occur to the
0N/A thread state or stacks between the sampling one thread and the next.
0N/A The threads need not be suspended.
0N/A <p/>
0N/A If a thread has not yet started or terminates before the stack information is collected,
0N/A a zero length stack (<datalink id="jvmtiStackInfo.frame_count"/> will be zero)
0N/A will be returned and the thread <datalink id="jvmtiStackInfo.state"/> can be checked.
0N/A <p/>
0N/A See the example for the similar function
0N/A <functionlink id="GetAllStackTraces"/>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The number of threads to trace.
0N/A </description>
0N/A </param>
0N/A <param id="thread_list">
0N/A <inbuf incount="thread_count"><jthread/></inbuf>
0N/A <description>
0N/A The list of threads to trace.
0N/A </description>
0N/A </param>
0N/A <param id="max_frame_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The maximum number of <datalink id="jvmtiFrameInfo"/> records to retrieve per thread.
0N/A </description>
0N/A </param>
0N/A <param id="stack_info_ptr">
0N/A <allocbuf outcount="thread_count">
0N/A <struct>jvmtiStackInfo</struct>
0N/A </allocbuf>
0N/A <description>
0N/A On return, this buffer is filled
0N/A with stack information for each thread.
0N/A The number of <datalink id="jvmtiStackInfo"/> records is determined
0N/A by <paramlink id="thread_count"/>.
0N/A <p/>
0N/A Note that this buffer is allocated to include the <datalink id="jvmtiFrameInfo"/>
0N/A buffers pointed to by <datalink id="jvmtiStackInfo.frame_buffer"/>.
0N/A These buffers must not be separately deallocated.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_THREAD">
0N/A An element in <paramlink id="thread_list"/> is not a thread object.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <elide>
0N/A <function id="AsyncGetStackTrace" num="1000">
0N/A <synopsis>Get Stack Trace--Asynchronous</synopsis>
0N/A <description>
0N/A Get information about the entire stack of a thread (or a sub-section of it).
0N/A This is the asynchronous version of <functionlink id="GetStackTrace"></functionlink>
0N/A and is reentrant and safe to call
0N/A from asynchronous signal handlers.
0N/A The stack trace is returned only for the calling thread.
0N/A <p/>
0N/A The <functionlink id="GetLineNumberTable"></functionlink>
0N/A function can be used to map locations to line numbers. Note that
0N/A this mapping can be done lazily.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A <required id="can_get_async_stack_trace"></required>
0N/A <capability id="can_show_JVM_spec_async_frames">
0N/A If <code>false</code>,
0N/A <paramlink id="use_java_stack"></paramlink>
0N/A must be <code>false</code>.
0N/A </capability>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="use_java_stack">
0N/A <jboolean/>
0N/A <description>
2427N/A Return the stack showing <vmspec/>
0N/A model of the stack;
0N/A otherwise, show the internal representation of the stack with
0N/A inlined and optimized methods missing. If the virtual machine
0N/A is using the <i>Java Virtual Machine Specification</i> stack model
0N/A internally, this flag is ignored.
0N/A </description>
0N/A </param>
0N/A <param id="max_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The maximum number of <datalink id="jvmtiFrameInfo"/> records to retrieve.
0N/A Retrieve this many unless the stack depth is less than <code>max_count</code>.
0N/A </description>
0N/A </param>
0N/A <param id="frame_buffer">
0N/A <outbuf incount="max_count" outcount="count_ptr">
0N/A <struct>jvmtiFrameInfo</struct>
0N/A <nullok>this information is not returned</nullok>
0N/A </outbuf>
0N/A <description>
0N/A The agent passes in a buffer
0N/A large enough to hold <code>max_count</code> records of
0N/A <datalink id="jvmtiFrameInfo"></datalink>. This buffer must be
0N/A pre-allocated by the agent.
0N/A </description>
0N/A </param>
0N/A <param id="count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of records filled in..
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_UNATTACHED_THREAD">
0N/A The thread being used to call this function is not attached
0N/A to the virtual machine. Calls must be made from attached threads.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A </elide>
0N/A
0N/A <function id="GetFrameCount" num="16">
0N/A <synopsis>Get Frame Count</synopsis>
0N/A <description>
0N/A Get the number of frames currently in the specified thread's call stack.
0N/A <p/>
0N/A If this function is called for a thread actively executing bytecodes (for example,
0N/A not the current thread and not suspended), the information returned is transient.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread to query.
0N/A </description>
0N/A </param>
0N/A <param id="count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of frames in the call stack.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="PopFrame" num="80">
0N/A <synopsis>Pop Frame</synopsis>
0N/A <description>
0N/A Pop the current frame of <code>thread</code>'s stack.
0N/A Popping a frame takes you to the previous frame.
0N/A When the thread is resumed, the execution
0N/A state of the thread is reset to the state
0N/A immediately before the called method was invoked.
2427N/A That is (using <vmspec/> terminology):
0N/A <ul>
0N/A <li>the current frame is discarded as the previous frame becomes the current one</li>
0N/A <li>the operand stack is restored--the argument values are added back
0N/A and if the invoke was not <code>invokestatic</code>,
0N/A <code>objectref</code> is added back as well</li>
0N/A <li>the Java virtual machine PC is restored to the opcode
0N/A of the invoke instruction</li>
0N/A </ul>
0N/A Note however, that any changes to the arguments, which
0N/A occurred in the called method, remain;
0N/A when execution continues, the first instruction to
0N/A execute will be the invoke.
0N/A <p/>
0N/A Between calling <code>PopFrame</code> and resuming the
0N/A thread the state of the stack is undefined.
0N/A To pop frames beyond the first,
0N/A these three steps must be repeated:
0N/A <ul>
0N/A <li>suspend the thread via an event (step, breakpoint, ...)</li>
0N/A <li>call <code>PopFrame</code></li>
0N/A <li>resume the thread</li>
0N/A </ul>
0N/A <p/>
0N/A A lock acquired by calling the called method
0N/A (if it is a <code>synchronized</code> method)
0N/A and locks acquired by entering <code>synchronized</code>
0N/A blocks within the called method are released.
0N/A Note: this does not apply to native locks or
0N/A <code>java.util.concurrent.locks</code> locks.
0N/A <p/>
0N/A Finally blocks are not executed.
0N/A <p/>
0N/A Changes to global state are not addressed and thus remain changed.
0N/A <p/>
0N/A The specified thread must be suspended (which implies it cannot be the current thread).
0N/A <p/>
0N/A Both the called method and calling method must be non-native Java programming
0N/A language methods.
0N/A <p/>
0N/A No <jvmti/> events are generated by this function.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_pop_frame"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A The thread whose current frame is to be popped.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Called or calling method is a native method.
0N/A The implementation is unable to pop this frame.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NO_MORE_FRAMES">
0N/A There are less than two stack frames on the call stack.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetFrameLocation" num="19">
0N/A <synopsis>Get Frame Location</synopsis>
0N/A <description>
0N/A <p/>
0N/A For a Java programming language frame, return the location of the instruction
0N/A currently executing.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame to query.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame to query.
0N/A </description>
0N/A </param>
0N/A <param id="method_ptr">
0N/A <outptr><jmethodID/></outptr>
0N/A <description>
0N/A On return, points to the method for the current location.
0N/A </description>
0N/A </param>
0N/A <param id="location_ptr">
0N/A <outptr><jlocation/></outptr>
0N/A <description>
0N/A On return, points to the index of the currently
0N/A executing instruction.
0N/A Is set to <code>-1</code> if the frame is executing
0N/A a native method.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="NotifyFramePop" num="20">
0N/A <synopsis>Notify Frame Pop</synopsis>
0N/A <description>
0N/A When the frame that is currently at <paramlink id="depth"></paramlink>
0N/A is popped from the stack, generate a
0N/A <eventlink id="FramePop"></eventlink> event. See the
0N/A <eventlink id="FramePop"></eventlink> event for details.
0N/A Only frames corresponding to non-native Java programming language
0N/A methods can receive notification.
0N/A <p/>
0N/A The specified thread must either be the current thread
0N/A or the thread must be suspended.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_frame_pop_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="depth"/>
0N/A <description>
0N/A The thread of the frame for which the frame pop event will be generated.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame for which the frame pop event will be generated.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A The frame at <code>depth</code> is executing a
0N/A native method.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not suspended and was not the current thread.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="ForceEarlyReturn" label="Force Early Return">
0N/A <intro>
0N/A These functions allow an agent to force a method
0N/A to return at any point during its execution.
0N/A The method which will return early is referred to as the <i>called method</i>.
0N/A The called method is the current method
2427N/A (as defined by
2427N/A <vmspec chapter="3.6"/>)
0N/A for the specified thread at
0N/A the time the function is called.
0N/A <p/>
0N/A The specified thread must be suspended or must be the current thread.
0N/A The return occurs when execution of Java programming
0N/A language code is resumed on this thread.
0N/A Between calling one of these functions and resumption
0N/A of thread execution, the state of the stack is undefined.
0N/A <p/>
0N/A No further instructions are executed in the called method.
0N/A Specifically, finally blocks are not executed.
0N/A Note: this can cause inconsistent states in the application.
0N/A <p/>
0N/A A lock acquired by calling the called method
0N/A (if it is a <code>synchronized</code> method)
0N/A and locks acquired by entering <code>synchronized</code>
0N/A blocks within the called method are released.
0N/A Note: this does not apply to native locks or
0N/A <code>java.util.concurrent.locks</code> locks.
0N/A <p/>
0N/A Events, such as <eventlink id="MethodExit"></eventlink>,
0N/A are generated as they would be in a normal return.
0N/A <p/>
0N/A The called method must be a non-native Java programming
0N/A language method.
0N/A Forcing return on a thread with only one frame on the
0N/A stack causes the thread to exit when resumed.
0N/A </intro>
0N/A
0N/A <function id="ForceEarlyReturnObject" num="81" since="1.1">
0N/A <synopsis>Force Early Return - Object</synopsis>
0N/A <description>
0N/A This function can be used to return from a method whose
0N/A result type is <code>Object</code>
0N/A or a subclass of <code>Object</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_force_early_return"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread whose current frame is to return early.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jobject/>
0N/A <description>
0N/A The return value for the called frame.
0N/A An object or <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Attempted to return early from a frame
0N/A corresponding to a native method.
0N/A Or the implementation is unable to provide
0N/A this functionality on this frame.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The result type of the called method is not
0N/A <code>Object</code> or a subclass of <code>Object</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The supplied <paramlink id="value"/> is not compatible with the
0N/A result type of the called method.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not the current thread and was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NO_MORE_FRAMES">
0N/A There are no more frames on the call stack.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ForceEarlyReturnInt" num="82" since="1.1">
0N/A <synopsis>Force Early Return - Int</synopsis>
0N/A <description>
0N/A This function can be used to return from a method whose
0N/A result type is <code>int</code>, <code>short</code>,
0N/A <code>char</code>, <code>byte</code>, or
0N/A <code>boolean</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_force_early_return"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread whose current frame is to return early.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jint/>
0N/A <description>
0N/A The return value for the called frame.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Attempted to return early from a frame
0N/A corresponding to a native method.
0N/A Or the implementation is unable to provide
0N/A this functionality on this frame.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The result type of the called method is not
0N/A <code>int</code>, <code>short</code>,
0N/A <code>char</code>, <code>byte</code>, or
0N/A <code>boolean</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not the current thread and was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NO_MORE_FRAMES">
0N/A There are no frames on the call stack.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ForceEarlyReturnLong" num="83" since="1.1">
0N/A <synopsis>Force Early Return - Long</synopsis>
0N/A <description>
0N/A This function can be used to return from a method whose
0N/A result type is <code>long</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_force_early_return"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread whose current frame is to return early.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jlong/>
0N/A <description>
0N/A The return value for the called frame.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Attempted to return early from a frame
0N/A corresponding to a native method.
0N/A Or the implementation is unable to provide
0N/A this functionality on this frame.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The result type of the called method is not <code>long</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not the current thread and was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NO_MORE_FRAMES">
0N/A There are no frames on the call stack.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ForceEarlyReturnFloat" num="84" since="1.1">
0N/A <synopsis>Force Early Return - Float</synopsis>
0N/A <description>
0N/A This function can be used to return from a method whose
0N/A result type is <code>float</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_force_early_return"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread whose current frame is to return early.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jfloat/>
0N/A <description>
0N/A The return value for the called frame.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Attempted to return early from a frame
0N/A corresponding to a native method.
0N/A Or the implementation is unable to provide
0N/A this functionality on this frame.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The result type of the called method is not <code>float</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not the current thread and was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NO_MORE_FRAMES">
0N/A There are no frames on the call stack.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ForceEarlyReturnDouble" num="85" since="1.1">
0N/A <synopsis>Force Early Return - Double</synopsis>
0N/A <description>
0N/A This function can be used to return from a method whose
0N/A result type is <code>double</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_force_early_return"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread whose current frame is to return early.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jdouble/>
0N/A <description>
0N/A The return value for the called frame.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Attempted to return early from a frame corresponding to a native method.
0N/A Or the implementation is unable to provide this functionality on this frame.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The result type of the called method is not <code>double</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not the current thread and was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NO_MORE_FRAMES">
0N/A There are no frames on the call stack.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ForceEarlyReturnVoid" num="86" since="1.1">
0N/A <synopsis>Force Early Return - Void</synopsis>
0N/A <description>
0N/A This function can be used to return from a method with no result type.
0N/A That is, the called method must be declared <code>void</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_force_early_return"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread whose current frame is to return early.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Attempted to return early from a frame
0N/A corresponding to a native method.
0N/A Or the implementation is unable to provide
0N/A this functionality on this frame.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The called method has a result type.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_SUSPENDED">
0N/A Thread was not the current thread and was not suspended.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NO_MORE_FRAMES">
0N/A There are no frames on the call stack.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="Heap" label="Heap">
0N/A <intro>
0N/A These functions are used to analyze the heap.
0N/A Functionality includes the ability to view the objects in the
0N/A heap and to tag these objects.
0N/A </intro>
0N/A
0N/A <intro id="objectTags" label="Object Tags">
0N/A A <i>tag</i> is a value associated with an object.
0N/A Tags are explicitly set by the agent using the
0N/A <functionlink id="SetTag"></functionlink> function or by
0N/A callback functions such as <functionlink id="jvmtiHeapIterationCallback"/>.
0N/A <p/>
0N/A Tags are local to the environment; that is, the tags of one
0N/A environment are not visible in another.
0N/A <p/>
0N/A Tags are <code>jlong</code> values which can be used
0N/A simply to mark an object or to store a pointer to more detailed
0N/A information. Objects which have not been tagged have a
0N/A tag of zero.
0N/A Setting a tag to zero makes the object untagged.
0N/A </intro>
0N/A
0N/A <intro id="heapCallbacks" label="Heap Callback Functions">
0N/A Heap functions which iterate through the heap and recursively
0N/A follow object references use agent supplied callback functions
0N/A to deliver the information.
0N/A <p/>
0N/A These heap callback functions must adhere to the following restrictions --
0N/A These callbacks must not use JNI functions.
0N/A These callbacks must not use <jvmti/> functions except
0N/A <i>callback safe</i> functions which
0N/A specifically allow such use (see the raw monitor, memory management,
0N/A and environment local storage functions).
0N/A <p/>
0N/A An implementation may invoke a callback on an internal thread or
0N/A the thread which called the iteration function.
0N/A Heap callbacks are single threaded -- no more than one callback will
0N/A be invoked at a time.
0N/A <p/>
0N/A The Heap Filter Flags can be used to prevent reporting
0N/A based on the tag status of an object or its class.
0N/A If no flags are set (the <code>jint</code> is zero), objects
0N/A will not be filtered out.
0N/A
0N/A <constants id="jvmtiHeapFilter" label="Heap Filter Flags" kind="bits">
0N/A <constant id="JVMTI_HEAP_FILTER_TAGGED" num="0x4">
0N/A Filter out tagged objects. Objects which are tagged are not included.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_FILTER_UNTAGGED" num="0x8">
0N/A Filter out untagged objects. Objects which are not tagged are not included.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_FILTER_CLASS_TAGGED" num="0x10">
0N/A Filter out objects with tagged classes. Objects whose class is tagged are not included.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_FILTER_CLASS_UNTAGGED" num="0x20">
0N/A Filter out objects with untagged classes. Objects whose class is not tagged are not included.
0N/A </constant>
0N/A </constants>
0N/A
0N/A <p/>
0N/A The Heap Visit Control Flags are returned by the heap callbacks
0N/A and can be used to abort the iteration. For the
0N/A <functionlink id="jvmtiHeapReferenceCallback">Heap
0N/A Reference Callback</functionlink>, it can also be used
0N/A to prune the graph of traversed references
0N/A (<code>JVMTI_VISIT_OBJECTS</code> is not set).
0N/A
0N/A <constants id="jvmtiHeapVisitControl"
0N/A label="Heap Visit Control Flags"
0N/A kind="bits"
0N/A since="1.1">
0N/A <constant id="JVMTI_VISIT_OBJECTS" num="0x100">
0N/A If we are visiting an object and if this callback
0N/A was initiated by <functionlink id="FollowReferences"/>,
0N/A traverse the references of this object.
0N/A Otherwise ignored.
0N/A </constant>
0N/A <constant id="JVMTI_VISIT_ABORT" num="0x8000">
0N/A Abort the iteration. Ignore all other bits.
0N/A </constant>
0N/A </constants>
0N/A
0N/A <p/>
0N/A The Heap Reference Enumeration is provided by the
0N/A <functionlink id="jvmtiHeapReferenceCallback">Heap
0N/A Reference Callback</functionlink> and
0N/A <functionlink id="jvmtiPrimitiveFieldCallback">Primitive Field
0N/A Callback</functionlink> to
0N/A describe the kind of reference
0N/A being reported.
0N/A
0N/A <constants id="jvmtiHeapReferenceKind"
0N/A label="Heap Reference Enumeration"
0N/A kind="enum"
0N/A since="1.1">
0N/A <constant id="JVMTI_HEAP_REFERENCE_CLASS" num="1">
0N/A Reference from an object to its class.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_FIELD" num="2">
0N/A Reference from an object to the value of one of its instance fields.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT" num="3">
0N/A Reference from an array to one of its elements.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_CLASS_LOADER" num="4">
0N/A Reference from a class to its class loader.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_SIGNERS" num="5">
0N/A Reference from a class to its signers array.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN" num="6">
0N/A Reference from a class to its protection domain.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_INTERFACE" num="7">
0N/A Reference from a class to one of its interfaces.
0N/A Note: interfaces are defined via a constant pool reference,
0N/A so the referenced interfaces may also be reported with a
0N/A <code>JVMTI_HEAP_REFERENCE_CONSTANT_POOL</code> reference kind.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_STATIC_FIELD" num="8">
0N/A Reference from a class to the value of one of its static fields.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL" num="9">
0N/A Reference from a class to a resolved entry in the constant pool.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_SUPERCLASS" num="10">
0N/A Reference from a class to its superclass.
0N/A A callback is bot sent if the superclass is <code>java.lang.Object</code>.
0N/A Note: loaded classes define superclasses via a constant pool
0N/A reference, so the referenced superclass may also be reported with
0N/A a <code>JVMTI_HEAP_REFERENCE_CONSTANT_POOL</code> reference kind.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_JNI_GLOBAL" num="21">
0N/A Heap root reference: JNI global reference.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_SYSTEM_CLASS" num="22">
0N/A Heap root reference: System class.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_MONITOR" num="23">
0N/A Heap root reference: monitor.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_STACK_LOCAL" num="24">
0N/A Heap root reference: local variable on the stack.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_JNI_LOCAL" num="25">
0N/A Heap root reference: JNI local reference.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_THREAD" num="26">
0N/A Heap root reference: Thread.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_REFERENCE_OTHER" num="27">
0N/A Heap root reference: other heap root reference.
0N/A </constant>
0N/A </constants>
0N/A
0N/A <p/>
0N/A Definitions for the single character type descriptors of
0N/A primitive types.
0N/A
0N/A <constants id="jvmtiPrimitiveType"
0N/A label="Primitive Type Enumeration"
0N/A kind="enum"
0N/A since="1.1">
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_BOOLEAN" num="90">
0N/A 'Z' - Java programming language <code>boolean</code> - JNI <code>jboolean</code>
0N/A </constant>
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_BYTE" num="66">
0N/A 'B' - Java programming language <code>byte</code> - JNI <code>jbyte</code>
0N/A </constant>
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_CHAR" num="67">
0N/A 'C' - Java programming language <code>char</code> - JNI <code>jchar</code>
0N/A </constant>
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_SHORT" num="83">
0N/A 'S' - Java programming language <code>short</code> - JNI <code>jshort</code>
0N/A </constant>
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_INT" num="73">
0N/A 'I' - Java programming language <code>int</code> - JNI <code>jint</code>
0N/A </constant>
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_LONG" num="74">
0N/A 'J' - Java programming language <code>long</code> - JNI <code>jlong</code>
0N/A </constant>
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_FLOAT" num="70">
0N/A 'F' - Java programming language <code>float</code> - JNI <code>jfloat</code>
0N/A </constant>
0N/A <constant id="JVMTI_PRIMITIVE_TYPE_DOUBLE" num="68">
0N/A 'D' - Java programming language <code>double</code> - JNI <code>jdouble</code>
0N/A </constant>
0N/A </constants>
0N/A </intro>
0N/A
0N/A <typedef id="jvmtiHeapReferenceInfoField"
0N/A label="Reference information structure for Field references"
0N/A since="1.1">
0N/A <description>
0N/A Reference information returned for
0N/A <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/> and
0N/A <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/> references.
0N/A </description>
0N/A <field id="index">
0N/A <jint/>
0N/A <description>
0N/A For <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/>, the
0N/A referrer object is not a class or an inteface.
0N/A In this case, <code>index</code> is the index of the field
0N/A in the class of the referrer object.
0N/A This class is referred to below as <i>C</i>.
0N/A <p/>
0N/A For <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/>,
0N/A the referrer object is a class (referred to below as <i>C</i>)
0N/A or an interface (referred to below as <i>I</i>).
0N/A In this case, <code>index</code> is the index of the field in
0N/A that class or interface.
0N/A <p/>
0N/A If the referrer object is not an interface, then the field
0N/A indices are determined as follows:
0N/A <ul>
0N/A <li>make a list of all the fields in <i>C</i> and its
0N/A superclasses, starting with all the fields in
0N/A <code>java.lang.Object</code> and ending with all the
0N/A fields in <i>C</i>.</li>
0N/A <li>Within this list, put
0N/A the fields for a given class in the order returned by
0N/A <functionlink id="GetClassFields"/>.</li>
0N/A <li>Assign the fields in this list indices
0N/A <i>n</i>, <i>n</i>+1, ..., in order, where <i>n</i>
0N/A is the count of the fields in all the interfaces
0N/A implemented by <i>C</i>.
0N/A Note that <i>C</i> implements all interfaces
0N/A directly implemented by its superclasses; as well
0N/A as all superinterfaces of these interfaces.</li>
0N/A </ul>
0N/A If the referrer object is an interface, then the field
0N/A indices are determined as follows:
0N/A <ul>
0N/A <li>make a list of the fields directly declared in
0N/A <i>I</i>.</li>
0N/A <li>Within this list, put
0N/A the fields in the order returned by
0N/A <functionlink id="GetClassFields"/>.</li>
0N/A <li>Assign the fields in this list indices
0N/A <i>n</i>, <i>n</i>+1, ..., in order, where <i>n</i>
0N/A is the count of the fields in all the superinterfaces
0N/A of <i>I</i>.</li>
0N/A </ul>
0N/A All fields are included in this computation, regardless of
0N/A field modifier (static, public, private, etc).
0N/A <p/>
0N/A For example, given the following classes and interfaces:
0N/A <example>
0N/Ainterface I0 {
0N/A int p = 0;
0N/A}
0N/A
0N/Ainterface I1 extends I0 {
0N/A int x = 1;
0N/A}
0N/A
0N/Ainterface I2 extends I0 {
0N/A int y = 2;
0N/A}
0N/A
0N/Aclass C1 implements I1 {
0N/A public static int a = 3;
0N/A private int b = 4;
0N/A}
0N/A
0N/Aclass C2 extends C1 implements I2 {
0N/A static int q = 5;
0N/A final int r = 6;
0N/A}
0N/A </example>
0N/A Assume that <functionlink id="GetClassFields"/> called on
0N/A <code>C1</code> returns the fields of <code>C1</code> in the
0N/A order: a, b; and that the fields of <code>C2</code> are
0N/A returned in the order: q, r.
0N/A An instance of class <code>C1</code> will have the
0N/A following field indices:
0N/A <dl><dd><table>
0N/A <tr>
0N/A <td>
0N/A a
0N/A </td>
0N/A <td>
0N/A 2
0N/A </td>
0N/A <td align="left">
0N/A The count of the fields in the interfaces
0N/A implemented by <code>C1</code> is two (<i>n</i>=2):
0N/A <code>p</code> of <code>I0</code>
0N/A and <code>x</code> of <code>I1</code>.
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <td>
0N/A b
0N/A </td>
0N/A <td>
0N/A 3
0N/A </td>
0N/A <td align="left">
0N/A the subsequent index.
0N/A </td>
0N/A </tr>
0N/A </table></dd></dl>
0N/A The class <code>C1</code> will have the same field indices.
0N/A <p/>
0N/A An instance of class <code>C2</code> will have the
0N/A following field indices:
0N/A <dl><dd><table>
0N/A <tr>
0N/A <td>
0N/A a
0N/A </td>
0N/A <td>
0N/A 3
0N/A </td>
0N/A <td align="left">
0N/A The count of the fields in the interfaces
0N/A implemented by <code>C2</code> is three (<i>n</i>=3):
0N/A <code>p</code> of <code>I0</code>,
0N/A <code>x</code> of <code>I1</code> and <code>y</code> of <code>I2</code>
0N/A (an interface of <code>C2</code>). Note that the field <code>p</code>
0N/A of <code>I0</code> is only included once.
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <td>
0N/A b
0N/A </td>
0N/A <td>
0N/A 4
0N/A </td>
0N/A <td align="left">
0N/A the subsequent index to "a".
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <td>
0N/A q
0N/A </td>
0N/A <td>
0N/A 5
0N/A </td>
0N/A <td align="left">
0N/A the subsequent index to "b".
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <td>
0N/A r
0N/A </td>
0N/A <td>
0N/A 6
0N/A </td>
0N/A <td align="left">
0N/A the subsequent index to "q".
0N/A </td>
0N/A </tr>
0N/A </table></dd></dl>
0N/A The class <code>C2</code> will have the same field indices.
0N/A Note that a field may have a different index depending on the
0N/A object that is viewing it -- for example field "a" above.
0N/A Note also: not all field indices may be visible from the
0N/A callbacks, but all indices are shown for illustrative purposes.
0N/A <p/>
0N/A The interface <code>I1</code> will have the
0N/A following field indices:
0N/A <dl><dd><table>
0N/A <tr>
0N/A <td>
0N/A x
0N/A </td>
0N/A <td>
0N/A 1
0N/A </td>
0N/A <td align="left">
0N/A The count of the fields in the superinterfaces
0N/A of <code>I1</code> is one (<i>n</i>=1):
0N/A <code>p</code> of <code>I0</code>.
0N/A </td>
0N/A </tr>
0N/A </table></dd></dl>
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <typedef id="jvmtiHeapReferenceInfoArray"
0N/A label="Reference information structure for Array references"
0N/A since="1.1">
0N/A <description>
0N/A Reference information returned for
0N/A <datalink id="JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT"/> references.
0N/A </description>
0N/A <field id="index">
0N/A <jint/>
0N/A <description>
0N/A The array index.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <typedef id="jvmtiHeapReferenceInfoConstantPool"
0N/A label="Reference information structure for Constant Pool references"
0N/A since="1.1">
0N/A <description>
0N/A Reference information returned for
0N/A <datalink id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL"/> references.
0N/A </description>
0N/A <field id="index">
0N/A <jint/>
0N/A <description>
2427N/A The index into the constant pool of the class. See the description in
2427N/A <vmspec chapter="4.4"/>.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <typedef id="jvmtiHeapReferenceInfoStackLocal"
0N/A label="Reference information structure for Local Variable references"
0N/A since="1.1">
0N/A <description>
0N/A Reference information returned for
0N/A <datalink id="JVMTI_HEAP_REFERENCE_STACK_LOCAL"/> references.
0N/A </description>
0N/A <field id="thread_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the thread corresponding to this stack, zero if not tagged.
0N/A </description>
0N/A </field>
0N/A <field id="thread_id">
0N/A <jlong/>
0N/A <description>
0N/A The unique thread ID of the thread corresponding to this stack.
0N/A </description>
0N/A </field>
0N/A <field id="depth">
0N/A <jint/>
0N/A <description>
0N/A The depth of the frame.
0N/A </description>
0N/A </field>
0N/A <field id="method">
0N/A <jmethodID/>
0N/A <description>
0N/A The method executing in this frame.
0N/A </description>
0N/A </field>
0N/A <field id="location">
0N/A <jlocation/>
0N/A <description>
0N/A The currently executing location in this frame.
0N/A </description>
0N/A </field>
0N/A <field id="slot">
0N/A <jint/>
0N/A <description>
0N/A The slot number of the local variable.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <typedef id="jvmtiHeapReferenceInfoJniLocal"
0N/A label="Reference information structure for JNI local references"
0N/A since="1.1">
0N/A <description>
0N/A Reference information returned for
0N/A <datalink id="JVMTI_HEAP_REFERENCE_JNI_LOCAL"/> references.
0N/A </description>
0N/A <field id="thread_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the thread corresponding to this stack, zero if not tagged.
0N/A </description>
0N/A </field>
0N/A <field id="thread_id">
0N/A <jlong/>
0N/A <description>
0N/A The unique thread ID of the thread corresponding to this stack.
0N/A </description>
0N/A </field>
0N/A <field id="depth">
0N/A <jint/>
0N/A <description>
0N/A The depth of the frame.
0N/A </description>
0N/A </field>
0N/A <field id="method">
0N/A <jmethodID/>
0N/A <description>
0N/A The method executing in this frame.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <typedef id="jvmtiHeapReferenceInfoReserved"
0N/A label="Reference information structure for Other references"
0N/A since="1.1">
0N/A <description>
0N/A Reference information returned for other references.
0N/A </description>
0N/A <field id="reserved1">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved2">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved3">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved4">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved5">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved6">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved7">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved8">
0N/A <jlong/>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <uniontypedef id="jvmtiHeapReferenceInfo"
0N/A label="Reference information structure"
0N/A since="1.1">
0N/A <description>
0N/A The information returned about referrers.
0N/A Represented as a union of the various kinds of reference information.
0N/A </description>
0N/A <field id="field">
0N/A <struct>jvmtiHeapReferenceInfoField</struct>
0N/A <description>
0N/A The referrer information for
0N/A <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/>
0N/A and <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/> references.
0N/A </description>
0N/A </field>
0N/A <field id="array">
0N/A <struct>jvmtiHeapReferenceInfoArray</struct>
0N/A <description>
0N/A The referrer information for
0N/A For <datalink id="JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT"/> references.
0N/A </description>
0N/A </field>
0N/A <field id="constant_pool">
0N/A <struct>jvmtiHeapReferenceInfoConstantPool</struct>
0N/A <description>
0N/A The referrer information for
0N/A For <datalink id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL"/> references.
0N/A </description>
0N/A </field>
0N/A <field id="stack_local">
0N/A <struct>jvmtiHeapReferenceInfoStackLocal</struct>
0N/A <description>
0N/A The referrer information for
0N/A For <datalink id="JVMTI_HEAP_REFERENCE_STACK_LOCAL"/> references.
0N/A </description>
0N/A </field>
0N/A <field id="jni_local">
0N/A <struct>jvmtiHeapReferenceInfoJniLocal</struct>
0N/A <description>
0N/A The referrer information for
0N/A For <datalink id="JVMTI_HEAP_REFERENCE_JNI_LOCAL"/> references.
0N/A </description>
0N/A </field>
0N/A <field id="other">
0N/A <struct>jvmtiHeapReferenceInfoReserved</struct>
0N/A <description>
0N/A reserved for future use.
0N/A </description>
0N/A </field>
0N/A </uniontypedef>
0N/A
0N/A <typedef id="jvmtiHeapCallbacks"
0N/A label="Heap callback function structure"
0N/A since="1.1">
0N/A <field id="heap_iteration_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiHeapIterationCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The callback to be called to describe an
0N/A object in the heap. Used by the
0N/A <functionlink id="IterateThroughHeap"/> function, ignored by the
0N/A <functionlink id="FollowReferences"/> function.
0N/A </description>
0N/A </field>
0N/A <field id="heap_reference_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiHeapReferenceCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The callback to be called to describe an
0N/A object reference. Used by the
0N/A <functionlink id="FollowReferences"/> function, ignored by the
0N/A <functionlink id="IterateThroughHeap"/> function.
0N/A </description>
0N/A </field>
0N/A <field id="primitive_field_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiPrimitiveFieldCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The callback to be called to describe a
0N/A primitive field.
0N/A </description>
0N/A </field>
0N/A <field id="array_primitive_value_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiArrayPrimitiveValueCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The callback to be called to describe an
0N/A array of primitive values.
0N/A </description>
0N/A </field>
0N/A <field id="string_primitive_value_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiStringPrimitiveValueCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The callback to be called to describe a String value.
0N/A </description>
0N/A </field>
0N/A <field id="reserved5">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved6">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved7">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved8">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved9">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved10">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved11">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved12">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved13">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved14">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A <field id="reserved15">
0N/A <ptrtype>
0N/A <struct>jvmtiReservedCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A Reserved for future use..
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A
0N/A <intro>
0N/A <rationale>
0N/A The heap dumping functionality (below) uses a callback
0N/A for each object. While it would seem that a buffered approach
0N/A would provide better throughput, tests do
0N/A not show this to be the case--possibly due to locality of
0N/A memory reference or array access overhead.
0N/A </rationale>
0N/A
0N/A <issue>
0N/A Still under investigation as to if java.lang.ref references
0N/A are reported as a different type of reference.
0N/A </issue>
0N/A
0N/A <issue>
0N/A Should or can an indication of the cost or relative cost of
0N/A these operations be included?
0N/A </issue>
0N/A
0N/A </intro>
0N/A
0N/A <callback id="jvmtiHeapIterationCallback" since="1.1">
0N/A <jint/>
0N/A <synopsis>Heap Iteration Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes (but does not pass in) an object in the heap.
0N/A <p/>
0N/A This function should return a bit vector of the desired
0N/A <datalink id="jvmtiHeapVisitControl">visit control flags</datalink>.
0N/A This will determine if the entire iteration should be aborted
0N/A (the <code>JVMTI_VISIT_OBJECTS</code> flag is ignored).
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of object (zero if the class is not tagged).
0N/A If the object represents a runtime class,
0N/A the <code>class_tag</code> is the tag
0N/A associated with <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A The object tag value, or zero if the object is not tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="length">
0N/A <jint/>
0N/A <description>
0N/A If this object is an array, the length of the array. Otherwise negative one (-1).
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <callback id="jvmtiHeapReferenceCallback" since="1.1">
0N/A <jint/>
0N/A <synopsis>Heap Reference Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes a reference from an object or the VM (the referrer) to another object
0N/A (the referree) or a heap root to a referree.
0N/A <p/>
0N/A This function should return a bit vector of the desired
0N/A <datalink id="jvmtiHeapVisitControl">visit control flags</datalink>.
0N/A This will determine if the objects referenced by the referree
0N/A should be visited or if the entire iteration should be aborted.
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="reference_kind">
0N/A <enum>jvmtiHeapReferenceKind</enum>
0N/A <description>
0N/A The kind of reference.
0N/A </description>
0N/A </param>
0N/A <param id="reference_info">
0N/A <inptr>
0N/A <struct>jvmtiHeapReferenceInfo</struct>
0N/A </inptr>
0N/A <description>
0N/A Details about the reference.
0N/A Set when the <paramlink id="reference_kind"/> is
0N/A <datalink id="JVMTI_HEAP_REFERENCE_FIELD"/>,
0N/A <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/>,
0N/A <datalink id="JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT"/>,
0N/A <datalink id="JVMTI_HEAP_REFERENCE_CONSTANT_POOL"/>,
0N/A <datalink id="JVMTI_HEAP_REFERENCE_STACK_LOCAL"/>,
0N/A or <datalink id="JVMTI_HEAP_REFERENCE_JNI_LOCAL"/>.
0N/A Otherwise <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of referree object (zero if the class is not tagged).
0N/A If the referree object represents a runtime class,
0N/A the <code>class_tag</code> is the tag
0N/A associated with <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="referrer_class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of the referrer object (zero if the class is not tagged
0N/A or the referree is a heap root). If the referrer object represents a runtime
0N/A class, the <code>referrer_class_tag</code> is the tag associated with
0N/A the <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the referree object (in bytes).
0N/A See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A Points to the referree object tag value, or zero if the object is not
0N/A tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="referrer_tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A Points to the tag of the referrer object, or
0N/A points to the zero if the referrer
0N/A object is not tagged.
0N/A <code>NULL</code> if the referrer in not an object (that is,
0N/A this callback is reporting a heap root).
0N/A To set the tag value to be associated with the referrer object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A If this callback is reporting a reference from an object to itself,
0N/A <code>referrer_tag_ptr == tag_ptr</code>.
0N/A </description>
0N/A </param>
0N/A <param id="length">
0N/A <jint/>
0N/A <description>
0N/A If this object is an array, the length of the array. Otherwise negative one (-1).
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <callback id="jvmtiPrimitiveFieldCallback" since="1.1">
0N/A <jint/>
0N/A <synopsis>Primitive Field Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function which
0N/A describes a primitive field of an object (<i>the object</i>).
0N/A A primitive field is a field whose type is a primitive type.
0N/A This callback will describe a static field if the object is a class,
0N/A and otherwise will describe an instance field.
0N/A <p/>
0N/A This function should return a bit vector of the desired
0N/A <datalink id="jvmtiHeapVisitControl">visit control flags</datalink>.
0N/A This will determine if the entire iteration should be aborted
0N/A (the <code>JVMTI_VISIT_OBJECTS</code> flag is ignored).
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="kind">
0N/A <enum>jvmtiHeapReferenceKind</enum>
0N/A <description>
0N/A The kind of field -- instance or static (<datalink id="JVMTI_HEAP_REFERENCE_FIELD"/> or
0N/A <datalink id="JVMTI_HEAP_REFERENCE_STATIC_FIELD"/>).
0N/A </description>
0N/A </param>
0N/A <param id="info">
0N/A <inptr>
0N/A <struct>jvmtiHeapReferenceInfo</struct>
0N/A </inptr>
0N/A <description>
0N/A Which field (the field index).
0N/A </description>
0N/A </param>
0N/A <param id="object_class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of the object (zero if the class is not tagged).
0N/A If the object represents a runtime class, the
0N/A <code>object_class_tag</code> is the tag
0N/A associated with <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="object_tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A Points to the tag of the object, or zero if the object is not
0N/A tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jvalue/>
0N/A <description>
0N/A The value of the field.
0N/A </description>
0N/A </param>
0N/A <param id="value_type">
0N/A <enum>jvmtiPrimitiveType</enum>
0N/A <description>
0N/A The type of the field.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <callback id="jvmtiArrayPrimitiveValueCallback" since="1.1">
0N/A <jint/>
0N/A <synopsis>Array Primitive Value Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes the values in an array of a primitive type.
0N/A <p/>
0N/A This function should return a bit vector of the desired
0N/A <datalink id="jvmtiHeapVisitControl">visit control flags</datalink>.
0N/A This will determine if the entire iteration should be aborted
0N/A (the <code>JVMTI_VISIT_OBJECTS</code> flag is ignored).
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of the array object (zero if the class is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the array (in bytes).
0N/A See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A Points to the tag of the array object, or zero if the object is not
0N/A tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="element_count">
0N/A <jint/>
0N/A <description>
0N/A The length of the primitive array.
0N/A </description>
0N/A </param>
0N/A <param id="element_type">
0N/A <enum>jvmtiPrimitiveType</enum>
0N/A <description>
0N/A The type of the elements of the array.
0N/A </description>
0N/A </param>
0N/A <param id="elements">
0N/A <vmbuf><void/></vmbuf>
0N/A <description>
0N/A The elements of the array in a packed array of <code>element_count</code>
0N/A items of <code>element_type</code> size each.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <callback id="jvmtiStringPrimitiveValueCallback" since="1.1">
0N/A <jint/>
0N/A <synopsis>String Primitive Value Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes the value of a java.lang.String.
0N/A <p/>
0N/A This function should return a bit vector of the desired
0N/A <datalink id="jvmtiHeapVisitControl">visit control flags</datalink>.
0N/A This will determine if the entire iteration should be aborted
0N/A (the <code>JVMTI_VISIT_OBJECTS</code> flag is ignored).
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of the String class (zero if the class is not tagged).
0N/A <issue>Is this needed?</issue>
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the string (in bytes).
0N/A See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A Points to the tag of the String object, or zero if the object is not
0N/A tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <vmbuf><jchar/></vmbuf>
0N/A <description>
0N/A The value of the String, encoded as a Unicode string.
0N/A </description>
0N/A </param>
0N/A <param id="value_length">
0N/A <jint/>
0N/A <description>
0N/A The length of the string.
0N/A The length is equal to the number of 16-bit Unicode
0N/A characters in the string.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A
0N/A <callback id="jvmtiReservedCallback" since="1.1">
0N/A <jint/>
0N/A <synopsis>reserved for future use Callback</synopsis>
0N/A <description>
0N/A Placeholder -- reserved for future use.
0N/A </description>
0N/A <parameters>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <function id="FollowReferences" num="115" since="1.1">
0N/A <synopsis>Follow References</synopsis>
0N/A <description>
0N/A This function initiates a traversal over the objects that are
0N/A directly and indirectly reachable from the specified object or,
0N/A if <code>initial_object</code> is not specified, all objects
0N/A reachable from the heap roots.
0N/A The heap root are the set of system classes,
0N/A JNI globals, references from thread stacks, and other objects used as roots
0N/A for the purposes of garbage collection.
0N/A <p/>
0N/A This function operates by traversing the reference graph.
0N/A Let <i>A</i>, <i>B</i>, ... represent objects.
0N/A When a reference from <i>A</i> to <i>B</i> is traversed,
0N/A when a reference from a heap root to <i>B</i> is traversed,
0N/A or when <i>B</i> is specified as the <paramlink id="initial_object"/>,
0N/A then <i>B</i> is said to be <i>visited</i>.
0N/A A reference from <i>A</i> to <i>B</i> is not traversed until <i>A</i>
0N/A is visited.
0N/A References are reported in the same order that the references are traversed.
0N/A Object references are reported by invoking the agent supplied
0N/A callback function <functionlink id="jvmtiHeapReferenceCallback"/>.
0N/A In a reference from <i>A</i> to <i>B</i>, <i>A</i> is known
0N/A as the <i>referrer</i> and <i>B</i> as the <i>referree</i>.
0N/A The callback is invoked exactly once for each reference from a referrer;
0N/A this is true even if there are reference cycles or multiple paths to
0N/A the referrer.
0N/A There may be more than one reference between a referrer and a referree,
0N/A each reference is reported.
0N/A These references may be distinguished by examining the
0N/A <datalink
0N/A id="jvmtiHeapReferenceCallback.reference_kind"><code>reference_kind</code></datalink>
0N/A and
0N/A <datalink
0N/A id="jvmtiHeapReferenceCallback.reference_info"><code>reference_info</code></datalink>
0N/A parameters of the <functionlink id="jvmtiHeapReferenceCallback"/> callback.
0N/A <p/>
0N/A This function reports a Java programming language view of object references,
0N/A not a virtual machine implementation view. The following object references
0N/A are reported when they are non-null:
0N/A <ul>
0N/A <li>Instance objects report references to each non-primitive instance fields
0N/A (including inherited fields).</li>
0N/A <li>Instance objects report a reference to the object type (class).</li>
0N/A <li>Classes report a reference to the superclass and directly
0N/A implemented/extended interfaces.</li>
0N/A <li>Classes report a reference to the class loader, protection domain,
0N/A signers, and resolved entries in the constant pool.</li>
0N/A <li>Classes report a reference to each directly declared non-primitive
0N/A static field.</li>
0N/A <li>Arrays report a reference to the array type (class) and each
0N/A array element.</li>
0N/A <li>Primitive arrays report a reference to the array type.</li>
0N/A </ul>
0N/A <p/>
0N/A This function can also be used to examine primitive (non-object) values.
0N/A The primitive value of an array or String
0N/A is reported after the object has been visited;
0N/A it is reported by invoking the agent supplied callback function
0N/A <functionlink id="jvmtiArrayPrimitiveValueCallback"/> or
0N/A <functionlink id="jvmtiStringPrimitiveValueCallback"/>.
0N/A A primitive field
0N/A is reported after the object with that field is visited;
0N/A it is reported by invoking the agent supplied callback function
0N/A <functionlink id="jvmtiPrimitiveFieldCallback"/>.
0N/A <p/>
0N/A Whether a callback is provided or is <code>NULL</code> only determines
0N/A whether the callback will be invoked, it does not influence
0N/A which objects are visited nor does it influence whether other callbacks
0N/A will be invoked.
0N/A However, the
0N/A <datalink id="jvmtiHeapVisitControl">visit control flags</datalink>
0N/A returned by <functionlink id="jvmtiHeapReferenceCallback"/>
0N/A do determine if the objects referenced by the
0N/A current object as visited.
0N/A The <datalink id="jvmtiHeapFilter">heap filter flags</datalink>
0N/A and <paramlink id="klass"/> provided as parameters to this function
0N/A do not control which objects are visited but they do control which
0N/A objects and primitive values are reported by the callbacks.
0N/A For example, if the only callback that was set is
0N/A <paramlink id="array_primitive_value_callback"/> and <code>klass</code>
0N/A is set to the array of bytes class, then only arrays of byte will be
0N/A reported.
0N/A The table below summarizes this:
0N/A <p/>
0N/A <table>
0N/A <tr>
0N/A <th/>
0N/A <th>
0N/A Controls objects visited
0N/A </th>
0N/A <th>
0N/A Controls objects reported
0N/A </th>
0N/A <th>
0N/A Controls primitives reported
0N/A </th>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A the
0N/A <datalink id="jvmtiHeapVisitControl">Heap Visit Control Flags</datalink>
0N/A returned by <functionlink id="jvmtiHeapReferenceCallback"/>
0N/A </th>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>, since visits are controlled
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>, since visits are controlled
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A <fieldlink id="object_reference_callback" struct="jvmtiHeapCallbacks"/>
0N/A in <paramlink id="callbacks"/> set
0N/A </th>
0N/A <td>
0N/A No
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A <td>
0N/A No
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A <paramlink id="heap_filter"/>
0N/A </th>
0N/A <td>
0N/A No
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A <paramlink id="klass"/>
0N/A </th>
0N/A <td>
0N/A No
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A </tr>
0N/A </table>
0N/A <p/>
0N/A During the execution of this function the state of the heap
0N/A does not change: no objects are allocated, no objects are
0N/A garbage collected, and the state of objects (including
0N/A held values) does not change.
0N/A As a result, threads executing Java
0N/A programming language code, threads attempting to resume the
0N/A execution of Java programming language code, and threads
0N/A attempting to execute JNI functions are typically stalled.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="heap_filter">
0N/A <jint/>
0N/A <description>
0N/A This bit vector of
0N/A <datalink id="jvmtiHeapFilter">heap filter flags</datalink>.
0N/A restricts the objects for which the callback function is called.
0N/A This applies to both the object and primitive callbacks.
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <ptrtype>
0N/A <jclass/>
0N/A <nullok>callbacks are not limited to instances of a particular
0N/A class</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A Callbacks are only reported when the object is an instance of
0N/A this class.
0N/A Objects which are instances of a subclass of <code>klass</code>
0N/A are not reported.
0N/A If <code>klass</code> is an interface, no objects are reported.
0N/A This applies to both the object and primitive callbacks.
0N/A </description>
0N/A </param>
0N/A <param id="initial_object">
0N/A <ptrtype>
0N/A <jobject/>
0N/A <nullok>references are followed from the heap roots</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A The object to follow
0N/A </description>
0N/A </param>
0N/A <param id="callbacks">
0N/A <inptr>
0N/A <struct>jvmtiHeapCallbacks</struct>
0N/A </inptr>
0N/A <description>
0N/A Structure defining the set of callback functions.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok><code>NULL</code> is passed as the user supplied data</nullok>
0N/A </inbuf>
0N/A <description>
0N/A User supplied data to be passed to the callback.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_CLASS">
0N/A <paramlink id="klass"/> is not a valid class.
0N/A </error>
0N/A <error id="JVMTI_ERROR_INVALID_OBJECT">
0N/A <paramlink id="initial_object"/> is not a valid object.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A
0N/A <function id="IterateThroughHeap" num="116" since="1.1">
0N/A <synopsis>Iterate Through Heap</synopsis>
0N/A <description>
0N/A Initiate an iteration over all objects in the heap.
0N/A This includes both reachable and
0N/A unreachable objects. Objects are visited in no particular order.
0N/A <p/>
0N/A Heap objects are reported by invoking the agent supplied
0N/A callback function <functionlink id="jvmtiHeapIterationCallback"/>.
0N/A References between objects are not reported.
0N/A If only reachable objects are desired, or if object reference information
0N/A is needed, use <functionlink id="FollowReferences"/>.
0N/A <p/>
0N/A This function can also be used to examine primitive (non-object) values.
0N/A The primitive value of an array or String
0N/A is reported after the object has been visited;
0N/A it is reported by invoking the agent supplied callback function
0N/A <functionlink id="jvmtiArrayPrimitiveValueCallback"/> or
0N/A <functionlink id="jvmtiStringPrimitiveValueCallback"/>.
0N/A A primitive field
0N/A is reported after the object with that field is visited;
0N/A it is reported by invoking the agent supplied
0N/A callback function
0N/A <functionlink id="jvmtiPrimitiveFieldCallback"/>.
0N/A <p/>
0N/A Unless the iteration is aborted by the
0N/A <datalink id="jvmtiHeapVisitControl">Heap Visit Control Flags</datalink>
0N/A returned by a callback, all objects in the heap are visited.
0N/A Whether a callback is provided or is <code>NULL</code> only determines
0N/A whether the callback will be invoked, it does not influence
0N/A which objects are visited nor does it influence whether other callbacks
0N/A will be invoked.
0N/A The <datalink id="jvmtiHeapFilter">heap filter flags</datalink>
0N/A and <paramlink id="klass"/> provided as parameters to this function
0N/A do not control which objects are visited but they do control which
0N/A objects and primitive values are reported by the callbacks.
0N/A For example, if the only callback that was set is
0N/A <paramlink id="array_primitive_value_callback"/> and <code>klass</code>
0N/A is set to the array of bytes class, then only arrays of byte will be
0N/A reported. The table below summarizes this (contrast this with
0N/A <functionlink id="FollowReferences"/>):
0N/A <p/>
0N/A <table>
0N/A <tr>
0N/A <th/>
0N/A <th>
0N/A Controls objects visited
0N/A </th>
0N/A <th>
0N/A Controls objects reported
0N/A </th>
0N/A <th>
0N/A Controls primitives reported
0N/A </th>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A the
0N/A <datalink id="jvmtiHeapVisitControl">Heap Visit Control Flags</datalink>
0N/A returned by <functionlink id="jvmtiHeapIterationCallback"/>
0N/A </th>
0N/A <td>
0N/A No<br/>(unless they abort the iteration)
0N/A </td>
0N/A <td>
0N/A No<br/>(unless they abort the iteration)
0N/A </td>
0N/A <td>
0N/A No<br/>(unless they abort the iteration)
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A <fieldlink id="object_callback" struct="jvmtiHeapCallbacks"/>
0N/A in <paramlink id="callbacks"/> set
0N/A </th>
0N/A <td>
0N/A No
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A <td>
0N/A No
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A <paramlink id="heap_filter"/>
0N/A </th>
0N/A <td>
0N/A No
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A </tr>
0N/A <tr>
0N/A <th align="left">
0N/A <paramlink id="klass"/>
0N/A </th>
0N/A <td>
0N/A No
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A <td>
0N/A <b>Yes</b>
0N/A </td>
0N/A </tr>
0N/A </table>
0N/A <p/>
0N/A During the execution of this function the state of the heap
0N/A does not change: no objects are allocated, no objects are
0N/A garbage collected, and the state of objects (including
0N/A held values) does not change.
0N/A As a result, threads executing Java
0N/A programming language code, threads attempting to resume the
0N/A execution of Java programming language code, and threads
0N/A attempting to execute JNI functions are typically stalled.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="heap_filter">
0N/A <jint/>
0N/A <description>
0N/A This bit vector of
0N/A <datalink id="jvmtiHeapFilter">heap filter flags</datalink>.
0N/A restricts the objects for which the callback function is called.
0N/A This applies to both the object and primitive callbacks.
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <ptrtype>
0N/A <jclass/>
0N/A <nullok>callbacks are not limited to instances of a particular class</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A Callbacks are only reported when the object is an instance of
0N/A this class.
0N/A Objects which are instances of a subclass of <code>klass</code>
0N/A are not reported.
0N/A If <code>klass</code> is an interface, no objects are reported.
0N/A This applies to both the object and primitive callbacks.
0N/A </description>
0N/A </param>
0N/A <param id="callbacks">
0N/A <inptr>
0N/A <struct>jvmtiHeapCallbacks</struct>
0N/A </inptr>
0N/A <description>
0N/A Structure defining the set callback functions.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok><code>NULL</code> is passed as the user supplied data</nullok>
0N/A </inbuf>
0N/A <description>
0N/A User supplied data to be passed to the callback.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_CLASS">
0N/A <paramlink id="klass"/> is not a valid class.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetTag" phase="start" num="106">
0N/A <synopsis>Get Tag</synopsis>
0N/A <description>
0N/A Retrieve the tag associated with an object.
0N/A The tag is a long value typically used to store a
0N/A unique identifier or pointer to object information.
0N/A The tag is set with
0N/A <functionlink id="SetTag"></functionlink>.
0N/A Objects for which no tags have been set return a
0N/A tag value of zero.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A The object whose tag is to be retrieved.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A On return, the referenced long is set to the value
0N/A of the tag.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetTag" phase="start" num="107">
0N/A <synopsis>Set Tag</synopsis>
0N/A <description>
0N/A Set the tag associated with an object.
0N/A The tag is a long value typically used to store a
0N/A unique identifier or pointer to object information.
0N/A The tag is visible with
0N/A <functionlink id="GetTag"></functionlink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A The object whose tag is to be set.
0N/A </description>
0N/A </param>
0N/A <param id="tag">
0N/A <jlong/>
0N/A <description>
0N/A The new value of the tag.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetObjectsWithTags" num="114">
0N/A <synopsis>Get Objects With Tags</synopsis>
0N/A <description>
0N/A Return objects in the heap with the specified tags.
0N/A The format is parallel arrays of objects and tags.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="tag_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A Number of tags to scan for.
0N/A </description>
0N/A </param>
0N/A <param id="tags">
0N/A <inbuf incount="tag_count">
0N/A <jlong/>
0N/A </inbuf>
0N/A <description>
0N/A Scan for objects with these tags.
0N/A Zero is not permitted in this array.
0N/A </description>
0N/A </param>
0N/A <param id="count_ptr">
0N/A <outptr>
0N/A <jint/>
0N/A </outptr>
0N/A <description>
0N/A Return the number of objects with any of the tags
0N/A in <paramlink id="tags"/>.
0N/A </description>
0N/A </param>
0N/A <param id="object_result_ptr">
0N/A <allocbuf outcount="count_ptr">
0N/A <jobject/>
0N/A <nullok>this information is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A Returns the array of objects with any of the tags
0N/A in <paramlink id="tags"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_result_ptr">
0N/A <allocbuf outcount="count_ptr">
0N/A <jlong/>
0N/A <nullok>this information is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A For each object in <paramlink id="object_result_ptr"/>,
0N/A return the tag at the corresponding index.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A Zero is present in <paramlink id="tags"></paramlink>.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ForceGarbageCollection" num="108">
0N/A <synopsis>Force Garbage Collection</synopsis>
0N/A <description>
0N/A Force the VM to perform a garbage collection.
0N/A The garbage collection is as complete as possible.
0N/A This function does not cause finalizers to be run.
0N/A This function does not return until the garbage collection
0N/A is finished.
0N/A <p/>
0N/A Although garbage collection is as complete
0N/A as possible there is no guarantee that all
0N/A <eventlink id="ObjectFree"/>
0N/A events will have been
0N/A sent by the time that this function
0N/A returns. In particular, an object may be
0N/A prevented from being freed because it
0N/A is awaiting finalization.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A
0N/A </category>
0N/A
0N/A <category id="Heap_1_0" label="Heap (1.0)">
0N/A <intro>
0N/A <b>
0N/A These functions and data types were introduced in the original
0N/A <jvmti/> version 1.0 and have been superseded by more
0N/A </b>
0N/A <internallink id="Heap"><b>powerful and flexible versions</b></internallink>
0N/A <b>
0N/A which:
0N/A </b>
0N/A <ul>
0N/A <li>
0N/A <b>
0N/A Allow access to primitive values (the value of Strings, arrays,
0N/A and primitive fields)
0N/A </b>
0N/A </li>
0N/A <li>
0N/A <b>
0N/A Allow the tag of the referrer to be set, thus enabling more
0N/A efficient localized reference graph building
0N/A </b>
0N/A </li>
0N/A <li>
0N/A <b>
0N/A Provide more extensive filtering abilities
0N/A </b>
0N/A </li>
0N/A <li>
0N/A <b>
0N/A Are extensible, allowing their abilities to grow in future versions of <jvmti/>
0N/A </b>
0N/A </li>
0N/A </ul>
0N/A <p/>
0N/A <b>Please use the </b>
0N/A <internallink id="Heap"><b>current Heap functions</b></internallink>.
0N/A <p/>
0N/A <constants id="jvmtiHeapObjectFilter" label="Heap Object Filter Enumeration" kind="enum">
0N/A <constant id="JVMTI_HEAP_OBJECT_TAGGED" num="1">
0N/A Tagged objects only.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_OBJECT_UNTAGGED" num="2">
0N/A Untagged objects only.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_OBJECT_EITHER" num="3">
0N/A Either tagged or untagged objects.
0N/A </constant>
0N/A </constants>
0N/A
0N/A <constants id="jvmtiHeapRootKind" label="Heap Root Kind Enumeration" kind="enum">
0N/A <constant id="JVMTI_HEAP_ROOT_JNI_GLOBAL" num="1">
0N/A JNI global reference.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_ROOT_SYSTEM_CLASS" num="2">
0N/A System class.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_ROOT_MONITOR" num="3">
0N/A Monitor.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_ROOT_STACK_LOCAL" num="4">
0N/A Stack local.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_ROOT_JNI_LOCAL" num="5">
0N/A JNI local reference.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_ROOT_THREAD" num="6">
0N/A Thread.
0N/A </constant>
0N/A <constant id="JVMTI_HEAP_ROOT_OTHER" num="7">
0N/A Other.
0N/A </constant>
0N/A </constants>
0N/A
0N/A <constants id="jvmtiObjectReferenceKind" label="Object Reference Enumeration" kind="enum">
0N/A <constant id="JVMTI_REFERENCE_CLASS" num="1">
0N/A Reference from an object to its class.
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_FIELD" num="2">
0N/A Reference from an object to the value of one of its instance fields.
0N/A For references of this kind the <code>referrer_index</code>
0N/A parameter to the <internallink id="jvmtiObjectReferenceCallback">
0N/A jvmtiObjectReferenceCallback</internallink> is the index of the
0N/A the instance field. The index is based on the order of all the
0N/A object's fields. This includes all fields of the directly declared
0N/A static and instance fields in the class, and includes all fields (both
0N/A public and private) fields declared in superclasses and superinterfaces.
0N/A The index is thus calculated by summing the index of the field in the directly
0N/A declared class (see <functionlink id="GetClassFields"/>), with the total
0N/A number of fields (both public and private) declared in all superclasses
0N/A and superinterfaces. The index starts at zero.
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_ARRAY_ELEMENT" num="3">
0N/A Reference from an array to one of its elements.
0N/A For references of this kind the <code>referrer_index</code>
0N/A parameter to the <internallink id="jvmtiObjectReferenceCallback">
0N/A jvmtiObjectReferenceCallback</internallink> is the array index.
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_CLASS_LOADER" num="4">
0N/A Reference from a class to its class loader.
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_SIGNERS" num="5">
0N/A Reference from a class to its signers array.
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_PROTECTION_DOMAIN" num="6">
0N/A Reference from a class to its protection domain.
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_INTERFACE" num="7">
0N/A Reference from a class to one of its interfaces.
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_STATIC_FIELD" num="8">
0N/A Reference from a class to the value of one of its static fields.
0N/A For references of this kind the <code>referrer_index</code>
0N/A parameter to the <internallink id="jvmtiObjectReferenceCallback">
0N/A jvmtiObjectReferenceCallback</internallink> is the index of the
0N/A the static field. The index is based on the order of all the
0N/A object's fields. This includes all fields of the directly declared
0N/A static and instance fields in the class, and includes all fields (both
0N/A public and private) fields declared in superclasses and superinterfaces.
0N/A The index is thus calculated by summing the index of the field in the directly
0N/A declared class (see <functionlink id="GetClassFields"/>), with the total
0N/A number of fields (both public and private) declared in all superclasses
0N/A and superinterfaces. The index starts at zero.
0N/A Note: this definition differs from that in the <jvmti/> 1.0 Specification.
0N/A <rationale>No known implementations used the 1.0 definition.</rationale>
0N/A </constant>
0N/A <constant id="JVMTI_REFERENCE_CONSTANT_POOL" num="9">
0N/A Reference from a class to a resolved entry in the constant pool.
0N/A For references of this kind the <code>referrer_index</code>
0N/A parameter to the <internallink id="jvmtiObjectReferenceCallback">
0N/A jvmtiObjectReferenceCallback</internallink> is the index into
2427N/A constant pool table of the class, starting at 1. See
2427N/A <vmspec chapter="4.4"/>.
0N/A </constant>
0N/A </constants>
0N/A
0N/A <constants id="jvmtiIterationControl" label="Iteration Control Enumeration" kind="enum">
0N/A <constant id="JVMTI_ITERATION_CONTINUE" num="1">
0N/A Continue the iteration.
0N/A If this is a reference iteration, follow the references of this object.
0N/A </constant>
0N/A <constant id="JVMTI_ITERATION_IGNORE" num="2">
0N/A Continue the iteration.
0N/A If this is a reference iteration, ignore the references of this object.
0N/A </constant>
0N/A <constant id="JVMTI_ITERATION_ABORT" num="0">
0N/A Abort the iteration.
0N/A </constant>
0N/A </constants>
0N/A </intro>
0N/A
0N/A <callback id="jvmtiHeapObjectCallback">
0N/A <enum>jvmtiIterationControl</enum>
0N/A <synopsis>Heap Object Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes (but does not pass in) an object in the heap.
0N/A <p/>
0N/A Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
0N/A or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of object (zero if the class is not tagged).
0N/A If the object represents a runtime class,
0N/A the <code>class_tag</code> is the tag
0N/A associated with <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A The object tag value, or zero if the object is not tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <callback id="jvmtiHeapRootCallback">
0N/A <enum>jvmtiIterationControl</enum>
0N/A <synopsis>Heap Root Object Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes (but does not pass in) an object that is a root for the purposes
0N/A of garbage collection.
0N/A <p/>
0N/A Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
0N/A <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing
0N/A references from referree object or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="root_kind">
0N/A <enum>jvmtiHeapRootKind</enum>
0N/A <description>
0N/A The kind of heap root.
0N/A </description>
0N/A </param>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of object (zero if the class is not tagged).
0N/A If the object represents a runtime class, the <code>class_tag</code> is the tag
0N/A associated with <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A The object tag value, or zero if the object is not tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <callback id="jvmtiStackReferenceCallback">
0N/A <enum>jvmtiIterationControl</enum>
0N/A <synopsis>Stack Reference Object Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes (but does not pass in) an object on the stack that is a root for
0N/A the purposes of garbage collection.
0N/A <p/>
0N/A Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
0N/A <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing
0N/A references from referree object or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="root_kind">
0N/A <enum>jvmtiHeapRootKind</enum>
0N/A <description>
0N/A The kind of root (either <code>JVMTI_HEAP_ROOT_STACK_LOCAL</code> or
0N/A <code>JVMTI_HEAP_ROOT_JNI_LOCAL</code>).
0N/A </description>
0N/A </param>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of object (zero if the class is not tagged).
0N/A If the object represents a runtime class, the <code>class_tag</code> is the tag
0N/A associated with <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A The object tag value, or zero if the object is not tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="thread_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the thread corresponding to this stack, zero if not tagged.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jint/>
0N/A <description>
0N/A The depth of the frame.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID/>
0N/A <description>
0N/A The method executing in this frame.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The slot number.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <callback id="jvmtiObjectReferenceCallback">
0N/A <enum>jvmtiIterationControl</enum>
0N/A <synopsis>Object Reference Callback</synopsis>
0N/A <description>
0N/A Agent supplied callback function.
0N/A Describes a reference from an object (the referrer) to another object
0N/A (the referree).
0N/A <p/>
0N/A Return value should be <code>JVMTI_ITERATION_CONTINUE</code> to continue iteration,
0N/A <code>JVMTI_ITERATION_IGNORE</code> to continue iteration without pursuing
0N/A references from referree object or <code>JVMTI_ITERATION_ABORT</code> to stop iteration.
0N/A <p/>
0N/A See the <internallink id="heapCallbacks">heap callback
0N/A function restrictions</internallink>.
0N/A </description>
0N/A <parameters>
0N/A <param id="reference_kind">
0N/A <enum>jvmtiObjectReferenceKind</enum>
0N/A <description>
0N/A The type of reference.
0N/A </description>
0N/A </param>
0N/A <param id="class_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the class of referree object (zero if the class is not tagged).
0N/A If the referree object represents a runtime class,
0N/A the <code>class_tag</code> is the tag
0N/A associated with <code>java.lang.Class</code>
0N/A (zero if <code>java.lang.Class</code> is not tagged).
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the referree object (in bytes).
0N/A See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A <param id="tag_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A The referree object tag value, or zero if the object is not
0N/A tagged.
0N/A To set the tag value to be associated with the object
0N/A the agent sets the <code>jlong</code> pointed to by the parameter.
0N/A </description>
0N/A </param>
0N/A <param id="referrer_tag">
0N/A <jlong/>
0N/A <description>
0N/A The tag of the referrer object, or zero if the referrer
0N/A object is not tagged.
0N/A </description>
0N/A </param>
0N/A <param id="referrer_index">
0N/A <jint/>
0N/A <description>
0N/A For references of type <code>JVMTI_REFERENCE_FIELD</code> or
0N/A <code>JVMTI_REFERENCE_STATIC_FIELD</code> the index
0N/A of the field in the referrer object. The index is based on the
0N/A order of all the object's fields - see <internallink
0N/A id="JVMTI_REFERENCE_FIELD">JVMTI_REFERENCE_FIELD</internallink>
0N/A or <internallink
0N/A id="JVMTI_REFERENCE_STATIC_FIELD">JVMTI_REFERENCE_STATIC_FIELD
0N/A </internallink> for further description.
0N/A <p/>
0N/A For references of type <code>JVMTI_REFERENCE_ARRAY_ELEMENT</code>
0N/A the array index - see <internallink id="JVMTI_REFERENCE_ARRAY_ELEMENT">
0N/A JVMTI_REFERENCE_ARRAY_ELEMENT</internallink> for further description.
0N/A <p/>
0N/A For references of type <code>JVMTI_REFERENCE_CONSTANT_POOL</code>
0N/A the index into the constant pool of the class - see
0N/A <internallink id="JVMTI_REFERENCE_CONSTANT_POOL">
0N/A JVMTI_REFERENCE_CONSTANT_POOL</internallink> for further
0N/A description.
0N/A <p/>
0N/A For references of other kinds the <code>referrer_index</code> is
0N/A <code>-1</code>.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The user supplied data that was passed into the iteration function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <function id="IterateOverObjectsReachableFromObject" num="109">
0N/A <synopsis>Iterate Over Objects Reachable From Object</synopsis>
0N/A <description>
0N/A This function iterates over all objects that are directly
0N/A and indirectly reachable from the specified object.
0N/A For each object <i>A</i> (known
0N/A as the referrer) with a reference to object <i>B</i> the specified
0N/A callback function is called to describe the object reference.
0N/A The callback is called exactly once for each reference from a referrer;
0N/A this is true even if there are reference cycles or multiple paths to
0N/A the referrer.
0N/A There may be more than one reference between a referrer and a referree,
0N/A These may be distinguished by the
0N/A <datalink id="jvmtiObjectReferenceCallback.reference_kind"></datalink> and
0N/A <datalink id="jvmtiObjectReferenceCallback.referrer_index"></datalink>.
0N/A The callback for an object will always occur after the callback for
0N/A its referrer.
0N/A <p/>
0N/A See <functionlink id="FollowReferences"/> for the object
0N/A references which are reported.
0N/A <p/>
0N/A During the execution of this function the state of the heap
0N/A does not change: no objects are allocated, no objects are
0N/A garbage collected, and the state of objects (including
0N/A held values) does not change.
0N/A As a result, threads executing Java
0N/A programming language code, threads attempting to resume the
0N/A execution of Java programming language code, and threads
0N/A attempting to execute JNI functions are typically stalled.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A The object
0N/A </description>
0N/A </param>
0N/A <param id="object_reference_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiObjectReferenceCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The callback to be called to describe each
0N/A object reference.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok><code>NULL</code> is passed as the user supplied data</nullok>
0N/A </inbuf>
0N/A <description>
0N/A User supplied data to be passed to the callback.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IterateOverReachableObjects" num="110">
0N/A <synopsis>Iterate Over Reachable Objects</synopsis>
0N/A <description>
0N/A This function iterates over the root objects and all objects that
0N/A are directly and indirectly reachable from the root objects.
0N/A The root objects comprise the set of system classes,
0N/A JNI globals, references from thread stacks, and other objects used as roots
0N/A for the purposes of garbage collection.
0N/A <p/>
0N/A For each root the <paramlink id="heap_root_callback"></paramlink>
0N/A or <paramlink id="stack_ref_callback"></paramlink> callback is called.
0N/A An object can be a root object for more than one reason and in that case
0N/A the appropriate callback is called for each reason.
0N/A <p/>
0N/A For each object reference the <paramlink id="object_ref_callback"></paramlink>
0N/A callback function is called to describe the object reference.
0N/A The callback is called exactly once for each reference from a referrer;
0N/A this is true even if there are reference cycles or multiple paths to
0N/A the referrer.
0N/A There may be more than one reference between a referrer and a referree,
0N/A These may be distinguished by the
0N/A <datalink id="jvmtiObjectReferenceCallback.reference_kind"></datalink> and
0N/A <datalink id="jvmtiObjectReferenceCallback.referrer_index"></datalink>.
0N/A The callback for an object will always occur after the callback for
0N/A its referrer.
0N/A <p/>
0N/A See <functionlink id="FollowReferences"/> for the object
0N/A references which are reported.
0N/A <p/>
0N/A Roots are always reported to the profiler before any object references
0N/A are reported. In other words, the <paramlink id="object_ref_callback"></paramlink>
0N/A callback will not be called until the appropriate callback has been called
0N/A for all roots. If the <paramlink id="object_ref_callback"></paramlink> callback is
0N/A specified as <code>NULL</code> then this function returns after
0N/A reporting the root objects to the profiler.
0N/A <p/>
0N/A During the execution of this function the state of the heap
0N/A does not change: no objects are allocated, no objects are
0N/A garbage collected, and the state of objects (including
0N/A held values) does not change.
0N/A As a result, threads executing Java
0N/A programming language code, threads attempting to resume the
0N/A execution of Java programming language code, and threads
0N/A attempting to execute JNI functions are typically stalled.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="heap_root_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiHeapRootCallback</struct>
0N/A <nullok>do not report heap roots</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A The callback function to be called for each heap root of type
0N/A <code>JVMTI_HEAP_ROOT_JNI_GLOBAL</code>,
0N/A <code>JVMTI_HEAP_ROOT_SYSTEM_CLASS</code>,
0N/A <code>JVMTI_HEAP_ROOT_MONITOR</code>,
0N/A <code>JVMTI_HEAP_ROOT_THREAD</code>, or
0N/A <code>JVMTI_HEAP_ROOT_OTHER</code>.
0N/A </description>
0N/A </param>
0N/A <param id="stack_ref_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiStackReferenceCallback</struct>
0N/A <nullok>do not report stack references</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A The callback function to be called for each heap root of
0N/A <code>JVMTI_HEAP_ROOT_STACK_LOCAL</code> or
0N/A <code>JVMTI_HEAP_ROOT_JNI_LOCAL</code>.
0N/A </description>
0N/A </param>
0N/A <param id="object_ref_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiObjectReferenceCallback</struct>
0N/A <nullok>do not follow references from the root objects</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A The callback function to be called for each object reference.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok><code>NULL</code> is passed as the user supplied data</nullok>
0N/A </inbuf>
0N/A <description>
0N/A User supplied data to be passed to the callback.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IterateOverHeap" num="111">
0N/A <synopsis>Iterate Over Heap</synopsis>
0N/A <description>
0N/A Iterate over all objects in the heap. This includes both reachable and
0N/A unreachable objects.
0N/A <p/>
0N/A The <paramlink id="object_filter"></paramlink> parameter indicates the
0N/A objects for which the callback function is called. If this parameter
0N/A is <code>JVMTI_HEAP_OBJECT_TAGGED</code> then the callback will only be
0N/A called for every object that is tagged. If the parameter is
0N/A <code>JVMTI_HEAP_OBJECT_UNTAGGED</code> then the callback will only be
0N/A for objects that are not tagged. If the parameter
0N/A is <code>JVMTI_HEAP_OBJECT_EITHER</code> then the callback will be
0N/A called for every object in the heap, irrespective of whether it is
0N/A tagged or not.
0N/A <p/>
0N/A During the execution of this function the state of the heap
0N/A does not change: no objects are allocated, no objects are
0N/A garbage collected, and the state of objects (including
0N/A held values) does not change.
0N/A As a result, threads executing Java
0N/A programming language code, threads attempting to resume the
0N/A execution of Java programming language code, and threads
0N/A attempting to execute JNI functions are typically stalled.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="object_filter">
0N/A <enum>jvmtiHeapObjectFilter</enum>
0N/A <description>
0N/A Indicates the objects for which the callback function is called.
0N/A </description>
0N/A </param>
0N/A <param id="heap_object_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiHeapObjectCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The iterator function to be called for each
0N/A object matching the <paramlink id="object_filter"/>.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok><code>NULL</code> is passed as the user supplied data</nullok>
0N/A </inbuf>
0N/A <description>
0N/A User supplied data to be passed to the callback.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IterateOverInstancesOfClass" num="112">
0N/A <synopsis>Iterate Over Instances Of Class</synopsis>
0N/A <description>
0N/A Iterate over all objects in the heap that are instances of the specified class.
0N/A This includes direct instances of the specified class and
0N/A instances of all subclasses of the specified class.
0N/A This includes both reachable and unreachable objects.
0N/A <p/>
0N/A The <paramlink id="object_filter"></paramlink> parameter indicates the
0N/A objects for which the callback function is called. If this parameter
0N/A is <code>JVMTI_HEAP_OBJECT_TAGGED</code> then the callback will only be
0N/A called for every object that is tagged. If the parameter is
0N/A <code>JVMTI_HEAP_OBJECT_UNTAGGED</code> then the callback will only be
0N/A called for objects that are not tagged. If the parameter
0N/A is <code>JVMTI_HEAP_OBJECT_EITHER</code> then the callback will be
0N/A called for every object in the heap, irrespective of whether it is
0N/A tagged or not.
0N/A <p/>
0N/A During the execution of this function the state of the heap
0N/A does not change: no objects are allocated, no objects are
0N/A garbage collected, and the state of objects (including
0N/A held values) does not change.
0N/A As a result, threads executing Java
0N/A programming language code, threads attempting to resume the
0N/A execution of Java programming language code, and threads
0N/A attempting to execute JNI functions are typically stalled.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_tag_objects"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A Iterate over objects of this class only.
0N/A </description>
0N/A </param>
0N/A <param id="object_filter">
0N/A <enum>jvmtiHeapObjectFilter</enum>
0N/A <description>
0N/A Indicates the objects for which the callback function is called.
0N/A </description>
0N/A </param>
0N/A <param id="heap_object_callback">
0N/A <ptrtype>
0N/A <struct>jvmtiHeapObjectCallback</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The iterator function to be called for each
0N/A <paramlink id="klass"/> instance matching
0N/A the <paramlink id="object_filter"/>.
0N/A </description>
0N/A </param>
0N/A <param id="user_data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok><code>NULL</code> is passed as the user supplied data</nullok>
0N/A </inbuf>
0N/A <description>
0N/A User supplied data to be passed to the callback.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="local" label="Local Variable">
0N/A
0N/A <intro>
0N/A These functions are used to retrieve or set the value of a local variable.
0N/A The variable is identified by the depth of the frame containing its
0N/A value and the variable's slot number within that frame.
0N/A The mapping of variables to
0N/A slot numbers can be obtained with the function
0N/A <functionlink id="GetLocalVariableTable"></functionlink>.
0N/A </intro>
0N/A
0N/A <function id="GetLocalObject" num="21">
0N/A <synopsis>Get Local Variable - Object</synopsis>
0N/A <description>
0N/A This function can be used to retrieve the value of a local
0N/A variable whose type is <code>Object</code> or a subclass of <code>Object</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value_ptr">
0N/A <outptr><jobject/></outptr>
0N/A <description>
0N/A On return, points to the variable's value.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not
0N/A <code>Object</code> or a subclass of <code>Object</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
1926N/A <function id="GetLocalInstance" num="155" since="1.2">
1926N/A <synopsis>Get Local Instance</synopsis>
1926N/A <description>
1926N/A This function can be used to retrieve the value of the local object
1926N/A variable at slot 0 (the "<code>this</code>" object) from non-static
1926N/A frames. This function can retrieve the "<code>this</code>" object from
1926N/A native method frames, whereas <code>GetLocalObject()</code> would
1926N/A return <code>JVMTI_ERROR_OPAQUE_FRAME</code> in those cases.
1926N/A </description>
1926N/A <origin>new</origin>
1926N/A <capabilities>
1926N/A <required id="can_access_local_variables"></required>
1926N/A </capabilities>
1926N/A <parameters>
1926N/A <param id="thread">
1926N/A <jthread null="current" frame="frame"/>
1926N/A <description>
1926N/A The thread of the frame containing the variable's value.
1926N/A </description>
1926N/A </param>
1926N/A <param id="depth">
1926N/A <jframeID thread="thread"/>
1926N/A <description>
1926N/A The depth of the frame containing the variable's value.
1926N/A </description>
1926N/A </param>
1926N/A <param id="value_ptr">
1926N/A <outptr><jobject/></outptr>
1926N/A <description>
1926N/A On return, points to the variable's value.
1926N/A </description>
1926N/A </param>
1926N/A </parameters>
1926N/A <errors>
1926N/A <error id="JVMTI_ERROR_INVALID_SLOT">
1926N/A If the specified frame is a static method frame.
1926N/A </error>
1926N/A </errors>
1926N/A </function>
0N/A <function id="GetLocalInt" num="22">
0N/A <synopsis>Get Local Variable - Int</synopsis>
0N/A <description>
0N/A This function can be used to retrieve the value of a local
0N/A variable whose type is <code>int</code>,
0N/A <code>short</code>, <code>char</code>, <code>byte</code>, or
0N/A <code>boolean</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the variable's value.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not
0N/A <code>int</code>, <code>short</code>,
0N/A <code>char</code>, <code>byte</code>, or
0N/A <code>boolean</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetLocalLong" num="23">
0N/A <synopsis>Get Local Variable - Long</synopsis>
0N/A <description>
0N/A This function can be used to retrieve the value of a local
0N/A variable whose type is <code>long</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A On return, points to the variable's value.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not <code>long</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetLocalFloat" num="24">
0N/A <synopsis>Get Local Variable - Float</synopsis>
0N/A <description>
0N/A This function can be used to retrieve the value of a local
0N/A variable whose type is <code>float</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value_ptr">
0N/A <outptr><jfloat/></outptr>
0N/A <description>
0N/A On return, points to the variable's value.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not <code>float</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetLocalDouble" num="25">
0N/A <synopsis>Get Local Variable - Double</synopsis>
0N/A <description>
0N/A This function can be used to retrieve the value of a local
0N/A variable whose type is <code>long</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value_ptr">
0N/A <outptr><jdouble/></outptr>
0N/A <description>
0N/A On return, points to the variable's value.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not <code>double</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetLocalObject" num="26">
0N/A <synopsis>Set Local Variable - Object</synopsis>
0N/A <description>
0N/A This function can be used to set the value of a local
0N/A variable whose type is <code>Object</code> or a subclass of <code>Object</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jobject/>
0N/A <description>
0N/A The new value for the variable.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not
0N/A <code>Object</code> or a subclass of <code>Object</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The supplied <paramlink id="value"/> is not compatible
0N/A with the variable type.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetLocalInt" num="27">
0N/A <synopsis>Set Local Variable - Int</synopsis>
0N/A <description>
0N/A This function can be used to set the value of a local
0N/A variable whose type is <code>int</code>,
0N/A <code>short</code>, <code>char</code>, <code>byte</code>, or
0N/A <code>boolean</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jint/>
0N/A <description>
0N/A The new value for the variable.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not
0N/A <code>int</code>, <code>short</code>,
0N/A <code>char</code>, <code>byte</code>, or
0N/A <code>boolean</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetLocalLong" num="28">
0N/A <synopsis>Set Local Variable - Long</synopsis>
0N/A <description>
0N/A This function can be used to set the value of a local
0N/A variable whose type is <code>long</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jlong/>
0N/A <description>
0N/A The new value for the variable.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not <code>long</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetLocalFloat" num="29">
0N/A <synopsis>Set Local Variable - Float</synopsis>
0N/A <description>
0N/A This function can be used to set the value of a local
0N/A variable whose type is <code>float</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jfloat/>
0N/A <description>
0N/A The new value for the variable.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not <code>float</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetLocalDouble" num="30">
0N/A <synopsis>Set Local Variable - Double</synopsis>
0N/A <description>
0N/A This function can be used to set the value of a local
0N/A variable whose type is <code>double</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current" frame="frame"/>
0N/A <description>
0N/A The thread of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="depth">
0N/A <jframeID thread="thread"/>
0N/A <description>
0N/A The depth of the frame containing the variable's value.
0N/A </description>
0N/A </param>
0N/A <param id="slot">
0N/A <jint/>
0N/A <description>
0N/A The variable's slot number.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jdouble/>
0N/A <description>
0N/A The new value for the variable.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_SLOT">
0N/A Invalid <code>slot</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_TYPE_MISMATCH">
0N/A The variable type is not <code>double</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_OPAQUE_FRAME">
0N/A Not a visible frame
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A </category>
0N/A
0N/A <category id="breakpointCategory" label="Breakpoint">
0N/A
0N/A <intro>
0N/A </intro>
0N/A
0N/A <function id="SetBreakpoint" num="38">
0N/A <synopsis>Set Breakpoint</synopsis>
0N/A <description>
0N/A Set a breakpoint at the instruction indicated by
0N/A <code>method</code> and <code>location</code>.
0N/A An instruction can only have one breakpoint.
0N/A <p/>
0N/A Whenever the designated instruction is about to be executed, a
0N/A <eventlink id="Breakpoint"></eventlink> event is generated.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_breakpoint_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class in which to set the breakpoint
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A The method in which to set the breakpoint
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A the index of the instruction at which to set the breakpoint
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_DUPLICATE">
0N/A The designated bytecode already has a breakpoint.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ClearBreakpoint" num="39">
0N/A <synopsis>Clear Breakpoint</synopsis>
0N/A <description>
0N/A Clear the breakpoint at the bytecode indicated by
0N/A <code>method</code> and <code>location</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_breakpoint_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class in which to clear the breakpoint
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A The method in which to clear the breakpoint
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A the index of the instruction at which to clear the breakpoint
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_FOUND">
0N/A There's no breakpoint at the designated bytecode.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="fieldWatch" label="Watched Field">
0N/A
0N/A <intro>
0N/A </intro>
0N/A
0N/A <function id="SetFieldAccessWatch" num="41">
0N/A <synopsis>Set Field Access Watch</synopsis>
0N/A <description>
0N/A Generate a <eventlink id="FieldAccess"></eventlink> event
0N/A when the field specified
0N/A by <code>klass</code> and
0N/A <code>field</code> is about to be accessed.
0N/A An event will be generated for each access of the field
0N/A until it is canceled with
0N/A <functionlink id="ClearFieldAccessWatch"></functionlink>.
0N/A Field accesses from Java programming language code or from JNI code are watched,
0N/A fields modified by other means are not watched.
0N/A Note that <jvmti/> users should be aware that their own field accesses
0N/A will trigger the watch.
0N/A A field can only have one field access watch set.
0N/A Modification of a field is not considered an access--use
0N/A <functionlink id="SetFieldModificationWatch"></functionlink>
0N/A to monitor modifications.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_field_access_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class containing the field to watch
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to watch
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_DUPLICATE">
0N/A The designated field is already being watched for accesses.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ClearFieldAccessWatch" num="42">
0N/A <synopsis>Clear Field Access Watch</synopsis>
0N/A <description>
0N/A Cancel a field access watch previously set by
0N/A <functionlink id="SetFieldAccessWatch"></functionlink>, on the
0N/A field specified
0N/A by <code>klass</code> and
0N/A <code>field</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_field_access_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class containing the field to watch
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to watch
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_FOUND">
0N/A The designated field is not being watched for accesses.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetFieldModificationWatch" num="43">
0N/A <synopsis>Set Field Modification Watch</synopsis>
0N/A <description>
0N/A Generate a <eventlink id="FieldModification"></eventlink> event
0N/A when the field specified
0N/A by <code>klass</code> and
0N/A <code>field</code> is about to be modified.
0N/A An event will be generated for each modification of the field
0N/A until it is canceled with
0N/A <functionlink id="ClearFieldModificationWatch"></functionlink>.
0N/A Field modifications from Java programming language code or from JNI code are watched,
0N/A fields modified by other means are not watched.
0N/A Note that <jvmti/> users should be aware that their own field modifications
0N/A will trigger the watch.
0N/A A field can only have one field modification watch set.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_field_modification_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class containing the field to watch
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to watch
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_DUPLICATE">
0N/A The designated field is already being watched for modifications.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="ClearFieldModificationWatch" num="44">
0N/A <synopsis>Clear Field Modification Watch</synopsis>
0N/A <description>
0N/A
0N/A Cancel a field modification watch previously set by
0N/A <functionlink id="SetFieldModificationWatch"></functionlink>, on the
0N/A field specified
0N/A by <code>klass</code> and
0N/A <code>field</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_field_modification_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class containing the field to watch
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to watch
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_FOUND">
0N/A The designated field is not being watched for modifications.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A </category>
0N/A
0N/A <category id="class" label="Class">
0N/A
0N/A <intro>
0N/A </intro>
0N/A
0N/A <function id="GetLoadedClasses" jkernel="yes" num="78">
0N/A <synopsis>Get Loaded Classes</synopsis>
0N/A <description>
0N/A Return an array of all classes loaded in the virtual machine.
0N/A The number of classes in the array is returned via
0N/A <code>class_count_ptr</code>, and the array itself via
0N/A <code>classes_ptr</code>.
0N/A <p/>
0N/A Array classes of all types (including arrays of primitive types) are
0N/A included in the returned list. Primitive classes (for example,
0N/A <code>java.lang.Integer.TYPE</code>) are <i>not</i> included in this list.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="class_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of classes.
0N/A </description>
0N/A </param>
0N/A <param id="classes_ptr">
0N/A <allocbuf outcount="class_count_ptr"><jclass/></allocbuf>
0N/A <description>
0N/A On return, points to an array of references, one
0N/A for each class.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassLoaderClasses" jkernel="yes" num="79">
0N/A <synopsis>Get Classloader Classes</synopsis>
0N/A <description>
0N/A Returns an array of those classes for which this class loader has
0N/A been recorded as an initiating loader. Each
0N/A class in the returned array was created by this class loader,
0N/A either by defining it directly or by delegation to another class loader.
2427N/A See <vmspec chapter="5.3"/>.
0N/A <p/>
0N/A For JDK version 1.1 implementations that don't
0N/A recognize the distinction between initiating and defining class loaders,
0N/A this function should return all classes loaded in the virtual machine.
0N/A The number of classes in the array is returned via
0N/A <code>class_count_ptr</code>, and the array itself via
0N/A <code>classes_ptr</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="initiating_loader">
0N/A <ptrtype>
0N/A <jobject/>
0N/A <nullok>the classes initiated by the bootstrap loader will be returned</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A An initiating class loader.
0N/A </description>
0N/A </param>
0N/A <param id="class_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of classes.
0N/A </description>
0N/A </param>
0N/A <param id="classes_ptr">
0N/A <allocbuf outcount="class_count_ptr"><jclass/></allocbuf>
0N/A <description>
0N/A On return, points to an array of references, one
0N/A for each class.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassSignature" phase="start" num="48">
0N/A <synopsis>Get Class Signature</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>, return the
0N/A <externallink id="http://java.sun.com/javase/6/docs/guide/jni/spec/types.html#wp16432">JNI
0N/A type signature</externallink>
0N/A and the generic signature of the class.
0N/A For example, <code>java.util.List</code> is <code>"Ljava/util/List;"</code>
0N/A and <code>int[]</code> is <code>"[I"</code>
0N/A The returned name for primitive classes
0N/A is the type signature character of the corresponding primitive type.
0N/A For example, <code>java.lang.Integer.TYPE</code> is <code>"I"</code>.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="signature_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the signature is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the JNI type signature of the class, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A <param id="generic_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the generic signature is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the generic signature of the class, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A If there is no generic signature attribute for the class, then,
0N/A on return, points to <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassStatus" phase="start" num="49">
0N/A <synopsis>Get Class Status</synopsis>
0N/A <description>
0N/A Get the status of the class. Zero or more of the following bits can be
0N/A set.
0N/A <constants id="jvmtiClassStatus" label="Class Status Flags" kind="bits">
0N/A <constant id="JVMTI_CLASS_STATUS_VERIFIED" num="1">
0N/A Class bytecodes have been verified
0N/A </constant>
0N/A <constant id="JVMTI_CLASS_STATUS_PREPARED" num="2">
0N/A Class preparation is complete
0N/A </constant>
0N/A <constant id="JVMTI_CLASS_STATUS_INITIALIZED" num="4">
0N/A Class initialization is complete. Static initializer has been run.
0N/A </constant>
0N/A <constant id="JVMTI_CLASS_STATUS_ERROR" num="8">
0N/A Error during initialization makes class unusable
0N/A </constant>
0N/A <constant id="JVMTI_CLASS_STATUS_ARRAY" num="16">
0N/A Class is an array. If set, all other bits are zero.
0N/A </constant>
0N/A <constant id="JVMTI_CLASS_STATUS_PRIMITIVE" num="32">
0N/A Class is a primitive class (for example, <code>java.lang.Integer.TYPE</code>).
0N/A If set, all other bits are zero.
0N/A </constant>
0N/A </constants>
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="status_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the current state of this class as one or
0N/A more of the <internallink id="jvmtiClassStatus">class status flags</internallink>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetSourceFileName" phase="start" num="50">
0N/A <synopsis>Get Source File Name</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>, return the source file
0N/A name via <code>source_name_ptr</code>. The returned string
0N/A is a file name only and never contains a directory name.
0N/A <p/>
0N/A For primitive classes (for example, <code>java.lang.Integer.TYPE</code>)
0N/A and for arrays this function returns
0N/A <errorlink id="JVMTI_ERROR_ABSENT_INFORMATION"></errorlink>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_source_file_name"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="source_name_ptr">
0N/A <allocbuf><char/></allocbuf>
0N/A <description>
0N/A On return, points to the class's source file name, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ABSENT_INFORMATION">
0N/A Class information does not include a source file name. This includes
0N/A cases where the class is an array class or primitive class.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassModifiers" phase="start" num="51">
0N/A <synopsis>Get Class Modifiers</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>, return the access
0N/A flags
0N/A via <code>modifiers_ptr</code>.
2427N/A Access flags are defined in <vmspec chapter="4"/>.
0N/A <p/>
0N/A If the class is an array class, then its public, private, and protected
0N/A modifiers are the same as those of its component type. For arrays of
0N/A primitives, this component type is represented by one of the primitive
0N/A classes (for example, <code>java.lang.Integer.TYPE</code>).
0N/A <p/>
0N/A If the class is a primitive class, its public modifier is always true,
0N/A and its protected and private modifiers are always false.
0N/A <p/>
0N/A If the class is an array class or a primitive class then its final
0N/A modifier is always true and its interface modifier is always false.
0N/A The values of its other modifiers are not determined by this specification.
0N/A
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="modifiers_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the current access flags of this class.
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassMethods" phase="start" num="52">
0N/A <synopsis>Get Class Methods</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>, return a count of
0N/A methods via <code>method_count_ptr</code> and a list of
0N/A method IDs via <code>methods_ptr</code>. The method list contains
0N/A constructors and static initializers as well as true methods.
0N/A Only directly declared methods are returned (not inherited methods).
0N/A An empty method list is returned for array classes and primitive classes
0N/A (for example, <code>java.lang.Integer.TYPE</code>).
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <capability id="can_maintain_original_method_order"/>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of methods declared in this class.
0N/A </description>
0N/A </param>
0N/A <param id="methods_ptr">
0N/A <allocbuf outcount="method_count_ptr"><jmethodID class="klass"/></allocbuf>
0N/A <description>
0N/A On return, points to the method ID array.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_CLASS_NOT_PREPARED">
0N/A <paramlink id="klass"></paramlink> is not prepared.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassFields" phase="start" num="53">
0N/A <synopsis>Get Class Fields</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>, return a count of fields
0N/A via <code>field_count_ptr</code> and a list of field IDs via
0N/A <code>fields_ptr</code>.
0N/A Only directly declared fields are returned (not inherited fields).
0N/A Fields are returned in the order they occur in the class file.
0N/A An empty field list is returned for array classes and primitive classes
0N/A (for example, <code>java.lang.Integer.TYPE</code>).
0N/A Use JNI to determine the length of an array.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="field_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of fields declared in this class.
0N/A </description>
0N/A </param>
0N/A <param id="fields_ptr">
0N/A <allocbuf outcount="field_count_ptr"><jfieldID/></allocbuf>
0N/A <description>
0N/A On return, points to the field ID array.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_CLASS_NOT_PREPARED">
0N/A <paramlink id="klass"></paramlink> is not prepared.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetImplementedInterfaces" phase="start" num="54">
0N/A <synopsis>Get Implemented Interfaces</synopsis>
0N/A <description>
0N/A Return the direct super-interfaces of this class. For a class, this
0N/A function returns the interfaces declared in its <code>implements</code>
0N/A clause. For an interface, this function returns the interfaces declared in
0N/A its <code>extends</code> clause.
0N/A An empty interface list is returned for array classes and primitive classes
0N/A (for example, <code>java.lang.Integer.TYPE</code>).
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="interface_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of interfaces.
0N/A </description>
0N/A </param>
0N/A <param id="interfaces_ptr">
0N/A <allocbuf outcount="interface_count_ptr"><jclass/></allocbuf>
0N/A <description>
0N/A On return, points to the interface array.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_CLASS_NOT_PREPARED">
0N/A <paramlink id="klass"></paramlink> is not prepared.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassVersionNumbers" phase="start" num="145" since="1.1">
0N/A <synopsis>Get Class Version Numbers</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>,
0N/A return the minor and major version numbers,
2427N/A as defined in
2427N/A <vmspec chapter="4"/>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="minor_version_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the value of the
0N/A <code>minor_version</code> item of the
0N/A Class File Format.
0N/A Note: to be consistent with the Class File Format,
0N/A the minor version number is the first parameter.
0N/A </description>
0N/A </param>
0N/A <param id="major_version_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the value of the
0N/A <code>major_version</code> item of the
0N/A Class File Format.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ABSENT_INFORMATION">
0N/A The class is a primitive or array class.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetConstantPool" phase="start" num="146" since="1.1">
0N/A <synopsis>Get Constant Pool</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>,
0N/A return the raw bytes of the constant pool in the format of the
2427N/A <code>constant_pool</code> item of
2427N/A <vmspec chapter="4"/>.
0N/A The format of the constant pool may differ between versions
0N/A of the Class File Format, so, the
0N/A <functionlink id="GetClassVersionNumbers">minor and major
0N/A class version numbers</functionlink> should be checked for
0N/A compatibility.
0N/A <p/>
0N/A The returned constant pool might not have the same layout or
0N/A contents as the constant pool in the defining class file.
0N/A The constant pool returned by GetConstantPool() may have
0N/A more or fewer entries than the defining constant pool.
0N/A Entries may be in a different order.
0N/A The constant pool returned by GetConstantPool() will match the
0N/A constant pool used by
0N/A <functionlink id="GetBytecodes">GetBytecodes()</functionlink>.
0N/A That is, the bytecodes returned by GetBytecodes() will have
0N/A constant pool indices which refer to constant pool entries returned
0N/A by GetConstantPool().
0N/A Note that since <functionlink id="RetransformClasses"/>
0N/A and <functionlink id="RedefineClasses"/> can change
0N/A the constant pool, the constant pool returned by this function
0N/A can change accordingly. Thus, the correspondence between
0N/A GetConstantPool() and GetBytecodes() does not hold if there
0N/A is an intervening class retransformation or redefinition.
0N/A The value of a constant pool entry used by a given bytecode will
0N/A match that of the defining class file (even if the indices don't match).
0N/A Constant pool entries which are not used directly or indirectly by
0N/A bytecodes (for example, UTF-8 strings associated with annotations) are
0N/A not required to exist in the returned constant pool.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_constant_pool"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="constant_pool_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of entries
0N/A in the constant pool table plus one.
0N/A This corresponds to the <code>constant_pool_count</code>
0N/A item of the Class File Format.
0N/A </description>
0N/A </param>
0N/A <param id="constant_pool_byte_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of bytes
0N/A in the returned raw constant pool.
0N/A </description>
0N/A </param>
0N/A <param id="constant_pool_bytes_ptr">
0N/A <allocbuf outcount="constant_pool_byte_count_ptr"><uchar/></allocbuf>
0N/A <description>
0N/A On return, points to the raw constant pool, that is the bytes
0N/A defined by the <code>constant_pool</code> item of the
0N/A Class File Format
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ABSENT_INFORMATION">
0N/A The class is a primitive or array class.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IsInterface" phase="start" num="55">
0N/A <synopsis>Is Interface</synopsis>
0N/A <description>
0N/A Determines whether a class object reference represents an interface.
0N/A The <code>jboolean</code> result is
0N/A <code>JNI_TRUE</code> if the "class" is actually an interface,
0N/A <code>JNI_FALSE</code> otherwise.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="is_interface_ptr">
0N/A <outptr><jboolean/></outptr>
0N/A <description>
0N/A On return, points to the boolean result of this function.
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IsArrayClass" phase="start" num="56">
0N/A <synopsis>Is Array Class</synopsis>
0N/A <description>
0N/A Determines whether a class object reference represents an array.
0N/A The <code>jboolean</code> result is
0N/A <code>JNI_TRUE</code> if the class is an array,
0N/A <code>JNI_FALSE</code> otherwise.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="is_array_class_ptr">
0N/A <outptr><jboolean/></outptr>
0N/A <description>
0N/A On return, points to the boolean result of this function.
0N/A
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IsModifiableClass" jkernel="yes" phase="start" num="45" since="1.1">
0N/A <synopsis>Is Modifiable Class</synopsis>
0N/A <description>
0N/A Determines whether a class is modifiable.
0N/A If a class is modifiable (<paramlink id="is_modifiable_class_ptr"/>
0N/A returns <code>JNI_TRUE</code>) the class can be
0N/A redefined with <functionlink id="RedefineClasses"/> (assuming
0N/A the agent possesses the
0N/A <fieldlink id="can_redefine_classes" struct="jvmtiCapabilities"/>
0N/A capability) or
0N/A retransformed with <functionlink id="RetransformClasses"/> (assuming
0N/A the agent possesses the
0N/A <fieldlink id="can_retransform_classes" struct="jvmtiCapabilities"/>
0N/A capability).
0N/A If a class is not modifiable (<paramlink id="is_modifiable_class_ptr"/>
0N/A returns <code>JNI_FALSE</code>) the class can be neither
0N/A redefined nor retransformed.
0N/A <p/>
0N/A Primitive classes (for example, <code>java.lang.Integer.TYPE</code>)
0N/A and array classes are never modifiable.
0N/A <p/>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <capability id="can_redefine_any_class">
0N/A If possessed then all classes (except primitive and array classes)
0N/A are modifiable.
0N/A </capability>
0N/A <capability id="can_redefine_classes">
0N/A No effect on the result of the function.
0N/A But must additionally be possessed to modify the class with
0N/A <functionlink id="RedefineClasses"/>.
0N/A </capability>
0N/A <capability id="can_retransform_classes">
0N/A No effect on the result of the function.
0N/A But must additionally be possessed to modify the class with
0N/A <functionlink id="RetransformClasses"/>.
0N/A </capability>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="is_modifiable_class_ptr">
0N/A <outptr><jboolean/></outptr>
0N/A <description>
0N/A On return, points to the boolean result of this function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetClassLoader" phase="start" num="57">
0N/A <synopsis>Get Class Loader</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>, return via
0N/A <code>classloader_ptr</code> a reference to the class loader for the
0N/A class.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="classloader_ptr">
0N/A <outptr><jobject/></outptr>
0N/A <description>
0N/A On return, points to the class loader that loaded
0N/A this class.
0N/A If the class was not created by a class loader
0N/A or if the class loader is the bootstrap class loader,
0N/A points to <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A
0N/A </function>
0N/A
0N/A <function id="GetSourceDebugExtension" phase="start" num="90">
0N/A <synopsis>Get Source Debug Extension</synopsis>
0N/A <description>
0N/A For the class indicated by <code>klass</code>, return the debug
0N/A extension via <code>source_debug_extension_ptr</code>.
0N/A The returned string
0N/A contains exactly the debug extension information present in the
0N/A class file of <code>klass</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_source_debug_extension"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="source_debug_extension_ptr">
0N/A <allocbuf><char/></allocbuf>
0N/A <description>
0N/A On return, points to the class's debug extension, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ABSENT_INFORMATION">
0N/A Class information does not include a debug extension.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="RetransformClasses" jkernel="yes" num="152" since="1.1">
0N/A <synopsis>Retransform Classes</synopsis>
0N/A <description>
0N/A This function facilitates the
0N/A <internallink id="bci">bytecode instrumentation</internallink>
0N/A of already loaded classes.
0N/A To replace the class definition without reference to the existing
0N/A bytecodes, as one might do when recompiling from source for
0N/A fix-and-continue debugging, <functionlink id="RedefineClasses"/>
0N/A function should be used instead.
0N/A <p/>
0N/A When classes are initially loaded or when they are
0N/A <functionlink id="RedefineClasses">redefined</functionlink>,
0N/A the initial class file bytes can be transformed with the
0N/A <eventlink id="ClassFileLoadHook"/> event.
0N/A This function reruns the transformation process
0N/A (whether or not a transformation has previously occurred).
0N/A This retransformation follows these steps:
0N/A <ul>
0N/A <li>starting from the initial class file bytes
0N/A </li>
0N/A <li>for each <fieldlink id="can_retransform_classes"
0N/A struct="jvmtiCapabilities">retransformation
0N/A incapable</fieldlink>
0N/A agent which received a
0N/A <code>ClassFileLoadHook</code> event during the previous
0N/A load or redefine, the bytes it returned
0N/A (via the <code>new_class_data</code> parameter)
0N/A are reused as the output of the transformation;
0N/A note that this is equivalent to reapplying
0N/A the previous transformation, unaltered. except that
0N/A the <code>ClassFileLoadHook</code> event
0N/A is <b>not</b> sent to these agents
0N/A </li>
0N/A <li>for each <fieldlink id="can_retransform_classes"
0N/A struct="jvmtiCapabilities">retransformation
0N/A capable</fieldlink>
0N/A agent, the <code>ClassFileLoadHook</code> event is sent,
0N/A allowing a new transformation to be applied
0N/A </li>
0N/A <li>the transformed class file bytes are installed as the new
0N/A definition of the class
0N/A </li>
0N/A </ul>
0N/A See the <eventlink id="ClassFileLoadHook"/> event for more details.
0N/A <p/>
0N/A The initial class file bytes represent the bytes passed to
0N/A <code>ClassLoader.defineClass</code>
0N/A or <code>RedefineClasses</code> (before any transformations
0N/A were applied), however they may not exactly match them.
0N/A The constant pool may differ in ways described in
0N/A <functionlink id="GetConstantPool"/>.
0N/A Constant pool indices in the bytecodes of methods will correspond.
0N/A Some attributes may not be present.
0N/A Where order is not meaningful, for example the order of methods,
0N/A order may not be preserved.
0N/A <p/>
0N/A Retransformation can cause new versions of methods to be installed.
0N/A Old method versions may become
0N/A <internallink id="obsoleteMethods">obsolete</internallink>
0N/A The new method version will be used on new invokes.
0N/A If a method has active stack frames, those active frames continue to
0N/A run the bytecodes of the original method version.
0N/A <p/>
0N/A This function does not cause any initialization except that which
0N/A would occur under the customary JVM semantics.
0N/A In other words, retransforming a class does not cause its initializers to be
0N/A run. The values of static fields will remain as they were
0N/A prior to the call.
0N/A <p/>
0N/A Threads need not be suspended.
0N/A <p/>
0N/A All breakpoints in the class are cleared.
0N/A <p/>
0N/A All attributes are updated.
0N/A <p/>
0N/A Instances of the retransformed class are not affected -- fields retain their
0N/A previous values.
0N/A <functionlink id="GetTag">Tags</functionlink> on the instances are
0N/A also unaffected.
0N/A <p/>
0N/A In response to this call, no events other than the
0N/A <eventlink id="ClassFileLoadHook"/> event
0N/A will be sent.
0N/A <p/>
0N/A The retransformation may change method bodies, the constant pool and attributes.
0N/A The retransformation must not add, remove or rename fields or methods, change the
0N/A signatures of methods, change modifiers, or change inheritance.
0N/A These restrictions may be lifted in future versions.
0N/A See the error return description below for information on error codes
0N/A returned if an unsupported retransformation is attempted.
0N/A The class file bytes are not verified or installed until they have passed
0N/A through the chain of <eventlink id="ClassFileLoadHook"/> events, thus the
0N/A returned error code reflects the result of the transformations.
0N/A If any error code is returned other than <code>JVMTI_ERROR_NONE</code>,
0N/A none of the classes to be retransformed will have a new definition installed.
0N/A When this function returns (with the error code of <code>JVMTI_ERROR_NONE</code>)
0N/A all of the classes to be retransformed will have their new definitions installed.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_retransform_classes"></required>
0N/A <capability id="can_retransform_any_class"></capability>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="class_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The number of classes to be retransformed.
0N/A </description>
0N/A </param>
0N/A <param id="classes">
0N/A <inbuf incount="class_count"><jclass/></inbuf>
0N/A <description>
0N/A The array of classes to be retransformed.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_UNMODIFIABLE_CLASS">
0N/A One of the <paramlink id="classes"/> cannot be modified.
0N/A See <functionlink id="IsModifiableClass"/>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_INVALID_CLASS">
0N/A One of the <paramlink id="classes"/> is not a valid class.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_VERSION">
0N/A A retransformed class file has a version number not supported by this VM.
0N/A </error>
0N/A <error id="JVMTI_ERROR_INVALID_CLASS_FORMAT">
0N/A A retransformed class file is malformed (The VM would return a <code>ClassFormatError</code>).
0N/A </error>
0N/A <error id="JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION">
0N/A The retransformed class file definitions would lead to a circular definition
0N/A (the VM would return a <code>ClassCircularityError</code>).
0N/A </error>
0N/A <error id="JVMTI_ERROR_FAILS_VERIFICATION">
0N/A The retransformed class file bytes fail verification.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NAMES_DONT_MATCH">
0N/A The class name defined in a retransformed class file is
0N/A different from the name in the old class object.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED">
0N/A A retransformed class file would require adding a method.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED">
0N/A A retransformed class file changes a field.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED">
0N/A A direct superclass is different for a retransformed class file,
0N/A or the set of directly implemented
0N/A interfaces is different.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED">
0N/A A retransformed class file does not declare a method
0N/A declared in the old class version.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED">
0N/A A retransformed class file has different class modifiers.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED">
0N/A A method in the retransformed class file has different modifiers
0N/A than its counterpart in the old class version.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="RedefineClasses" jkernel="yes" num="87">
0N/A <synopsis>Redefine Classes</synopsis>
0N/A <typedef id="jvmtiClassDefinition" label="Class redefinition description">
0N/A <field id="klass">
0N/A <jclass/>
0N/A <description>
0N/A Class object for this class
0N/A </description>
0N/A </field>
0N/A <field id="class_byte_count">
0N/A <jint/>
0N/A <description>
0N/A Number of bytes defining class (below)
0N/A </description>
0N/A </field>
0N/A <field id="class_bytes">
0N/A <inbuf incount="class_byte_count"><uchar/></inbuf>
0N/A <description>
2427N/A Bytes defining class (in <vmspec chapter="4"/>)
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <description>
0N/A All classes given are redefined according to the definitions
0N/A supplied.
0N/A This function is used to replace the definition of a class
0N/A with a new definition, as might be needed in fix-and-continue
0N/A debugging.
0N/A Where the existing class file bytes are to be transformed, for
0N/A example in
0N/A <internallink id="bci">bytecode instrumentation</internallink>,
0N/A <functionlink id="RetransformClasses"/> should be used.
0N/A <p/>
0N/A Redefinition can cause new versions of methods to be installed.
0N/A Old method versions may become
0N/A <internallink id="obsoleteMethods">obsolete</internallink>
0N/A The new method version will be used on new invokes.
0N/A If a method has active stack frames, those active frames continue to
0N/A run the bytecodes of the original method version.
0N/A If resetting of stack frames is desired, use
0N/A <functionlink id="PopFrame"></functionlink>
0N/A to pop frames with obsolete method versions.
0N/A <p/>
0N/A This function does not cause any initialization except that which
0N/A would occur under the customary JVM semantics.
0N/A In other words, redefining a class does not cause its initializers to be
0N/A run. The values of static fields will remain as they were
0N/A prior to the call.
0N/A <p/>
0N/A Threads need not be suspended.
0N/A <p/>
0N/A All breakpoints in the class are cleared.
0N/A <p/>
0N/A All attributes are updated.
0N/A <p/>
0N/A Instances of the redefined class are not affected -- fields retain their
0N/A previous values.
0N/A <functionlink id="GetTag">Tags</functionlink> on the instances are
0N/A also unaffected.
0N/A <p/>
0N/A In response to this call, the <jvmti/> event
0N/A <eventlink id="ClassFileLoadHook">Class File Load Hook</eventlink>
0N/A will be sent (if enabled), but no other <jvmti/> events will be sent.
0N/A <p/>
0N/A The redefinition may change method bodies, the constant pool and attributes.
0N/A The redefinition must not add, remove or rename fields or methods, change the
0N/A signatures of methods, change modifiers, or change inheritance.
0N/A These restrictions may be lifted in future versions.
0N/A See the error return description below for information on error codes
0N/A returned if an unsupported redefinition is attempted.
0N/A The class file bytes are not verified or installed until they have passed
0N/A through the chain of <eventlink id="ClassFileLoadHook"/> events, thus the
0N/A returned error code reflects the result of the transformations applied
0N/A to the bytes passed into <paramlink id="class_definitions"/>.
0N/A If any error code is returned other than <code>JVMTI_ERROR_NONE</code>,
0N/A none of the classes to be redefined will have a new definition installed.
0N/A When this function returns (with the error code of <code>JVMTI_ERROR_NONE</code>)
0N/A all of the classes to be redefined will have their new definitions installed.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_redefine_classes"></required>
0N/A <capability id="can_redefine_any_class"></capability>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="class_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The number of classes specified in <code>class_definitions</code>
0N/A </description>
0N/A </param>
0N/A <param id="class_definitions">
0N/A <inbuf incount="class_count"><struct>jvmtiClassDefinition</struct></inbuf>
0N/A <description>
0N/A The array of new class definitions
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NULL_POINTER">
0N/A One of <code>class_bytes</code> is <code>NULL</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNMODIFIABLE_CLASS">
0N/A An element of <code>class_definitions</code> cannot be modified.
0N/A See <functionlink id="IsModifiableClass"/>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_INVALID_CLASS">
0N/A An element of <code>class_definitions</code> is not a valid class.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_VERSION">
0N/A A new class file has a version number not supported by this VM.
0N/A </error>
0N/A <error id="JVMTI_ERROR_INVALID_CLASS_FORMAT">
0N/A A new class file is malformed (The VM would return a <code>ClassFormatError</code>).
0N/A </error>
0N/A <error id="JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION">
0N/A The new class file definitions would lead to a circular definition
0N/A (the VM would return a <code>ClassCircularityError</code>).
0N/A </error>
0N/A <error id="JVMTI_ERROR_FAILS_VERIFICATION">
0N/A The class bytes fail verification.
0N/A </error>
0N/A <error id="JVMTI_ERROR_NAMES_DONT_MATCH">
0N/A The class name defined in a new class file is
0N/A different from the name in the old class object.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED">
0N/A A new class file would require adding a method.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED">
0N/A A new class version changes a field.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED">
0N/A A direct superclass is different for a new class
0N/A version, or the set of directly implemented
0N/A interfaces is different.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED">
0N/A A new class version does not declare a method
0N/A declared in the old class version.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED">
0N/A A new class version has different modifiers.
0N/A </error>
0N/A <error id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED">
0N/A A method in the new class version has different modifiers
0N/A than its counterpart in the old class version.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="object" label="Object">
0N/A
0N/A <function id="GetObjectSize" jkernel="yes" phase="start" num="154">
0N/A <synopsis>Get Object Size</synopsis>
0N/A <description>
0N/A For the object indicated by <code>object</code>,
0N/A return via <code>size_ptr</code> the size of the object.
0N/A This size is an implementation-specific approximation of
0N/A the amount of storage consumed by this object.
0N/A It may include some or all of the object's overhead, and thus
0N/A is useful for comparison within an implementation but not
0N/A between implementations.
0N/A The estimate may change during a single invocation of the JVM.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A The object to query.
0N/A </description>
0N/A </param>
0N/A <param id="size_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A On return, points to the object's size in bytes.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetObjectHashCode" phase="start" num="58">
0N/A <synopsis>Get Object Hash Code</synopsis>
0N/A <description>
0N/A For the object indicated by <code>object</code>,
0N/A return via <code>hash_code_ptr</code> a hash code.
0N/A This hash code could be used to maintain a hash table of object references,
0N/A however, on some implementations this can cause significant performance
0N/A impacts--in most cases
0N/A <internallink id="Heap">tags</internallink>
0N/A will be a more efficient means of associating information with objects.
0N/A This function guarantees
0N/A the same hash code value for a particular object throughout its life
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A The object to query.
0N/A </description>
0N/A </param>
0N/A <param id="hash_code_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the object's hash code.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetObjectMonitorUsage" num="59">
0N/A <synopsis>Get Object Monitor Usage</synopsis>
0N/A <typedef id="jvmtiMonitorUsage" label="Object monitor usage information">
0N/A <field id="owner">
0N/A <jthread/>
0N/A <description>
0N/A The thread owning this monitor, or <code>NULL</code> if unused
0N/A </description>
0N/A </field>
0N/A <field id="entry_count">
0N/A <jint/>
0N/A <description>
0N/A The number of times the owning thread has entered the monitor
0N/A </description>
0N/A </field>
0N/A <field id="waiter_count">
0N/A <jint/>
0N/A <description>
0N/A The number of threads waiting to own this monitor
0N/A </description>
0N/A </field>
0N/A <field id="waiters">
0N/A <allocfieldbuf><jthread/></allocfieldbuf>
0N/A <description>
0N/A The <code>waiter_count</code> waiting threads
0N/A </description>
0N/A </field>
0N/A <field id="notify_waiter_count">
0N/A <jint/>
0N/A <description>
0N/A The number of threads waiting to be notified by this monitor
0N/A </description>
0N/A </field>
0N/A <field id="notify_waiters">
0N/A <allocfieldbuf><jthread/></allocfieldbuf>
0N/A <description>
0N/A The <code>notify_waiter_count</code> threads waiting to be notified
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <description>
0N/A Get information about the object's monitor.
0N/A The fields of the <functionlink id="jvmtiMonitorUsage"></functionlink> structure
0N/A are filled in with information about usage of the monitor.
0N/A <todo>
0N/A Decide and then clarify suspend requirements.
0N/A </todo>
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_monitor_info"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A The object to query.
0N/A </description>
0N/A </param>
0N/A <param id="info_ptr">
0N/A <outptr><struct>jvmtiMonitorUsage</struct></outptr>
0N/A <description>
0N/A On return, filled with monitor information for the
0N/A specified object.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <elide>
0N/A <function id="GetObjectMonitors" num="116">
0N/A <synopsis>Get Object Monitors</synopsis>
0N/A <description>
0N/A Return the list of object monitors.
0N/A <p/>
0N/A Note: details about each monitor can be examined with
0N/A <functionlink id="GetObjectMonitorUsage"></functionlink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_monitor_info"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitorCnt">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, pointer to the number
0N/A of monitors returned in <code>monitors_ptr</code>.
0N/A </description>
0N/A </param>
0N/A <param id="monitors_ptr">
0N/A <allocbuf outcount="monitorCnt"><jobject/></allocbuf>
0N/A <description>
0N/A On return, pointer to the monitor list.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A </elide>
0N/A
0N/A </category>
0N/A
0N/A <category id="fieldCategory" label="Field">
0N/A
0N/A <intro>
0N/A </intro>
0N/A
0N/A <function id="GetFieldName" phase="start" num="60">
0N/A <synopsis>Get Field Name (and Signature)</synopsis>
0N/A <description>
0N/A For the field indicated by <paramlink id="klass"/> and <paramlink id="field"/>,
0N/A return the field name via <paramlink id="name_ptr"/> and field signature via
0N/A <paramlink id="signature_ptr"/>.
0N/A <p/>
0N/A Field signatures are defined in the JNI Specification and
2427N/A are referred to as <code>field descriptors</code> in
2427N/A <vmspec chapter="4.3.2"/>.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class of the field to query.
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to query.
0N/A </description>
0N/A </param>
0N/A <param id="name_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the name is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the field name, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A <param id="signature_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the signature is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the field signature, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A <param id="generic_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the generic signature is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the generic signature of the field, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A If there is no generic signature attribute for the field, then,
0N/A on return, points to <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetFieldDeclaringClass" phase="start" num="61">
0N/A <synopsis>Get Field Declaring Class</synopsis>
0N/A <description>
0N/A For the field indicated by <code>klass</code> and <code>field</code>
0N/A return the class that defined it via <code>declaring_class_ptr</code>.
0N/A The declaring class will either be <code>klass</code>, a superclass, or
0N/A an implemented interface.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to query.
0N/A </description>
0N/A </param>
0N/A <param id="declaring_class_ptr">
0N/A <outptr><jclass/></outptr>
0N/A <description>
0N/A On return, points to the declaring class
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetFieldModifiers" phase="start" num="62">
0N/A <synopsis>Get Field Modifiers</synopsis>
0N/A <description>
0N/A For the field indicated by <code>klass</code> and <code>field</code>
0N/A return the access flags via <code>modifiers_ptr</code>.
2427N/A Access flags are defined in <vmspec chapter="4"/>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to query.
0N/A </description>
0N/A </param>
0N/A <param id="modifiers_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the access flags.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IsFieldSynthetic" phase="start" num="63">
0N/A <synopsis>Is Field Synthetic</synopsis>
0N/A <description>
0N/A For the field indicated by <code>klass</code> and <code>field</code>, return a
0N/A value indicating whether the field is synthetic via <code>is_synthetic_ptr</code>.
0N/A Synthetic fields are generated by the compiler but not present in the
0N/A original source code.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_synthetic_attribute"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A The class of the field to query.
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="klass"/>
0N/A <description>
0N/A The field to query.
0N/A </description>
0N/A </param>
0N/A <param id="is_synthetic_ptr">
0N/A <outptr><jboolean/></outptr>
0N/A <description>
0N/A On return, points to the boolean result of this function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="method" label="Method">
0N/A
0N/A <intro>
0N/A These functions provide information about a method (represented as a
0N/A <typelink id="jmethodID"/>) and set how methods are processed.
0N/A </intro>
0N/A
0N/A <intro id="obsoleteMethods" label="Obsolete Methods">
0N/A The functions <functionlink id="RetransformClasses"/> and
0N/A <functionlink id="RedefineClasses"/> can cause new versions
0N/A of methods to be installed.
0N/A An original version of a method is considered equivalent
0N/A to the new version if:
0N/A <ul>
0N/A <li>their bytecodes are the same except for indices into the
0N/A constant pool and </li>
0N/A <li>the referenced constants are equal.</li>
0N/A </ul>
0N/A An original method version which is not equivalent to the
0N/A new method version is called obsolete and is assigned a new method ID;
0N/A the original method ID now refers to the new method version.
0N/A A method ID can be tested for obsolescence with
0N/A <functionlink id="IsMethodObsolete"/>.
0N/A </intro>
0N/A
0N/A <function id="GetMethodName" phase="start" num="64">
0N/A <synopsis>Get Method Name (and Signature)</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return the method name via <code>name_ptr</code> and method signature via
0N/A <code>signature_ptr</code>.
0N/A <p/>
2427N/A Method signatures are defined in the JNI Specification and are
2427N/A referred to as <code>method descriptors</code> in
2427N/A <vmspec chapter="4.3.3"/>.
0N/A Note this is different
0N/A than method signatures as defined in the <i>Java Language Specification</i>.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="method">
0N/A <jmethodID/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="name_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the name is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the method name, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A <param id="signature_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the signature is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the method signature, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A <param id="generic_ptr">
0N/A <allocbuf>
0N/A <char/>
0N/A <nullok>the generic signature is not returned</nullok>
0N/A </allocbuf>
0N/A <description>
0N/A On return, points to the generic signature of the method, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A If there is no generic signature attribute for the method, then,
0N/A on return, points to <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetMethodDeclaringClass" phase="start" num="65">
0N/A <synopsis>Get Method Declaring Class</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return the class that defined it via <code>declaring_class_ptr</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="declaring_class_ptr">
0N/A <outptr><jclass/></outptr>
0N/A <description>
0N/A On return, points to the declaring class
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetMethodModifiers" phase="start" num="66">
0N/A <synopsis>Get Method Modifiers</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return the access flags via <code>modifiers_ptr</code>.
2427N/A Access flags are defined in <vmspec chapter="4"/>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="modifiers_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the access flags.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetMaxLocals" phase="start" num="68">
0N/A <synopsis>Get Max Locals</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return the number of local variable slots used by the method,
0N/A including the local variables used to pass parameters to the
0N/A method on its invocation.
0N/A <p/>
2427N/A See <code>max_locals</code> in <vmspec chapter="4.7.3"/>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass" native="error"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="max_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the maximum number of local slots
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetArgumentsSize" phase="start" num="69">
0N/A <synopsis>Get Arguments Size</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return via <code>max_ptr</code> the number of local variable slots used
0N/A by the method's arguments.
0N/A Note that two-word arguments use two slots.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass" native="error"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="size_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of argument slots
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetLineNumberTable" phase="start" num="70">
0N/A <synopsis>Get Line Number Table</synopsis>
0N/A <typedef id="jvmtiLineNumberEntry" label="Line number table entry">
0N/A <field id="start_location">
0N/A <jlocation/>
0N/A <description>
0N/A the <datalink id="jlocation"></datalink> where the line begins
0N/A </description>
0N/A </field>
0N/A <field id="line_number">
0N/A <jint/>
0N/A <description>
0N/A the line number
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return a table of source line number entries. The size of the table is
0N/A returned via <code>entry_count_ptr</code> and the table itself is
0N/A returned via <code>table_ptr</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_line_numbers"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass" native="error"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="entry_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of entries in the table
0N/A </description>
0N/A </param>
0N/A <param id="table_ptr">
0N/A <allocbuf outcount="entry_count_ptr"><struct>jvmtiLineNumberEntry</struct></allocbuf>
0N/A <description>
0N/A On return, points to the line number table pointer.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ABSENT_INFORMATION">
0N/A Class information does not include line numbers.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetMethodLocation" phase="start" num="71">
0N/A <synopsis>Get Method Location</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return the beginning and ending addresses through
0N/A <code>start_location_ptr</code> and <code>end_location_ptr</code>. In a
0N/A conventional byte code indexing scheme,
0N/A <code>start_location_ptr</code> will always point to zero
0N/A and <code>end_location_ptr</code>
0N/A will always point to the byte code count minus one.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass" native="error"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="start_location_ptr">
0N/A <outptr><jlocation/></outptr>
0N/A <description>
0N/A On return, points to the first location, or
0N/A <code>-1</code> if location information is not available.
0N/A If the information is available and
0N/A <functionlink id="GetJLocationFormat"></functionlink>
0N/A returns <datalink id="JVMTI_JLOCATION_JVMBCI"></datalink>
0N/A then this will always be zero.
0N/A </description>
0N/A </param>
0N/A <param id="end_location_ptr">
0N/A <outptr><jlocation/></outptr>
0N/A <description>
0N/A On return, points to the last location,
0N/A or <code>-1</code> if location information is not available.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ABSENT_INFORMATION">
0N/A Class information does not include method sizes.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetLocalVariableTable" num="72">
0N/A <synopsis>Get Local Variable Table</synopsis>
0N/A <typedef id="jvmtiLocalVariableEntry" label="Local variable table entry">
0N/A <field id="start_location">
0N/A <jlocation/>
0N/A <description>
0N/A The code array index where the local variable is first valid
0N/A (that is, where it must have a value).
0N/A </description>
0N/A </field>
0N/A <field id="length">
0N/A <jint/>
0N/A <description>
0N/A The length of the valid section for this local variable.
0N/A The last code array index where the local variable is valid
0N/A is <code>start_location + length</code>.
0N/A </description>
0N/A </field>
0N/A <field id="name">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The local variable name, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </field>
0N/A <field id="signature">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The local variable's type signature, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A The signature format is the same as that defined in
2427N/A <vmspec chapter="4.3.2"/>.
0N/A </description>
0N/A </field>
0N/A <field id="generic_signature">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The local variable's generic signature, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A The value of this field will be <code>NULL</code> for any local
0N/A variable which does not have a generic type.
0N/A </description>
0N/A </field>
0N/A <field id="slot">
0N/A <jint/>
0N/A <description>
0N/A The local variable's slot. See <internallink id="local">Local Variables</internallink>.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <description>
0N/A Return local variable information.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A <required id="can_access_local_variables"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="method">
0N/A <jmethodID native="error"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="entry_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of entries in the table
0N/A </description>
0N/A </param>
0N/A <param id="table_ptr">
0N/A <allocbuf outcount="entry_count_ptr"><struct>jvmtiLocalVariableEntry</struct></allocbuf>
0N/A <description>
0N/A On return, points to an array of local variable table entries.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ABSENT_INFORMATION">
0N/A Class information does not include local variable
0N/A information.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetBytecodes" phase="start" num="75">
0N/A <synopsis>Get Bytecodes</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>,
0N/A return the byte codes that implement the method. The number of
0N/A bytecodes is returned via <code>bytecode_count_ptr</code>. The byte codes
0N/A themselves are returned via <code>bytecodes_ptr</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_bytecodes"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass" native="error"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="bytecode_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the length of the byte code array
0N/A </description>
0N/A </param>
0N/A <param id="bytecodes_ptr">
0N/A <allocbuf outcount="bytecode_count_ptr"><uchar/></allocbuf>
0N/A <description>
0N/A On return, points to the pointer to the byte code array
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IsMethodNative" phase="start" num="76">
0N/A <synopsis>Is Method Native</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>, return a
0N/A value indicating whether the method is native via <code>is_native_ptr</code>
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="is_native_ptr">
0N/A <outptr><jboolean/></outptr>
0N/A <description>
0N/A On return, points to the boolean result of this function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IsMethodSynthetic" phase="start" num="77">
0N/A <synopsis>Is Method Synthetic</synopsis>
0N/A <description>
0N/A For the method indicated by <code>method</code>, return a
0N/A value indicating whether the method is synthetic via <code>is_synthetic_ptr</code>.
0N/A Synthetic methods are generated by the compiler but not present in the
0N/A original source code.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_get_synthetic_attribute"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A The method to query.
0N/A </description>
0N/A </param>
0N/A <param id="is_synthetic_ptr">
0N/A <outptr><jboolean/></outptr>
0N/A <description>
0N/A On return, points to the boolean result of this function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="IsMethodObsolete" phase="start" num="91">
0N/A <synopsis>Is Method Obsolete</synopsis>
0N/A <description>
0N/A Determine if a method ID refers to an
0N/A <internallink id="obsoleteMethods">obsolete</internallink>
0N/A method version.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A The class to query.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A The method ID to query.
0N/A </description>
0N/A </param>
0N/A <param id="is_obsolete_ptr">
0N/A <outptr><jboolean/></outptr>
0N/A <description>
0N/A On return, points to the boolean result of this function.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetNativeMethodPrefix" jkernel="yes" phase="any" num="73" since="1.1">
0N/A <synopsis>Set Native Method Prefix</synopsis>
0N/A <description>
0N/A This function modifies the failure handling of
0N/A native method resolution by allowing retry
0N/A with a prefix applied to the name.
0N/A When used with the
0N/A <eventlink id="ClassFileLoadHook">ClassFileLoadHook
0N/A event</eventlink>, it enables native methods to be
0N/A <internallink id="bci">instrumented</internallink>.
0N/A <p/>
0N/A Since native methods cannot be directly instrumented
0N/A (they have no bytecodes), they must be wrapped with
0N/A a non-native method which can be instrumented.
0N/A For example, if we had:
0N/A <example>
0N/Anative boolean foo(int x);</example>
0N/A <p/>
0N/A We could transform the class file (with the
0N/A ClassFileLoadHook event) so that this becomes:
0N/A <example>
0N/Aboolean foo(int x) {
0N/A <i>... record entry to foo ...</i>
0N/A return wrapped_foo(x);
0N/A}
0N/A
0N/Anative boolean wrapped_foo(int x);</example>
0N/A <p/>
0N/A Where foo becomes a wrapper for the actual native method
0N/A with the appended prefix "wrapped_". Note that
0N/A "wrapped_" would be a poor choice of prefix since it
0N/A might conceivably form the name of an existing method
0N/A thus something like "$$$MyAgentWrapped$$$_" would be
0N/A better but would make these examples less readable.
0N/A <p/>
0N/A The wrapper will allow data to be collected on the native
0N/A method call, but now the problem becomes linking up the
0N/A wrapped method with the native implementation.
0N/A That is, the method <code>wrapped_foo</code> needs to be
0N/A resolved to the native implementation of <code>foo</code>,
0N/A which might be:
0N/A <example>
0N/AJava_somePackage_someClass_foo(JNIEnv* env, jint x)</example>
0N/A <p/>
0N/A This function allows the prefix to be specified and the
0N/A proper resolution to occur.
0N/A Specifically, when the standard resolution fails, the
0N/A resolution is retried taking the prefix into consideration.
0N/A There are two ways that resolution occurs, explicit
0N/A resolution with the JNI function <code>RegisterNatives</code>
0N/A and the normal automatic resolution. For
0N/A <code>RegisterNatives</code>, the VM will attempt this
0N/A association:
0N/A <example>
0N/Amethod(foo) -> nativeImplementation(foo)</example>
0N/A <p/>
0N/A When this fails, the resolution will be retried with
0N/A the specified prefix prepended to the method name,
0N/A yielding the correct resolution:
0N/A <example>
0N/Amethod(wrapped_foo) -> nativeImplementation(foo)</example>
0N/A <p/>
0N/A For automatic resolution, the VM will attempt:
0N/A <example>
0N/Amethod(wrapped_foo) -> nativeImplementation(wrapped_foo)</example>
0N/A <p/>
0N/A When this fails, the resolution will be retried with
0N/A the specified prefix deleted from the implementation name,
0N/A yielding the correct resolution:
0N/A <example>
0N/Amethod(wrapped_foo) -> nativeImplementation(foo)</example>
0N/A <p/>
0N/A Note that since the prefix is only used when standard
0N/A resolution fails, native methods can be wrapped selectively.
0N/A <p/>
0N/A Since each <jvmti/> environment is independent and
0N/A can do its own transformation of the bytecodes, more
0N/A than one layer of wrappers may be applied. Thus each
0N/A environment needs its own prefix. Since transformations
0N/A are applied in order, the prefixes, if applied, will
0N/A be applied in the same order.
0N/A The order of transformation application is described in
0N/A the <eventlink id="ClassFileLoadHook"/> event.
0N/A Thus if three environments applied
0N/A wrappers, <code>foo</code> might become
0N/A <code>$env3_$env2_$env1_foo</code>. But if, say,
0N/A the second environment did not apply a wrapper to
0N/A <code>foo</code> it would be just
0N/A <code>$env3_$env1_foo</code>. To be able to
0N/A efficiently determine the sequence of prefixes,
0N/A an intermediate prefix is only applied if its non-native
0N/A wrapper exists. Thus, in the last example, even though
0N/A <code>$env1_foo</code> is not a native method, the
0N/A <code>$env1_</code> prefix is applied since
0N/A <code>$env1_foo</code> exists.
0N/A <p/>
0N/A Since the prefixes are used at resolution time
0N/A and since resolution may be arbitrarily delayed, a
0N/A native method prefix must remain set as long as there
0N/A are corresponding prefixed native methods.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_set_native_method_prefix"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="prefix">
0N/A <inbuf>
0N/A <char/>
0N/A <nullok>
0N/A any existing prefix in this environment is cancelled
0N/A </nullok>
0N/A </inbuf>
0N/A <description>
0N/A The prefix to apply, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetNativeMethodPrefixes" jkernel="yes" phase="any" num="74" since="1.1">
0N/A <synopsis>Set Native Method Prefixes</synopsis>
0N/A <description>
0N/A For a normal agent, <functionlink id="SetNativeMethodPrefix"/>
0N/A will provide all needed native method prefixing.
0N/A For a meta-agent that performs multiple independent class
0N/A file transformations (for example as a proxy for another
0N/A layer of agents) this function allows each transformation
0N/A to have its own prefix.
0N/A The prefixes are applied in the order supplied and are
0N/A processed in the same manor as described for the
0N/A application of prefixes from multiple <jvmti/> environments
0N/A in <functionlink id="SetNativeMethodPrefix"/>.
0N/A <p/>
0N/A Any previous prefixes are replaced. Thus, calling this
0N/A function with a <paramlink id="prefix_count"/> of <code>0</code>
0N/A disables prefixing in this environment.
0N/A <p/>
0N/A <functionlink id="SetNativeMethodPrefix"/> and this function
0N/A are the two ways to set the prefixes.
0N/A Calling <code>SetNativeMethodPrefix</code> with
0N/A a prefix is the same as calling this function with
0N/A <paramlink id="prefix_count"/> of <code>1</code>.
0N/A Calling <code>SetNativeMethodPrefix</code> with
0N/A <code>NULL</code> is the same as calling this function with
0N/A <paramlink id="prefix_count"/> of <code>0</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_set_native_method_prefix"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="prefix_count">
0N/A <jint min="0"/>
0N/A <description>
0N/A The number of prefixes to apply.
0N/A </description>
0N/A </param>
0N/A <param id="prefixes">
0N/A <agentbuf>
0N/A <char/>
0N/A </agentbuf>
0N/A <description>
0N/A The prefixes to apply for this environment, each encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="RawMonitors" label="Raw Monitor">
0N/A
0N/A <function id="CreateRawMonitor" phase="onload" callbacksafe="safe" num="31">
0N/A <synopsis>Create Raw Monitor</synopsis>
0N/A <description>
0N/A Create a raw monitor.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="name">
0N/A <inbuf><char/></inbuf>
0N/A <description>
0N/A A name to identify the monitor, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A <param id="monitor_ptr">
0N/A <outptr><jrawMonitorID/></outptr>
0N/A <description>
0N/A On return, points to the created monitor.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="DestroyRawMonitor" phase="onload" callbacksafe="safe" num="32">
0N/A <synopsis>Destroy Raw Monitor</synopsis>
0N/A <description>
0N/A Destroy the raw monitor.
0N/A If the monitor being destroyed has been entered by this thread, it will be
0N/A exited before it is destroyed.
0N/A If the monitor being destroyed has been entered by another thread,
0N/A an error will be returned and the monitor will not be destroyed.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitor">
0N/A <jrawMonitorID/>
0N/A <description>
0N/A The monitor
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
0N/A Not monitor owner
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="RawMonitorEnter" phase="any" callbacksafe="safe" impl="innative notrace" num="33">
0N/A <synopsis>Raw Monitor Enter</synopsis>
0N/A <description>
0N/A Gain exclusive ownership of a raw monitor.
0N/A The same thread may enter a monitor more then once.
0N/A The thread must
0N/A <functionlink id="RawMonitorExit">exit</functionlink>
0N/A the monitor the same number of times as it is entered.
0N/A If a monitor is entered during <code>OnLoad</code> (before attached threads exist)
0N/A and has not exited when attached threads come into existence, the enter
0N/A is considered to have occurred on the main thread.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitor">
0N/A <jrawMonitorID/>
0N/A <description>
0N/A The monitor
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="RawMonitorExit" phase="any" callbacksafe="safe" impl="innative notrace" num="34">
0N/A <synopsis>Raw Monitor Exit</synopsis>
0N/A <description>
0N/A Release exclusive ownership of a raw monitor.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitor">
0N/A <jrawMonitorID/>
0N/A <description>
0N/A The monitor
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
0N/A Not monitor owner
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="RawMonitorWait" phase="any" callbacksafe="safe" impl="innative notrace" num="35">
0N/A <synopsis>Raw Monitor Wait</synopsis>
0N/A <description>
0N/A Wait for notification of the raw monitor.
0N/A <p/>
0N/A Causes the current thread to wait until either another thread calls
0N/A <functionlink id="RawMonitorNotify"/> or
0N/A <functionlink id="RawMonitorNotifyAll"/>
0N/A for the specified raw monitor, or the specified
0N/A <paramlink id="millis">timeout</paramlink>
0N/A has elapsed.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitor">
0N/A <jrawMonitorID/>
0N/A <description>
0N/A The monitor
0N/A </description>
0N/A </param>
0N/A <param id="millis">
0N/A <jlong/>
0N/A <description>
0N/A The timeout, in milliseconds. If the timeout is
0N/A zero, then real time is not taken into consideration
0N/A and the thread simply waits until notified.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
0N/A Not monitor owner
0N/A </error>
0N/A <error id="JVMTI_ERROR_INTERRUPT">
0N/A Wait was interrupted, try again
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="RawMonitorNotify" phase="any" callbacksafe="safe" impl="notrace" num="36">
0N/A <synopsis>Raw Monitor Notify</synopsis>
0N/A <description>
0N/A Notify a single thread waiting on the raw monitor.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitor">
0N/A <jrawMonitorID/>
0N/A <description>
0N/A The monitor
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
0N/A Not monitor owner
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="RawMonitorNotifyAll" phase="any" callbacksafe="safe" impl="notrace" num="37">
0N/A <synopsis>Raw Monitor Notify All</synopsis>
0N/A <description>
0N/A Notify all threads waiting on the raw monitor.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitor">
0N/A <jrawMonitorID/>
0N/A <description>
0N/A The monitor
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_MONITOR_OWNER">
0N/A Not monitor owner
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <elide>
0N/A <function id="GetRawMonitorUse" num="118">
0N/A <synopsis>Get Raw Monitor Use</synopsis>
0N/A <description>
0N/A The fields of the <functionlink id="jvmtiMonitorUsage"></functionlink> structure
0N/A are filled in with information about usage of the raw monitor.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_raw_monitor_usage"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitor">
0N/A <jrawMonitorID/>
0N/A <description>
0N/A the raw monitor to query.
0N/A </description>
0N/A </param>
0N/A <param id="info_ptr">
0N/A <outptr><struct>jvmtiMonitorUsage</struct></outptr>
0N/A <description>
0N/A On return, filled with monitor information for the
0N/A specified raw monitor.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetRawMonitors" num="119">
0N/A <synopsis>Get Raw Monitors</synopsis>
0N/A <description>
0N/A Return the list of raw monitors.
0N/A <p/>
0N/A Note: details about each monitor can be examined with
0N/A <functionlink id="GetRawMonitorUse"></functionlink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_raw_monitor_usage"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="monitorCnt">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, pointer to the number
0N/A of monitors returned in <code>monitors_ptr</code>.
0N/A </description>
0N/A </param>
0N/A <param id="monitors_ptr">
0N/A <allocbuf outcount="monitorCnt"><jrawMonitorID/></allocbuf>
0N/A <description>
0N/A On return, pointer to the monitor list.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A </elide>
0N/A </category>
0N/A
0N/A <category id="jniIntercept" label="JNI Function Interception">
0N/A
0N/A <intro>
0N/A Provides the ability to intercept and resend
0N/A Java Native Interface (JNI) function calls
0N/A by manipulating the JNI function table.
0N/A See <externallink id="http://java.sun.com/javase/6/docs/guide/jni/spec/functions.html">JNI
0N/A Functions</externallink> in the <i>Java Native Interface Specification</i>.
0N/A <p/>
0N/A The following example illustrates intercepting the
0N/A <code>NewGlobalRef</code> JNI call in order to count reference
0N/A creation.
0N/A <example>
0N/AJNIEnv original_jni_Functions;
0N/AJNIEnv redirected_jni_Functions;
0N/Aint my_global_ref_count = 0;
0N/A
0N/Ajobject
0N/AMyNewGlobalRef(JNIEnv *jni_env, jobject lobj) {
0N/A ++my_global_ref_count;
0N/A return originalJNIFunctions-&gt;NewGlobalRef(env, lobj);
0N/A}
0N/A
0N/Avoid
0N/AmyInit() {
0N/A jvmtiError err;
0N/A
0N/A err = (*jvmti_env)-&gt;GetJNIFunctionTable(jvmti_env, &amp;original_jni_Functions);
0N/A if (err != JVMTI_ERROR_NONE) {
0N/A die();
0N/A }
0N/A err = (*jvmti_env)-&gt;GetJNIFunctionTable(jvmti_env, &amp;redirected_jni_Functions);
0N/A if (err != JVMTI_ERROR_NONE) {
0N/A die();
0N/A }
0N/A redirectedJNIFunctions-&gt;NewGlobalRef = MyNewGlobalRef;
0N/A err = (*jvmti_env)-&gt;SetJNIFunctionTable(jvmti_env, redirected_jni_Functions);
0N/A if (err != JVMTI_ERROR_NONE) {
0N/A die();
0N/A }
0N/A}
0N/A </example>
0N/A Sometime after <code>myInit</code> is called the user's JNI
0N/A code is executed which makes the call to create a new global
0N/A reference. Instead of going to the normal JNI implementation
0N/A the call goes to <code>myNewGlobalRef</code>. Note that a
0N/A copy of the original function table is kept so that the normal
0N/A JNI function can be called after the data is collected.
0N/A Note also that any JNI functions which are not overwritten
0N/A will behave normally.
0N/A <todo>
0N/A check that the example compiles and executes.
0N/A </todo>
0N/A </intro>
0N/A
0N/A <function id="SetJNIFunctionTable" phase="start" num="120">
0N/A <synopsis>Set JNI Function Table</synopsis>
0N/A <description>
0N/A Set the JNI function table
0N/A in all current and future JNI environments.
0N/A As a result, all future JNI calls are directed to the specified functions.
0N/A Use <functionlink id="GetJNIFunctionTable"></functionlink> to get the
0N/A function table to pass to this function.
0N/A For this function to take effect the the updated table entries must be
0N/A used by the JNI clients.
0N/A Since the table is defined <code>const</code> some compilers may optimize
0N/A away the access to the table, thus preventing this function from taking
0N/A effect.
0N/A The table is copied--changes to the local copy of the
0N/A table have no effect.
0N/A This function affects only the function table, all other aspects of the environment are
0N/A unaffected.
0N/A See the examples <internallink id="jniIntercept">above</internallink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="function_table">
0N/A <inptr>
0N/A <struct>jniNativeInterface</struct>
0N/A </inptr>
0N/A <description>
0N/A Points to the new JNI function table.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetJNIFunctionTable" phase="start" num="121">
0N/A <synopsis>Get JNI Function Table</synopsis>
0N/A <description>
0N/A Get the JNI function table.
0N/A The JNI function table is copied into allocated memory.
0N/A If <functionlink id="SetJNIFunctionTable"></functionlink>
0N/A has been called, the modified (not the original) function
0N/A table is returned.
0N/A Only the function table is copied, no other aspects of the environment
0N/A are copied.
0N/A See the examples <internallink id="jniIntercept">above</internallink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="function_table">
0N/A <allocbuf>
0N/A <struct>jniNativeInterface</struct>
0N/A </allocbuf>
0N/A <description>
0N/A On return, <code>*function_table</code>
0N/A points a newly allocated copy of the JNI function table.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="eventManagement" label="Event Management">
0N/A
0N/A <function id="SetEventCallbacks" jkernel="yes" phase="onload" num="122">
0N/A <synopsis>Set Event Callbacks</synopsis>
0N/A <description>
0N/A Set the functions to be called for each event.
0N/A The callbacks are specified by supplying a replacement function table.
0N/A The function table is copied--changes to the local copy of the
0N/A table have no effect.
0N/A This is an atomic action, all callbacks are set at once.
0N/A No events are sent before this function is called.
0N/A When an entry is <code>NULL</code> or when the event is beyond
0N/A <paramlink id="size_of_callbacks"></paramlink> no event is sent.
0N/A Details on events are
0N/A described <internallink id="EventSection">later</internallink> in this document.
0N/A An event must be enabled and have a callback in order to be
0N/A sent--the order in which this function and
0N/A <functionlink id="SetEventNotificationMode"></functionlink>
0N/A are called does not affect the result.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="callbacks">
0N/A <inptr>
0N/A <struct>jvmtiEventCallbacks</struct>
0N/A <nullok>remove the existing callbacks</nullok>
0N/A </inptr>
0N/A <description>
0N/A The new event callbacks.
0N/A </description>
0N/A </param>
0N/A <param id="size_of_callbacks">
0N/A <jint min="0"/>
0N/A <description>
0N/A <code>sizeof(jvmtiEventCallbacks)</code>--for version
0N/A compatibility.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetEventNotificationMode" jkernel="yes" phase="onload" num="2">
0N/A <synopsis>Set Event Notification Mode</synopsis>
0N/A <description>
0N/A Control the generation of events.
0N/A <constants id="jvmtiEventMode" label="Event Enable/Disable" kind="enum">
0N/A <constant id="JVMTI_ENABLE" num="1">
0N/A If <paramlink id="mode"></paramlink> is <code>JVMTI_ENABLE</code>,
0N/A the event <paramlink id="event_type"></paramlink> will be enabled
0N/A </constant>
0N/A <constant id="JVMTI_DISABLE" num="0">
0N/A If <paramlink id="mode"></paramlink> is <code>JVMTI_DISABLE</code>,
0N/A the event <paramlink id="event_type"></paramlink> will be disabled
0N/A </constant>
0N/A </constants>
0N/A If <code>thread</code> is <code>NULL</code>,
0N/A the event is enabled or disabled globally; otherwise, it is
0N/A enabled or disabled for a particular thread.
0N/A An event is generated for
0N/A a particular thread if it is enabled either at the thread or global
0N/A levels.
0N/A <p/>
0N/A See <internallink id="EventIndex">below</internallink> for information on specific events.
0N/A <p/>
0N/A The following events cannot be controlled at the thread
0N/A level through this function.
0N/A <ul>
0N/A <li><eventlink id="VMInit"></eventlink></li>
0N/A <li><eventlink id="VMStart"></eventlink></li>
0N/A <li><eventlink id="VMDeath"></eventlink></li>
0N/A <li><eventlink id="ThreadStart"></eventlink></li>
0N/A <li><eventlink id="CompiledMethodLoad"></eventlink></li>
0N/A <li><eventlink id="CompiledMethodUnload"></eventlink></li>
0N/A <li><eventlink id="DynamicCodeGenerated"></eventlink></li>
0N/A <li><eventlink id="DataDumpRequest"></eventlink></li>
0N/A </ul>
0N/A <p/>
0N/A Initially, no events are enabled at either the thread level
0N/A or the global level.
0N/A <p/>
0N/A Any needed capabilities (see Event Enabling Capabilities below) must be possessed
0N/A before calling this function.
0N/A <p/>
0N/A Details on events are
0N/A described <internallink id="EventSection">below</internallink>.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <eventcapabilities></eventcapabilities>
0N/A <parameters>
0N/A <param id="mode">
0N/A <enum>jvmtiEventMode</enum>
0N/A <description>
0N/A <code>JVMTI_ENABLE</code> or <code>JVMTI_DISABLE</code>
0N/A </description>
0N/A </param>
0N/A <param id="event_type">
0N/A <enum>jvmtiEvent</enum>
0N/A <description>
0N/A the event to control
0N/A </description>
0N/A </param>
0N/A <param id="event_thread">
0N/A <ptrtype>
0N/A <jthread impl="noconvert"/>
0N/A <nullok>event is controlled at the global level</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A The thread to control
0N/A </description>
0N/A </param>
0N/A <param id="...">
0N/A <varargs/>
0N/A <description>
0N/A for future expansion
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_INVALID_THREAD">
0N/A <paramlink id="event_thread"/> is non-<code>NULL</code> and is not a valid thread.
0N/A </error>
0N/A <error id="JVMTI_ERROR_THREAD_NOT_ALIVE">
0N/A <paramlink id="event_thread"/> is non-<code>NULL</code> and is not live (has not been started or is now dead).
0N/A </error>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A thread level control was attempted on events which do not
0N/A permit thread level control.
0N/A </error>
0N/A <error id="JVMTI_ERROR_MUST_POSSESS_CAPABILITY">
0N/A The Required Event Enabling Capability is not possessed.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GenerateEvents" num="123">
0N/A <synopsis>Generate Events</synopsis>
0N/A <description>
0N/A Generate events to represent the current state of the VM.
0N/A For example, if <paramlink id="event_type"/> is
0N/A <code>JVMTI_EVENT_COMPILED_METHOD_LOAD</code>,
0N/A a <eventlink id="CompiledMethodLoad"></eventlink> event will be
0N/A sent for each currently compiled method.
0N/A Methods that were loaded and now have been unloaded are not sent.
0N/A The history of what events have previously been sent does not
0N/A effect what events are sent by this function--for example,
0N/A all currently compiled methods
0N/A will be sent each time this function is called.
0N/A <p/>
0N/A This function is useful when
0N/A events may have been missed due to the agent attaching after program
0N/A execution begins; this function generates the missed events.
0N/A <p/>
0N/A Attempts to execute Java programming language code or
0N/A JNI functions may be paused until this function returns -
0N/A so neither should be called from the thread sending the event.
0N/A This function returns only after the missed events have been
0N/A sent, processed and have returned.
0N/A The event may be sent on a different thread than the thread
0N/A on which the event occurred.
0N/A The callback for the event must be set with
0N/A <functionlink id="SetEventCallbacks"></functionlink>
0N/A and the event must be enabled with
0N/A <functionlink id="SetEventNotificationMode"></functionlink>
0N/A or the events will not occur.
0N/A If the VM no longer has the information to generate some or
0N/A all of the requested events, the events are simply not sent -
0N/A no error is returned.
0N/A <p/>
0N/A Only the following events are supported:
0N/A <ul>
0N/A <li><eventlink id="CompiledMethodLoad"></eventlink></li>
0N/A <li><eventlink id="DynamicCodeGenerated"></eventlink></li>
0N/A </ul>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <capability id="can_generate_compiled_method_load_events"></capability>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="event_type">
0N/A <enum>jvmtiEvent</enum>
0N/A <description>
0N/A The type of event to generate. Must be one of these:
0N/A <ul>
0N/A <li><eventlink id="CompiledMethodLoad"><code>JVMTI_EVENT_COMPILED_METHOD_LOAD</code></eventlink></li>
0N/A <li><eventlink id="DynamicCodeGenerated"><code>JVMTI_EVENT_DYNAMIC_CODE_GENERATED</code></eventlink></li>
0N/A </ul>
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_MUST_POSSESS_CAPABILITY">
0N/A <paramlink id="event_type"/> is
0N/A <eventlink id="CompiledMethodLoad"><code>JVMTI_EVENT_COMPILED_METHOD_LOAD</code></eventlink>
0N/A and <fieldlink id="can_generate_compiled_method_load_events" struct="jvmtiCapabilities"></fieldlink>
0N/A is <code>false</code>.
0N/A </error>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A <paramlink id="event_type"/> is other than
0N/A <eventlink id="CompiledMethodLoad"><code>JVMTI_EVENT_COMPILED_METHOD_LOAD</code></eventlink>
0N/A or <eventlink id="DynamicCodeGenerated"><code>JVMTI_EVENT_DYNAMIC_CODE_GENERATED</code></eventlink>.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="extension" label="Extension Mechanism">
0N/A
0N/A <intro>
0N/A These functions
0N/A allow a <jvmti/> implementation to provide functions and events
0N/A beyond those defined in this specification.
0N/A <p/>
0N/A Both extension functions and extension events have parameters
0N/A each of which has a 'type' and 'kind' chosen from the following tables:
0N/A
0N/A <constants id="jvmtiParamTypes" label="Extension Function/Event Parameter Types" kind="enum">
0N/A <constant id="JVMTI_TYPE_JBYTE" num="101">
0N/A Java programming language primitive type - <code>byte</code>.
0N/A JNI type <code>jbyte</code>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JCHAR" num="102">
0N/A Java programming language primitive type - <code>char</code>.
0N/A JNI type <code>jchar</code>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JSHORT" num="103">
0N/A Java programming language primitive type - <code>short</code>.
0N/A JNI type <code>jshort</code>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JINT" num="104">
0N/A Java programming language primitive type - <code>int</code>.
0N/A JNI type <datalink id="jint"></datalink>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JLONG" num="105">
0N/A Java programming language primitive type - <code>long</code>.
0N/A JNI type <datalink id="jlong"></datalink>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JFLOAT" num="106">
0N/A Java programming language primitive type - <code>float</code>.
0N/A JNI type <datalink id="jfloat"></datalink>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JDOUBLE" num="107">
0N/A Java programming language primitive type - <code>double</code>.
0N/A JNI type <datalink id="jdouble"></datalink>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JBOOLEAN" num="108">
0N/A Java programming language primitive type - <code>boolean</code>.
0N/A JNI type <datalink id="jboolean"></datalink>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JOBJECT" num="109">
0N/A Java programming language object type - <code>java.lang.Object</code>.
0N/A JNI type <datalink id="jobject"></datalink>.
0N/A Returned values are JNI local references and must be managed.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JTHREAD" num="110">
0N/A Java programming language object type - <code>java.lang.Thread</code>.
0N/A <jvmti/> type <datalink id="jthread"></datalink>.
0N/A Returned values are JNI local references and must be managed.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JCLASS" num="111">
0N/A Java programming language object type - <code>java.lang.Class</code>.
0N/A JNI type <datalink id="jclass"></datalink>.
0N/A Returned values are JNI local references and must be managed.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JVALUE" num="112">
0N/A Union of all Java programming language primitive and object types -
0N/A JNI type <datalink id="jvalue"></datalink>.
0N/A Returned values which represent object types are JNI local references and must be managed.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JFIELDID" num="113">
0N/A Java programming language field identifier -
0N/A JNI type <datalink id="jfieldID"></datalink>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JMETHODID" num="114">
0N/A Java programming language method identifier -
0N/A JNI type <datalink id="jmethodID"></datalink>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_CCHAR" num="115">
0N/A C programming language type - <code>char</code>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_CVOID" num="116">
0N/A C programming language type - <code>void</code>.
0N/A </constant>
0N/A <constant id="JVMTI_TYPE_JNIENV" num="117">
0N/A JNI environment - <code>JNIEnv</code>.
0N/A Should be used with the correct <datalink id="jvmtiParamKind"/> to make it a pointer type.
0N/A </constant>
0N/A </constants>
0N/A
0N/A <constants id="jvmtiParamKind" label="Extension Function/Event Parameter Kinds" kind="enum">
0N/A <constant id="JVMTI_KIND_IN" num="91">
0N/A Ingoing argument - <code>foo</code>.
0N/A </constant>
0N/A <constant id="JVMTI_KIND_IN_PTR" num="92">
0N/A Ingoing pointer argument - <code>const foo*</code>.
0N/A </constant>
0N/A <constant id="JVMTI_KIND_IN_BUF" num="93">
0N/A Ingoing array argument - <code>const foo*</code>.
0N/A </constant>
0N/A <constant id="JVMTI_KIND_ALLOC_BUF" num="94">
0N/A Outgoing allocated array argument - <code>foo**</code>.
0N/A Free with <code>Deallocate</code>.
0N/A </constant>
0N/A <constant id="JVMTI_KIND_ALLOC_ALLOC_BUF" num="95">
0N/A Outgoing allocated array of allocated arrays argument - <code>foo***</code>.
0N/A Free with <code>Deallocate</code>.
0N/A </constant>
0N/A <constant id="JVMTI_KIND_OUT" num="96">
0N/A Outgoing argument - <code>foo*</code>.
0N/A </constant>
0N/A <constant id="JVMTI_KIND_OUT_BUF" num="97">
0N/A Outgoing array argument (pre-allocated by agent) - <code>foo*</code>.
0N/A Do not <code>Deallocate</code>.
0N/A </constant>
0N/A </constants>
0N/A
0N/A </intro>
0N/A
0N/A <typedef id="jvmtiParamInfo" label="Extension Function/Event Parameter Info">
0N/A <field id="name">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The parameter name, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string
0N/A </description>
0N/A </field>
0N/A <field id="kind">
0N/A <enum>jvmtiParamKind</enum>
0N/A <description>
0N/A The kind of the parameter - type modifiers
0N/A </description>
0N/A </field>
0N/A <field id="base_type">
0N/A <enum>jvmtiParamTypes</enum>
0N/A <description>
0N/A The base type of the parameter - modified by <code>kind</code>
0N/A </description>
0N/A </field>
0N/A <field id="null_ok">
0N/A <jboolean/>
0N/A <description>
0N/A Is a <code>NULL</code> argument permitted? Applies only to pointer and object types.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <callback id="jvmtiExtensionFunction">
0N/A <enum>jvmtiError</enum>
0N/A <synopsis>Extension Function</synopsis>
0N/A <description>
0N/A This is the implementation-specific extension function.
0N/A </description>
0N/A <parameters>
0N/A <param id="jvmti_env">
0N/A <outptr>
0N/A <struct>jvmtiEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The <jvmti/> environment is the only fixed parameter for extension functions.
0N/A </description>
0N/A </param>
0N/A <param id="...">
0N/A <varargs/>
0N/A <description>
0N/A The extension function-specific parameters
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <function id="GetExtensionFunctions" phase="onload" num="124">
0N/A <synopsis>Get Extension Functions</synopsis>
0N/A
0N/A <typedef id="jvmtiExtensionFunctionInfo" label="Extension Function Info">
0N/A <field id="func">
0N/A <ptrtype>
0N/A <struct>jvmtiExtensionFunction</struct>
0N/A </ptrtype>
0N/A <description>
0N/A The actual function to call
0N/A </description>
0N/A </field>
0N/A <field id="id">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The identifier for the extension function, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A Uses package name conventions.
0N/A For example, <code>com.sun.hotspot.bar</code>
0N/A </description>
0N/A </field>
0N/A <field id="short_description">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A A one sentence description of the function, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </field>
0N/A <field id="param_count">
0N/A <jint/>
0N/A <description>
0N/A The number of parameters excluding <code>jvmtiEnv *jvmti_env</code>
0N/A </description>
0N/A </field>
0N/A <field id="params">
0N/A <allocfieldbuf outcount="param_count">
0N/A <struct>jvmtiParamInfo</struct>
0N/A </allocfieldbuf>
0N/A <description>
0N/A Array of
0N/A <fieldlink id="param_count" struct="jvmtiExtensionFunctionInfo"></fieldlink>
0N/A parameters (<code>jvmtiEnv *jvmti_env</code> excluded)
0N/A </description>
0N/A </field>
0N/A <field id="error_count">
0N/A <jint/>
0N/A <description>
0N/A The number of possible error returns (excluding universal errors)
0N/A </description>
0N/A </field>
0N/A <field id="errors">
0N/A <allocfieldbuf outcount="error_count">
0N/A <enum>jvmtiError</enum>
0N/A </allocfieldbuf>
0N/A <description>
0N/A Array of <fieldlink id="error_count" struct="jvmtiExtensionFunctionInfo"></fieldlink>
0N/A possible errors
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <description>
0N/A Returns the set of extension functions.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="extension_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of extension functions
0N/A </description>
0N/A </param>
0N/A <param id="extensions">
0N/A <allocbuf outcount="extension_count_ptr"><struct>jvmtiExtensionFunctionInfo</struct></allocbuf>
0N/A <description>
0N/A Returns an array of extension function info, one per function
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetExtensionEvents" phase="onload" num="125">
0N/A <synopsis>Get Extension Events</synopsis>
0N/A
0N/A <typedef id="jvmtiExtensionEventInfo" label="Extension Event Info">
0N/A <field id="extension_event_index">
0N/A <jint/>
0N/A <description>
0N/A The identifying index of the event
0N/A </description>
0N/A </field>
0N/A <field id="id">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A The identifier for the extension event, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A Uses package name conventions.
0N/A For example, <code>com.sun.hotspot.bar</code>
0N/A </description>
0N/A </field>
0N/A <field id="short_description">
0N/A <allocfieldbuf><char/></allocfieldbuf>
0N/A <description>
0N/A A one sentence description of the event, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </field>
0N/A <field id="param_count">
0N/A <jint/>
0N/A <description>
0N/A The number of parameters excluding <code>jvmtiEnv *jvmti_env</code>
0N/A </description>
0N/A </field>
0N/A <field id="params">
0N/A <allocfieldbuf outcount="param_count">
0N/A <struct>jvmtiParamInfo</struct>
0N/A </allocfieldbuf>
0N/A <description>
0N/A Array of
0N/A <fieldlink id="param_count" struct="jvmtiExtensionEventInfo"></fieldlink>
0N/A parameters (<code>jvmtiEnv *jvmti_env</code> excluded)
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <description>
0N/A Returns the set of extension events.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="extension_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of extension events
0N/A </description>
0N/A </param>
0N/A <param id="extensions">
0N/A <allocbuf outcount="extension_count_ptr"><struct>jvmtiExtensionEventInfo</struct></allocbuf>
0N/A <description>
0N/A Returns an array of extension event info, one per event
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <callback id="jvmtiExtensionEvent">
0N/A <void/>
0N/A <synopsis>Extension Event</synopsis>
0N/A <description>
0N/A This is the implementation-specific event.
0N/A The event handler is set with
0N/A <functionlink id="SetExtensionEventCallback"/>.
0N/A <p/>
0N/A Event handlers for extension events must be declared varargs to match this definition.
0N/A Failure to do so could result in calling convention mismatch and undefined behavior
0N/A on some platforms.
0N/A <p/>
0N/A For example, if the <code>jvmtiParamInfo</code>
0N/A returned by <functionlink id="GetExtensionEvents"/> indicates that
0N/A there is a <code>jint</code> parameter, the event handler should be
0N/A declared:
0N/A<example>
0N/A void JNICALL myHandler(jvmtiEnv* jvmti_env, jint myInt, ...)
0N/A</example>
0N/A Note the terminal "<code>...</code>" which indicates varargs.
0N/A </description>
0N/A <parameters>
0N/A <param id="jvmti_env">
0N/A <outptr>
0N/A <struct>jvmtiEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The <jvmti/> environment is the only fixed parameter for extension events.
0N/A </description>
0N/A </param>
0N/A <param id="...">
0N/A <varargs/>
0N/A <description>
0N/A The extension event-specific parameters
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </callback>
0N/A
0N/A <function id="SetExtensionEventCallback" phase="onload" num="126">
0N/A <synopsis>Set Extension Event Callback</synopsis>
0N/A
0N/A <description>
0N/A Sets the callback function for an extension event and
0N/A enables the event. Or, if the callback is <code>NULL</code>, disables
0N/A the event. Note that unlike standard events, setting
0N/A the callback and enabling the event are a single operation.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="extension_event_index">
0N/A <jint/>
0N/A <description>
0N/A Identifies which callback to set.
0N/A This index is the
0N/A <fieldlink id="extension_event_index" struct="jvmtiExtensionEventInfo"></fieldlink>
0N/A field of
0N/A <datalink id="jvmtiExtensionEventInfo"/>.
0N/A </description>
0N/A </param>
0N/A <param id="callback">
0N/A <ptrtype>
0N/A <struct>jvmtiExtensionEvent</struct>
0N/A <nullok>disable the event</nullok>
0N/A </ptrtype>
0N/A <description>
0N/A If <code>callback</code> is non-<code>NULL</code>,
0N/A set <code>callback</code> to be the event callback function
0N/A and enable the event.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A <paramlink id="extension_event_index"/> is not an
0N/A <fieldlink id="extension_event_index"
0N/A struct="jvmtiExtensionEventInfo"/>
0N/A returned by
0N/A <functionlink id="GetExtensionEvents"/>
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="capability" label="Capability">
0N/A
0N/A <intro>
0N/A The capabilities functions allow you to change the
0N/A functionality available to <jvmti/>--that is,
0N/A which <jvmti/>
0N/A functions can be called, what events can be generated,
0N/A and what functionality these events and functions can
0N/A provide.
0N/A <p/>
0N/A The "Capabilities" section of each function and event describe which
0N/A capabilities, if any, they are associated with. "Required Functionality"
0N/A means it is available for use and no capabilities must be added to use it.
0N/A "Optional Functionality" means the agent must possess the capability
0N/A before it can be used.
0N/A To possess a capability, the agent must
0N/A <functionlink id="AddCapabilities">add the capability</functionlink>.
0N/A "Optional Features" describe capabilities which,
0N/A if added, extend the feature set.
0N/A <p/>
0N/A The potentially available capabilities of each <jvmti/> implementation are different.
0N/A Depending on the implementation, a capability:
0N/A <ul>
0N/A <li>may never be added</li>
0N/A <li>may be added in either the <code>OnLoad</code> or live phase in any environment</li>
0N/A <li>may be added only during the <code>OnLoad</code> phase</li>
0N/A <li>may be possessed by only one environment at a time</li>
0N/A <li>may be possessed by only one environment at a time,
0N/A and only during the <code>OnLoad</code> phase</li>
0N/A <li>and so on ...</li>
0N/A </ul>
0N/A Frequently, the addition of a capability may incur a cost in execution speed, start up
0N/A time, and/or memory footprint. Note that the overhead of using a capability
0N/A is completely different than the overhead of possessing a capability.
0N/A Take single stepping as an example. When single stepping is on (that
0N/A is, when the event is enabled and thus actively sending events)
0N/A the overhead of sending and processing an event
0N/A on each instruction is huge in any implementation.
0N/A However, the overhead of possessing the capability may be small or large,
0N/A depending on the implementation. Also, when and if a capability is potentially
0N/A available depends on the implementation. Some examples:
0N/A <ul>
0N/A <li>One VM might perform all execution by compiling bytecodes into
0N/A native code and be unable to generate single step instructions.
0N/A In this implementation the capability can not be added.</li>
0N/A <li>Another VM may be able to switch execution to a single stepping
0N/A interpreter at any time. In this implementation, having the capability has no
0N/A overhead and could be added at any time.</li>
0N/A <li>Yet another VM might be able to choose a bytecode compiling or single stepping capable interpreted
0N/A execution engine at start up, but be unable to switch between them.
0N/A In this implementation the capability would need to be added
0N/A during the <code>OnLoad</code> phase (before bytecode
0N/A execution begins) and would have a large impact on execution speed
0N/A even if single stepping was never used.</li>
0N/A <li>Still another VM might be able to add an "is single stepping on" check
0N/A into compiled bytecodes or a generated interpreter. Again in this implementation
0N/A the capability would need to be added during the <code>OnLoad</code> phase but the overhead (a test
0N/A and branch on each instruction) would be considerably less.</li>
0N/A </ul>
0N/A <p/>
0N/A Each <jvmti/> <internallink id="environments">environment</internallink>
0N/A has its own set of capabilities.
0N/A Initially, that set is empty.
0N/A Any desired capability must be added.
0N/A If possible, capabilities should be added during the <code>OnLoad</code> phase. For most
0N/A virtual machines certain capabilities require special set up for
0N/A the virtual machine and this set up must happen
0N/A during the <code>OnLoad</code> phase, before the virtual machine begins execution.
0N/A Once a capability is added, it can
0N/A only be removed if explicitly relinquished by the environment.
0N/A <p/>
0N/A The agent can,
0N/A <functionlink id="GetPotentialCapabilities">determine what
0N/A capabilities this VM can potentially provide</functionlink>,
0N/A <functionlink id="AddCapabilities">add the capabilities
0N/A to be used</functionlink>,
0N/A <functionlink id="RelinquishCapabilities">release capabilities
0N/A which are no longer needed</functionlink>, and
0N/A <functionlink id="GetCapabilities">examine the currently available
0N/A capabilities</functionlink>.
0N/A </intro>
0N/A
0N/A <intro id="capabilityExamples" label="Capability Examples">
0N/A For example, a freshly started agent (in the <code>OnLoad</code> function)
0N/A wants to enable all possible capabilities.
0N/A Note that, in general, this is not advisable as the agent may suffer
0N/A a performance penalty for functionality it is not using.
0N/A The code might look like this in C:
0N/A <example>
0N/A jvmtiCapabilities capa;
0N/A jvmtiError err;
0N/A
0N/A err = (*jvmti)-&gt;GetPotentialCapabilities(jvmti, &amp;capa);
0N/A if (err == JVMTI_ERROR_NONE) {
0N/A err = (*jvmti)-&gt;AddCapabilities(jvmti, &amp;capa);
0N/A </example>
0N/A For example, if an agent wants to check if it can get
0N/A the bytecodes of a method (that is, it wants to check
0N/A if it previously added this capability and has not
0N/A relinquished it), the code might
0N/A look like this in C:
0N/A <example>
0N/A jvmtiCapabilities capa;
0N/A jvmtiError err;
0N/A
0N/A err = (*jvmti)-&gt;GetCapabilities(jvmti, &amp;capa);
0N/A if (err == JVMTI_ERROR_NONE) {
0N/A if (capa.can_get_bytecodes) { ... } }
0N/A </example>
0N/A </intro>
0N/A
0N/A <capabilitiestypedef id="jvmtiCapabilities" label="The Capabilities Structure">
0N/A <description>
0N/A The functions in this category use this capabilities structure
0N/A which contains boolean flags corresponding to each capability:
0N/A </description>
0N/A <capabilityfield id="can_tag_objects">
0N/A <description>
0N/A Can set and get tags, as described in the
0N/A <internallink id="Heap">Heap category</internallink>.
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_field_modification_events">
0N/A <description>
0N/A Can set watchpoints on field modification -
0N/A <functionlink id="SetFieldModificationWatch"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_field_access_events">
0N/A <description>
0N/A Can set watchpoints on field access -
0N/A <functionlink id="SetFieldAccessWatch"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_bytecodes">
0N/A <description>
0N/A Can get bytecodes of a method <functionlink id="GetBytecodes"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_synthetic_attribute">
0N/A <description>
0N/A Can test if a field or method is synthetic -
0N/A <functionlink id="IsFieldSynthetic"></functionlink> and
0N/A <functionlink id="IsMethodSynthetic"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_owned_monitor_info">
0N/A <description>
0N/A Can get information about ownership of monitors -
0N/A <functionlink id="GetOwnedMonitorInfo"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_current_contended_monitor">
0N/A <description>
0N/A Can <functionlink id="GetCurrentContendedMonitor"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_monitor_info">
0N/A <description>
0N/A Can <functionlink id="GetObjectMonitorUsage"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_pop_frame">
0N/A <description>
0N/A Can pop frames off the stack - <functionlink id="PopFrame"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_redefine_classes">
0N/A <description>
0N/A Can redefine classes with <functionlink id="RedefineClasses"/>.
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_signal_thread">
0N/A <description>
0N/A Can send stop or interrupt to threads
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_source_file_name">
0N/A <description>
0N/A Can get the source file name of a class
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_line_numbers">
0N/A <description>
0N/A Can get the line number table of a method
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_source_debug_extension">
0N/A <description>
0N/A Can get the source debug extension of a class
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_access_local_variables">
0N/A <description>
0N/A Can set and get local variables
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_maintain_original_method_order">
0N/A <description>
0N/A Can return methods in the order they occur in the class file
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_single_step_events">
0N/A <description>
0N/A Can get <eventlink id="SingleStep">single step</eventlink> events
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_exception_events">
0N/A <description>
0N/A Can get <eventlink id="Exception">exception thrown</eventlink> and
0N/A <eventlink id="ExceptionCatch">exception catch</eventlink> events
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_frame_pop_events">
0N/A <description>
0N/A Can <functionlink id="NotifyFramePop">set</functionlink> and thus get
0N/A <eventlink id="FramePop"></eventlink> events
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_breakpoint_events">
0N/A <description>
0N/A Can <functionlink id="SetBreakpoint">set</functionlink> and thus get
0N/A <eventlink id="Breakpoint"></eventlink> events
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_suspend">
0N/A <description>
0N/A Can suspend and resume threads
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_redefine_any_class">
0N/A <description>
0N/A Can modify (retransform or redefine) any non-primitive non-array class.
0N/A See <functionlink id="IsModifiableClass"/>.
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_current_thread_cpu_time">
0N/A <description>
0N/A Can <functionlink id="GetCurrentThreadCpuTime">get</functionlink>
0N/A current thread CPU time
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_thread_cpu_time">
0N/A <description>
0N/A Can <functionlink id="GetThreadCpuTime">get</functionlink>
0N/A thread CPU time
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_method_entry_events"
0N/A disp1="can_generate" disp2="_method_entry_events"
0N/A >
0N/A <description>
0N/A Can generate method entry events on entering a method
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_method_exit_events"
0N/A disp1="can_generate" disp2="_method_exit_events"
0N/A >
0N/A <description>
0N/A Can generate method exit events on leaving a method
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_all_class_hook_events"
0N/A disp1="can_generate" disp2="_all_class_hook_events"
0N/A >
0N/A <description>
0N/A Can generate ClassFileLoadHook events for every loaded class.
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_compiled_method_load_events"
0N/A disp1="can_generate" disp2="_compiled_method_load_events"
0N/A >
0N/A <description>
0N/A Can generate events when a method is compiled or unloaded
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_monitor_events"
0N/A disp1="can_generate" disp2="_monitor_events"
0N/A >
0N/A <description>
0N/A Can generate events on monitor activity
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_vm_object_alloc_events"
0N/A disp1="can_generate" disp2="_vm_object_alloc_events"
0N/A >
0N/A <description>
0N/A Can generate events on VM allocation of an object
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_native_method_bind_events"
0N/A disp1="can_generate" disp2="_native_method_bind_events"
0N/A >
0N/A <description>
0N/A Can generate events when a native method is bound to its
0N/A implementation
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_garbage_collection_events"
0N/A disp1="can_generate" disp2="_garbage_collection_events"
0N/A >
0N/A <description>
0N/A Can generate events when garbage collection begins or ends
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_object_free_events"
0N/A disp1="can_generate" disp2="_object_free_events"
0N/A >
0N/A <description>
0N/A Can generate events when the garbage collector frees an object
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_force_early_return" since="1.1">
0N/A <description>
0N/A Can return early from a method, as described in the
0N/A <internallink id="ForceEarlyReturn">Force Early Return category</internallink>.
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_owned_monitor_stack_depth_info" since="1.1">
0N/A <description>
0N/A Can get information about owned monitors with stack depth -
0N/A <functionlink id="GetOwnedMonitorStackDepthInfo"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_get_constant_pool" since="1.1">
0N/A <description>
0N/A Can get the constant pool of a class -
0N/A <functionlink id="GetConstantPool"></functionlink>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_set_native_method_prefix" since="1.1">
0N/A <description>
0N/A Can set prefix to be applied when native method cannot be resolved -
0N/A <functionlink id="SetNativeMethodPrefix"/> and
0N/A <functionlink id="SetNativeMethodPrefixes"/>
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_retransform_classes" since="1.1">
0N/A <description>
0N/A Can retransform classes with <functionlink id="RetransformClasses"/>.
0N/A In addition to the restrictions imposed by the specific
0N/A implementation on this capability (see the
0N/A <internallink id="capability">Capability</internallink> section),
0N/A this capability must be set before the
0N/A <eventlink id="ClassFileLoadHook"/> event is enabled for the
0N/A first time in this environment.
0N/A An environment that possesses this capability at the time that
0N/A <code>ClassFileLoadHook</code> is enabled for the first time is
0N/A said to be <i>retransformation capable</i>.
0N/A An environment that does not possess this capability at the time that
0N/A <code>ClassFileLoadHook</code> is enabled for the first time is
0N/A said to be <i>retransformation incapable</i>.
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_retransform_any_class" since="1.1">
0N/A <description>
0N/A <functionlink id="RetransformClasses"/> can be called on any class
0N/A (<fieldlink id="can_retransform_classes" struct="jvmtiCapabilities"/>
0N/A must also be set)
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_resource_exhaustion_heap_events" since="1.1">
0N/A <description>
0N/A Can generate events when the VM is unable to allocate memory from
0N/A the <tm>Java</tm> platform heap.
0N/A See <eventlink id="ResourceExhausted"/>.
0N/A </description>
0N/A </capabilityfield>
0N/A <capabilityfield id="can_generate_resource_exhaustion_threads_events" since="1.1">
0N/A <description>
0N/A Can generate events when the VM is unable to create a thread.
0N/A See <eventlink id="ResourceExhausted"/>.
0N/A </description>
0N/A </capabilityfield>
0N/A </capabilitiestypedef>
0N/A
0N/A <function id="GetPotentialCapabilities" jkernel="yes" phase="onload" num="140">
0N/A <synopsis>Get Potential Capabilities</synopsis>
0N/A <description>
0N/A Returns via <paramlink id="capabilities_ptr"></paramlink> the <jvmti/>
0N/A features that can potentially be possessed by this environment
0N/A at this time.
0N/A The returned capabilities differ from the complete set of capabilities
0N/A implemented by the VM in two cases: another environment possesses
0N/A capabilities that can only be possessed by one environment, or the
0N/A current <functionlink id="GetPhase">phase</functionlink> is live,
0N/A and certain capabilities can only be added during the <code>OnLoad</code> phase.
0N/A The <functionlink id="AddCapabilities"></functionlink> function
0N/A may be used to set any or all or these capabilities.
0N/A Currently possessed capabilities are included.
0N/A <p/>
0N/A Typically this function is used in the <code>OnLoad</code> function.
0N/A Some virtual machines may allow a limited set of capabilities to be
0N/A added in the live phase.
0N/A In this case, the set of potentially available capabilities
0N/A will likely differ from the <code>OnLoad</code> phase set.
0N/A <p/>
0N/A See the
0N/A <internallink id="capabilityExamples">Capability Examples</internallink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="capabilities_ptr">
0N/A <outptr><struct>jvmtiCapabilities</struct></outptr>
0N/A <description>
0N/A On return, points to the <jvmti/> capabilities that may be added.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <elide>
0N/A <function id="EstimateCostOfCapabilities" phase="onload" num="141">
0N/A <synopsis>Estimate Cost Of Capabilities</synopsis>
0N/A <description>
0N/A <issue>There is strong opposition to this function. The concern is
0N/A that it would be difficult or impossible to provide meaningful
0N/A numbers, as the amount of impact is conditional on many factors
0N/A that a single number could not represent. There is doubt that
0N/A conditional implementations would be used or are even a good idea.
0N/A The thought is that release documentation for the implementation
0N/A would be the best means of exposing this information.
0N/A Unless new arguments are presented, I intend to remove this
0N/A function in the next revision.
0N/A </issue>
0N/A <p/>
0N/A Return via the <paramlink id="time_impact_ptr"></paramlink> and
0N/A <paramlink id="space_impact_ptr"></paramlink> an estimate of the impact
0N/A of adding the capabilities pointed to by
0N/A <paramlink id="capabilities_ptr"></paramlink>.
0N/A The returned estimates are in percentage of additional overhead, thus
0N/A a time impact of 100 mean the application might run
0N/A at half the speed.
0N/A The estimates are very rough approximations and are not guaranteed.
0N/A Note also, that the estimates are of the impact of having the
0N/A capability available--when and if it is used the impact may be
0N/A much greater.
0N/A Estimates can be for a single capability or for a set of
0N/A capabilities. Note that the costs are not necessarily additive,
0N/A adding support for one capability might make another available
0N/A for free or conversely having two capabilities at once may
0N/A have multiplicative impact.
0N/A Estimates are relative to the current set of capabilities -
0N/A that is, how much more impact given the currently possessed capabilities.
0N/A <p/>
0N/A Typically this function is used in the OnLoad function,
0N/A some virtual machines may allow a limited set of capabilities to be
0N/A added in the live phase.
0N/A In this case, the set of potentially available capabilities
0N/A will likely differ from the OnLoad phase set.
0N/A <p/>
0N/A See the
0N/A <internallink id="capabilityExamples">Capability Examples</internallink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="capabilities_ptr">
0N/A <inptr><struct>jvmtiCapabilities</struct></inptr>
0N/A <description>
0N/A points to the <jvmti/> capabilities to evaluate.
0N/A </description>
0N/A </param>
0N/A <param id="time_impact_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the estimated percentage increase in
0N/A run time if this capability was added.
0N/A </description>
0N/A </param>
0N/A <param id="space_impact_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the estimated percentage increase in
0N/A memory space used if this capability was added.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_AVAILABLE">
0N/A The desired capabilities are not even potentially available.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A </elide>
0N/A
0N/A <function id="AddCapabilities" jkernel="yes" phase="onload" num="142">
0N/A <synopsis>Add Capabilities</synopsis>
0N/A <description>
0N/A Set new capabilities by adding the capabilities
0N/A whose values are set to one (<code>1</code>) in
0N/A <code>*</code><paramlink id="capabilities_ptr"></paramlink>.
0N/A All previous capabilities are retained.
0N/A Typically this function is used in the <code>OnLoad</code> function.
0N/A Some virtual machines may allow a limited set of capabilities to be
0N/A added in the live phase.
0N/A <p/>
0N/A See the
0N/A <internallink id="capabilityExamples">Capability Examples</internallink>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="capabilities_ptr">
0N/A <inptr><struct>jvmtiCapabilities</struct></inptr>
0N/A <description>
0N/A Points to the <jvmti/> capabilities to add.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_AVAILABLE">
0N/A The desired capabilities are not even potentially available.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A
0N/A <function id="RelinquishCapabilities" phase="onload" num="143">
0N/A <synopsis>Relinquish Capabilities</synopsis>
0N/A <description>
0N/A Relinquish the capabilities
0N/A whose values are set to one (<code>1</code>) in
0N/A <code>*</code><paramlink id="capabilities_ptr"></paramlink>.
0N/A Some implementations may allow only one environment to have a capability
0N/A (see the <internallink id="capability">capability introduction</internallink>).
0N/A This function releases capabilities
0N/A so that they may be used by other agents.
0N/A All other capabilities are retained.
0N/A The capability will no longer be present in <functionlink id="GetCapabilities"></functionlink>.
0N/A Attempting to relinquish a capability that the agent does not possess is not an error.
0N/A <issue>
0N/A It is possible for the agent to be actively using capabilities
0N/A which are being relinquished. For example, a thread is currently
0N/A suspended and can_suspend is being relinquished or an event is currently
0N/A enabled and can_generate_whatever is being relinquished.
0N/A There are three possible ways we could spec this:
0N/A <ul>
0N/A <li>relinquish automatically releases them</li>
0N/A <li>relinquish checks and returns some error code if held</li>
0N/A <li>it is the agent's responsibility and it is not checked</li>
0N/A </ul>
0N/A One of these should be chosen.
0N/A </issue>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="capabilities_ptr">
0N/A <inptr><struct>jvmtiCapabilities</struct></inptr>
0N/A <description>
0N/A Points to the <jvmti/> capabilities to relinquish.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A
0N/A
0N/A <function id="GetCapabilities" jkernel="yes" phase="any" num="89">
0N/A <synopsis>Get Capabilities</synopsis>
0N/A <description>
0N/A Returns via <paramlink id="capabilities_ptr"></paramlink> the optional <jvmti/>
0N/A features which this environment currently possesses.
0N/A Each possessed capability is indicated by a one (<code>1</code>) in the
0N/A corresponding field of the <internallink id="jvmtiCapabilities">capabilities
0N/A structure</internallink>.
0N/A An environment does not possess a capability unless it has been successfully added with
0N/A <functionlink id="AddCapabilities"/>.
0N/A An environment only loses possession of a capability if it has been relinquished with
0N/A <functionlink id="RelinquishCapabilities"/>. Thus, this function returns the net result
0N/A of the <code>AddCapabilities</code> and <code>RelinquishCapabilities</code> calls which
0N/A have been made.
0N/A <p/>
0N/A See the
0N/A <internallink id="capabilityExamples">Capability Examples</internallink>.
0N/A </description>
0N/A <origin>jvmdiClone</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="capabilities_ptr">
0N/A <outptr><struct>jvmtiCapabilities</struct></outptr>
0N/A <description>
0N/A On return, points to the <jvmti/> capabilities.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A
0N/A <category id="timers" label="Timers">
0N/A
0N/A <intro>
0N/A These functions provide timing information.
0N/A The resolution at which the time is updated is not specified.
0N/A They provides nanosecond precision, but not necessarily nanosecond accuracy.
0N/A Details about the timers, such as their maximum values, can be accessed with
0N/A the timer information functions.
0N/A </intro>
0N/A
0N/A <typedef id="jvmtiTimerInfo" label="Timer Info">
0N/A <description>
0N/A The information function for each timer returns this data structure.
0N/A </description>
0N/A <field id="max_value">
0N/A <jlong/>
0N/A <description>
0N/A The maximum value the timer can reach.
0N/A After this value is reached the timer wraps back to zero.
0N/A This is an unsigned value. If tested or printed as a jlong (signed value)
0N/A it may appear to be a negative number.
0N/A </description>
0N/A </field>
0N/A <field id="may_skip_forward">
0N/A <jboolean/>
0N/A <description>
0N/A If true, the timer can be externally adjusted and as a result skip forward.
0N/A If false, the timer value will never increase faster than real time.
0N/A </description>
0N/A </field>
0N/A <field id="may_skip_backward">
0N/A <jboolean/>
0N/A <description>
0N/A If true, the timer can be externally adjusted and as a result skip backward.
0N/A If false, the timer value will be monotonically increasing.
0N/A </description>
0N/A </field>
0N/A <field id="kind">
0N/A <enum>jvmtiTimerKind</enum>
0N/A <description>
0N/A The kind of timer.
0N/A On a platform that does not distinguish between user and system time, <datalink
0N/A id="JVMTI_TIMER_TOTAL_CPU"><code>JVMTI_TIMER_TOTAL_CPU</code></datalink>
0N/A is returned.
0N/A </description>
0N/A </field>
0N/A <field id="reserved1">
0N/A <jlong/>
0N/A <description>
0N/A Reserved for future use.
0N/A </description>
0N/A </field>
0N/A <field id="reserved2">
0N/A <jlong/>
0N/A <description>
0N/A Reserved for future use.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A
0N/A <intro>
0N/A Where the timer kind is --
0N/A
0N/A <constants id="jvmtiTimerKind" label="Timer Kinds" kind="enum">
0N/A <constant id="JVMTI_TIMER_USER_CPU" num="30">
0N/A CPU time that a thread is in user mode.
0N/A </constant>
0N/A <constant id="JVMTI_TIMER_TOTAL_CPU" num="31">
0N/A CPU time that a thread is in user or system mode.
0N/A </constant>
0N/A <constant id="JVMTI_TIMER_ELAPSED" num="32">
0N/A Elapsed time.
0N/A </constant>
0N/A </constants>
0N/A </intro>
0N/A
0N/A <function id="GetCurrentThreadCpuTimerInfo" callbacksafe="safe" impl="innative notrace" phase="start" num="134">
0N/A <synopsis>Get Current Thread CPU Timer Information</synopsis>
0N/A <description>
0N/A Get information about the
0N/A <functionlink id="GetCurrentThreadCpuTime"/> timer.
0N/A The fields of the <datalink id="jvmtiTimerInfo"/> structure
0N/A are filled in with details about the timer.
0N/A This information is specific to the platform and the implementation of
0N/A <functionlink id="GetCurrentThreadCpuTime"/> and thus
0N/A does not vary by thread nor does it vary
0N/A during a particular invocation of the VM.
0N/A <p/>
0N/A Note that the implementations of <functionlink id="GetCurrentThreadCpuTime"/>
0N/A and <functionlink id="GetThreadCpuTime"/> may differ, and thus the values
0N/A returned by <code>GetCurrentThreadCpuTimerInfo</code>
0N/A and <functionlink id="GetThreadCpuTimerInfo"/>
0N/A may differ -- see <functionlink id="GetCurrentThreadCpuTime"/> for more information.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_current_thread_cpu_time">
0N/A Can get current thread CPU time.
0N/A </required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="info_ptr">
0N/A <outptr><struct>jvmtiTimerInfo</struct></outptr>
0N/A <description>
0N/A On return, filled with information describing the time
0N/A returned by <functionlink id="GetCurrentThreadCpuTime"/>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetCurrentThreadCpuTime" callbacksafe="safe" impl="innative notrace" phase="start" num="135">
0N/A <synopsis>Get Current Thread CPU Time</synopsis>
0N/A <description>
0N/A Return the CPU time utilized by the current thread.
0N/A <p/>
0N/A Note that the <functionlink id="GetThreadCpuTime"/>
0N/A function provides CPU time for any thread, including
0N/A the current thread. <code>GetCurrentThreadCpuTime</code>
0N/A exists to support platforms which cannot
0N/A supply CPU time for threads other than the current
0N/A thread or which have more accurate information for
0N/A the current thread (see
0N/A <functionlink id="GetCurrentThreadCpuTimerInfo"/> vs
0N/A <functionlink id="GetThreadCpuTimerInfo"/>).
0N/A On many platforms this call will be equivalent to:
0N/A<example>
0N/A GetThreadCpuTime(env, NULL, nanos_ptr)
0N/A</example>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_current_thread_cpu_time">
0N/A Can get current thread CPU time.
0N/A <p/>
0N/A If this capability is enabled after threads have started,
0N/A the implementation may choose any time up
0N/A to and including the time that the capability is enabled
0N/A as the point where CPU time collection starts.
0N/A <p/>
0N/A This capability must be potentially available on any
0N/A platform where
0N/A <internallink id="jvmtiCapabilities.can_get_thread_cpu_time"><code>can_get_thread_cpu_time</code></internallink>
0N/A is potentially available.
0N/A </required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="nanos_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A On return, points to the CPU time used by this thread
0N/A in nanoseconds.
0N/A This is an unsigned value. If tested or printed as a jlong (signed value)
0N/A it may appear to be a negative number.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetThreadCpuTimerInfo" num="136">
0N/A <synopsis>Get Thread CPU Timer Information</synopsis>
0N/A <description>
0N/A Get information about the
0N/A <functionlink id="GetThreadCpuTime"/> timer.
0N/A The fields of the <datalink id="jvmtiTimerInfo"/> structure
0N/A are filled in with details about the timer.
0N/A This information is specific to the platform and the implementation of
0N/A <functionlink id="GetThreadCpuTime"/> and thus
0N/A does not vary by thread nor does it vary
0N/A during a particular invocation of the VM.
0N/A <p/>
0N/A Note that the implementations of <functionlink id="GetCurrentThreadCpuTime"/>
0N/A and <functionlink id="GetThreadCpuTime"/> may differ, and thus the values
0N/A returned by <functionlink id="GetCurrentThreadCpuTimerInfo"/>
0N/A and <code>GetThreadCpuTimerInfo</code>
0N/A may differ -- see <functionlink id="GetCurrentThreadCpuTime"/> for more information.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_thread_cpu_time">
0N/A Can get thread CPU time.
0N/A </required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="info_ptr">
0N/A <outptr><struct>jvmtiTimerInfo</struct></outptr>
0N/A <description>
0N/A On return, filled with information describing the time
0N/A returned by <functionlink id="GetThreadCpuTime"/>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetThreadCpuTime" num="137">
0N/A <synopsis>Get Thread CPU Time</synopsis>
0N/A <description>
0N/A Return the CPU time utilized by the specified thread.
0N/A <p/>
0N/A Get information about this timer with
0N/A <functionlink id="GetThreadCpuTimerInfo"/>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_get_thread_cpu_time">
0N/A Can get thread CPU time.
0N/A <p/>
0N/A If this capability is enabled after threads have started,
0N/A the implementation may choose any time up
0N/A to and including the time that the capability is enabled
0N/A as the point where CPU time collection starts.
0N/A </required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="thread">
0N/A <jthread null="current"/>
0N/A <description>
0N/A The thread to query.
0N/A </description>
0N/A </param>
0N/A <param id="nanos_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A On return, points to the CPU time used by the specified thread
0N/A in nanoseconds.
0N/A This is an unsigned value. If tested or printed as a jlong (signed value)
0N/A it may appear to be a negative number.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetTimerInfo" phase="any" callbacksafe="safe" num="138">
0N/A <synopsis>Get Timer Information</synopsis>
0N/A <description>
0N/A Get information about the
0N/A <functionlink id="GetTime"/> timer.
0N/A The fields of the <datalink id="jvmtiTimerInfo"/> structure
0N/A are filled in with details about the timer.
0N/A This information will not change during a particular invocation of the VM.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="info_ptr">
0N/A <outptr><struct>jvmtiTimerInfo</struct></outptr>
0N/A <description>
0N/A On return, filled with information describing the time
0N/A returned by <functionlink id="GetTime"/>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetTime" phase="any" callbacksafe="safe" num="139">
0N/A <synopsis>Get Time</synopsis>
0N/A <description>
0N/A Return the current value of the system timer, in nanoseconds.
0N/A <p/>
0N/A The value returned represents nanoseconds since some fixed but
0N/A arbitrary time (perhaps in the future, so values may be
0N/A negative). This function provides nanosecond precision, but not
0N/A necessarily nanosecond accuracy. No guarantees are made about
0N/A how frequently values change.
0N/A <p/>
0N/A Get information about this timer with
0N/A <functionlink id="GetTimerInfo"/>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="nanos_ptr">
0N/A <outptr><jlong/></outptr>
0N/A <description>
0N/A On return, points to the time in nanoseconds.
0N/A This is an unsigned value. If tested or printed as a jlong (signed value)
0N/A it may appear to be a negative number.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetAvailableProcessors" phase="any" num="144">
0N/A <synopsis>Get Available Processors</synopsis>
0N/A <description>
0N/A Returns the number of processors available to the Java virtual machine.
0N/A <p/>
0N/A This value may change during a particular invocation of the virtual machine.
0N/A Applications that are sensitive to the number of available processors should
0N/A therefore occasionally poll this property.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="processor_count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the maximum number of processors available to the
0N/A virtual machine; never smaller than one.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A
0N/A <category id="classLoaderSearch" label="Class Loader Search">
0N/A
0N/A <intro>
0N/A These functions allow the agent to add to the locations that a class loader searches for a class.
0N/A This is useful for installing instrumentation under the correct class loader.
0N/A </intro>
0N/A
0N/A <function id="AddToBootstrapClassLoaderSearch" jkernel="yes" phase="onload" num="149">
0N/A <synopsis>Add To Bootstrap Class Loader Search</synopsis>
0N/A <description>
0N/A This function can be used to cause instrumentation classes to be defined by the
2427N/A bootstrap class loader. See <vmspec chapter="5.3.1"/>.
0N/A After the bootstrap
0N/A class loader unsuccessfully searches for a class, the specified platform-dependent
0N/A search path <paramlink id="segment"/> will be searched as well. Only one segment may be specified in
0N/A the <paramlink id="segment"/>. This function may be called multiple times to add multiple segments,
0N/A the segments will be searched in the order that this function was called.
0N/A <p/>
0N/A In the <code>OnLoad</code> phase the function may be used to specify any platform-dependent
0N/A search path segment to be searched after the bootstrap class loader unsuccessfully searches
0N/A for a class. The segment is typically a directory or JAR file.
0N/A <p/>
0N/A In the live phase the <paramlink id="segment"/> may be used to specify any platform-dependent
0N/A path to a <externallink id="http://java.sun.com/javase/6/docs/guide/jar/jar.html">
0N/A JAR file</externallink>. The agent should take care that the JAR file does not
0N/A contain any classes or resources other than those to be defined by the bootstrap
0N/A class loader for the purposes of instrumentation.
0N/A <p/>
2427N/A <vmspec/> specifies that a subsequent attempt to resolve a symbolic
0N/A reference that the Java virtual machine has previously unsuccessfully attempted
0N/A to resolve always fails with the same error that was thrown as a result of the
0N/A initial resolution attempt. Consequently, if the JAR file contains an entry
0N/A that corresponds to a class for which the Java virtual machine has
0N/A unsuccessfully attempted to resolve a reference, then subsequent attempts to
0N/A resolve that reference will fail with the same error as the initial attempt.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="segment">
0N/A <inbuf><char/></inbuf>
0N/A <description>
0N/A The platform-dependent search path segment, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A <paramlink id="segment"/> is an invalid path. In the live phase, anything other than an
0N/A existing JAR file is an invalid path.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="AddToSystemClassLoaderSearch" jkernel="yes" phase="onload" num="151" since="1.1">
0N/A <synopsis>Add To System Class Loader Search</synopsis>
0N/A <description>
0N/A This function can be used to cause instrumentation classes to be
2427N/A defined by the system class loader. See <vmspec chapter="5.3.2"/>.
0N/A After the class loader unsuccessfully searches for a class, the specified platform-dependent search
0N/A path <paramlink id="segment"/> will be searched as well. Only one segment may be specified in the
0N/A <paramlink id="segment"/>. This function may be called multiple times to add multiple segments, the
0N/A segments will be searched in the order that this function was called.
0N/A <p/>
0N/A In the <code>OnLoad</code> phase the function may be used to specify any platform-dependent
0N/A search path segment to be searched after the system class loader unsuccessfully searches
0N/A for a class. The segment is typically a directory or JAR file.
0N/A <p/>
0N/A In the live phase the <paramlink id="segment"/> is a platform-dependent path to a <externallink
0N/A id="http://java.sun.com/javase/6/docs/guide/jar/jar.html">JAR file</externallink> to be
0N/A searched after the system class loader unsuccessfully searches for a class. The agent should
0N/A take care that the JAR file does not contain any classes or resources other than those to be
0N/A defined by the system class loader for the purposes of instrumentation.
0N/A <p/>
0N/A In the live phase the system class loader supports adding a JAR file to be searched if
0N/A the system class loader implements a method name <code>appendToClassPathForInstrumentation</code>
0N/A which takes a single parameter of type <code>java.lang.String</code>. The method is not required
0N/A to have <code>public</code> access.
0N/A <p/>
2427N/A <vmspec/> specifies that a subsequent attempt to resolve a symbolic
0N/A reference that the Java virtual machine has previously unsuccessfully attempted
0N/A to resolve always fails with the same error that was thrown as a result of the
0N/A initial resolution attempt. Consequently, if the JAR file contains an entry
0N/A that corresponds to a class for which the Java virtual machine has
0N/A unsuccessfully attempted to resolve a reference, then subsequent attempts to
0N/A resolve that reference will fail with the same error as the initial attempt.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="segment">
0N/A <inbuf><char/></inbuf>
0N/A <description>
0N/A The platform-dependent search path segment, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
0N/A <paramlink id="segment"/> is an invalid path. In the live phase, anything other than an
0N/A existing JAR file is an invalid path.
0N/A </error>
0N/A <error id="JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED">
0N/A Operation not supported by the system class loader.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A
0N/A <category id="props" label="System Properties">
0N/A
0N/A <intro>
0N/A These functions get and set system properties.
0N/A </intro>
0N/A
0N/A <function id="GetSystemProperties" phase="onload" num="130">
0N/A <synopsis>Get System Properties</synopsis>
0N/A <description>
0N/A The list of VM system property keys which may be used with
0N/A <functionlink id="GetSystemProperty"/> is returned.
0N/A It is strongly recommended that virtual machines provide the
0N/A following property keys:
0N/A <ul>
0N/A <li><code>java.vm.vendor</code></li>
0N/A <li><code>java.vm.version</code></li>
0N/A <li><code>java.vm.name</code></li>
0N/A <li><code>java.vm.info</code></li>
0N/A <li><code>java.library.path</code></li>
0N/A <li><code>java.class.path</code></li>
0N/A </ul>
0N/A Provides access to system properties defined by and used
0N/A by the VM.
0N/A Properties set on the command-line are included.
0N/A This allows getting and setting of these properties
0N/A before the VM even begins executing bytecodes.
0N/A Since this is a VM view of system properties, the set of available
0N/A properties will usually be different than that
0N/A in <code>java.lang.System.getProperties</code>.
0N/A JNI method invocation may be used to access
0N/A <code>java.lang.System.getProperties</code>.
0N/A <p/>
0N/A The set of properties may grow during execution.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="count_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the number of property keys returned.
0N/A </description>
0N/A </param>
0N/A <param id="property_ptr">
0N/A <allocallocbuf outcount="count_ptr"><char/></allocallocbuf>
0N/A <description>
0N/A On return, points to an array of property keys, encoded as
0N/A <internallink id="mUTF">modified UTF-8</internallink> strings.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetSystemProperty" phase="onload" num="131">
0N/A <synopsis>Get System Property</synopsis>
0N/A <description>
0N/A Return a VM system property value given the property key.
0N/A <p/>
0N/A The function <functionlink id="GetSystemProperties"/>
0N/A returns the set of property keys which may be used.
0N/A The properties which can be retrieved may grow during
0N/A execution.
0N/A <p/>
0N/A Since this is a VM view of system properties, the values
0N/A of properties may differ from that returned by
0N/A <code>java.lang.System.getProperty(String)</code>.
0N/A A typical VM might copy the values of the VM system
0N/A properties into the <code>Properties</code> held by
0N/A <code>java.lang.System</code> during the initialization
0N/A of that class. Thereafter any changes to the VM system
0N/A properties (with <functionlink id="SetSystemProperty"/>)
0N/A or the <code>java.lang.System</code> system properties
0N/A (with <code>java.lang.System.setProperty(String,String)</code>)
0N/A would cause the values to diverge.
0N/A JNI method invocation may be used to access
0N/A <code>java.lang.System.getProperty(String)</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="property">
0N/A <inbuf><char/></inbuf>
0N/A <description>
0N/A The key of the property to retrieve, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A <param id="value_ptr">
0N/A <allocbuf><char/></allocbuf>
0N/A <description>
0N/A On return, points to the property value, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_AVAILABLE">
0N/A This property is not available.
0N/A Use <functionlink id="GetSystemProperties"/> to find available properties.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetSystemProperty" phase="onloadOnly" num="132">
0N/A <synopsis>Set System Property</synopsis>
0N/A <description>
0N/A Set a VM system property value.
0N/A <p/>
0N/A The function <functionlink id="GetSystemProperties"/>
0N/A returns the set of property keys, some of these may be settable.
0N/A See <functionlink id="GetSystemProperty"/>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="property">
0N/A <inbuf><char/></inbuf>
0N/A <description>
0N/A The key of the property, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
1988N/A <param id="value_ptr">
0N/A <inbuf>
0N/A <char/>
0N/A <nullok>
0N/A do not set the value, but return <errorlink id="JVMTI_ERROR_NOT_AVAILABLE"/>
0N/A if the property is not writeable
0N/A </nullok>
0N/A </inbuf>
0N/A <description>
0N/A The property value to set, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A <error id="JVMTI_ERROR_NOT_AVAILABLE">
0N/A This property is not available or is not writeable.
0N/A </error>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A <category id="general" label="General">
0N/A
0N/A <intro>
0N/A </intro>
0N/A
0N/A <function id="GetPhase" jkernel="yes" phase="any" num="133">
0N/A <synopsis>Get Phase</synopsis>
0N/A <description>
0N/A Return the current phase of VM execution.
0N/A The phases proceed in sequence:
0N/A <constants id="jvmtiPhase" label="Phases of execution" kind="enum">
0N/A <constant id="JVMTI_PHASE_ONLOAD" num="1">
0N/A <code>OnLoad</code> phase: while in the
0N/A <internallink id="onload"><code>Agent_OnLoad</code></internallink> function.
0N/A </constant>
0N/A <constant id="JVMTI_PHASE_PRIMORDIAL" num="2">
0N/A Primordial phase: between return from <code>Agent_OnLoad</code> and the
0N/A <code>VMStart</code> event.
0N/A </constant>
0N/A <constant id="JVMTI_PHASE_START" num="6">
0N/A Start phase: when the <eventlink id="VMStart"><code>VMStart</code></eventlink> event
0N/A is sent and until the <code>VMInit</code> event is sent.
0N/A </constant>
0N/A <constant id="JVMTI_PHASE_LIVE" num="4">
0N/A Live phase: when the <eventlink id="VMInit"><code>VMInit</code></eventlink> event is sent
0N/A and until the <eventlink id="VMDeath"></eventlink> event returns.
0N/A </constant>
0N/A <constant id="JVMTI_PHASE_DEAD" num="8">
0N/A Dead phase: after the <eventlink id="VMDeath"></eventlink> event returns or after
0N/A start-up failure.
0N/A </constant>
0N/A </constants>
0N/A In the case of start-up failure the VM will proceed directly to the dead
0N/A phase skipping intermediate phases and neither a <code>VMInit</code> nor
0N/A <code>VMDeath</code> event will be sent.
0N/A <p/>
0N/A Most <jvmti/> functions operate only in the live phase.
0N/A The following functions operate in either the <code>OnLoad</code> or live phases:
0N/A <functionphaselist phase="onload"/>
0N/A The following functions operate in only the <code>OnLoad</code> phase:
0N/A <functionphaselist phase="onloadOnly"/>
0N/A The following functions operate in the start or live phases:
0N/A <functionphaselist phase="start"/>
0N/A The following functions operate in any phase:
0N/A <functionphaselist phase="any"/>
0N/A JNI functions (except the Invocation API) must only be used in the start or live phases.
0N/A <p/>
0N/A Most <jvmti/> events are sent only in the live phase.
0N/A The following events operate in others phases:
0N/A <eventphaselist phase="start"/>
0N/A <eventphaselist phase="any"/>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="phase_ptr">
0N/A <outptr><enum>jvmtiPhase</enum></outptr>
0N/A <description>
0N/A On return, points to the phase.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="DisposeEnvironment" jkernel="yes" phase="any" num="127">
0N/A <synopsis>Dispose Environment</synopsis>
0N/A <description>
0N/A Shutdown a <jvmti/> connection created with JNI <code>GetEnv</code>
0N/A (see <internallink id="environments"><jvmti/> Environments</internallink>).
0N/A Dispose of any resources held by the environment.
0N/A <issue>
0N/A What resources are reclaimed? What is undone?
0N/A Breakpoints,watchpoints removed?
0N/A </issue>
0N/A Threads suspended by this environment are not resumed by this call,
0N/A this must be done explicitly by the agent.
0N/A Memory allocated by this environment via calls to <jvmti/> functions
0N/A is not released, this can be done explicitly by the agent
0N/A by calling <functionlink id="Deallocate"/>.
0N/A Raw monitors created by this environment are not destroyed,
0N/A this can be done explicitly by the agent
0N/A by calling <functionlink id="DestroyRawMonitor"/>.
0N/A The state of threads waiting on raw monitors created by this environment
0N/A are not affected.
0N/A <p/>
0N/A Any <functionlink id="SetNativeMethodPrefix">native method
0N/A prefixes</functionlink> for this environment will be unset;
0N/A the agent must remove any prefixed native methods before
0N/A dispose is called.
0N/A <p/>
0N/A Any <internallink id="capability">capabilities</internallink>
0N/A held by this environment are relinquished.
0N/A <p/>
0N/A Events enabled by this environment will no longer be sent, however
0N/A event handlers currently running will continue to run. Caution must
0N/A be exercised in the design of event handlers whose environment may
0N/A be disposed and thus become invalid during their execution.
0N/A <p/>
0N/A This environment may not be used after this call.
0N/A This call returns to the caller.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetEnvironmentLocalStorage" jkernel="yes" phase="any" callbacksafe="safe" impl="innative notrace" num="148">
0N/A <synopsis>Set Environment Local Storage</synopsis>
0N/A <description>
0N/A The VM stores a pointer value associated with each environment.
0N/A This pointer value is called <i>environment-local storage</i>.
0N/A This value is <code>NULL</code> unless set with this function.
0N/A Agents can allocate memory in which they store environment specific
0N/A information. By setting environment-local storage it can then be
0N/A accessed with
0N/A <functionlink id="GetEnvironmentLocalStorage"></functionlink>.
0N/A <p/>
0N/A Called by the agent to set the value of the <jvmti/>
0N/A environment-local storage. <jvmti/> supplies to the agent a pointer-size
0N/A environment-local storage that can be used to record per-environment
0N/A information.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="data">
0N/A <inbuf>
0N/A <void/>
0N/A <nullok>value is set to <code>NULL</code></nullok>
0N/A </inbuf>
0N/A <description>
0N/A The value to be entered into the environment-local storage.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetEnvironmentLocalStorage" jkernel="yes" phase="any" callbacksafe="safe" impl="innative notrace" num="147">
0N/A <synopsis>Get Environment Local Storage</synopsis>
0N/A <description>
0N/A Called by the agent to get the value of the <jvmti/> environment-local
0N/A storage.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="data_ptr">
0N/A <agentbuf><void/></agentbuf>
0N/A <description>
0N/A Pointer through which the value of the environment local
0N/A storage is returned.
0N/A If environment-local storage has not been set with
0N/A <functionlink id="SetEnvironmentLocalStorage"></functionlink> returned
0N/A pointer is <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="GetVersionNumber" jkernel="yes" phase="any" num="88">
0N/A <synopsis>Get Version Number</synopsis>
0N/A <description>
0N/A Return the <jvmti/> version via <code>version_ptr</code>.
0N/A The return value is the version identifier.
0N/A The version identifier includes major, minor and micro
0N/A version as well as the interface type.
0N/A <constants id="jvmtiVersionInterfaceTypes" label="Version Interface Types" kind="bits">
0N/A <constant id="JVMTI_VERSION_INTERFACE_JNI" num="0x00000000">
0N/A Value of <code>JVMTI_VERSION_MASK_INTERFACE_TYPE</code> for JNI.
0N/A </constant>
0N/A <constant id="JVMTI_VERSION_INTERFACE_JVMTI" num="0x30000000">
0N/A Value of <code>JVMTI_VERSION_MASK_INTERFACE_TYPE</code> for <jvmti/>.
0N/A </constant>
0N/A </constants>
0N/A <constants id="jvmtiVersionMasks" label="Version Masks" kind="bits">
0N/A <constant id="JVMTI_VERSION_MASK_INTERFACE_TYPE" num="0x70000000">
0N/A Mask to extract interface type.
0N/A The value of the version returned by this function masked with
0N/A <code>JVMTI_VERSION_MASK_INTERFACE_TYPE</code> is always
0N/A <code>JVMTI_VERSION_INTERFACE_JVMTI</code>
0N/A since this is a <jvmti/> function.
0N/A </constant>
0N/A <constant id="JVMTI_VERSION_MASK_MAJOR" num="0x0FFF0000">
0N/A Mask to extract major version number.
0N/A </constant>
0N/A <constant id="JVMTI_VERSION_MASK_MINOR" num="0x0000FF00">
0N/A Mask to extract minor version number.
0N/A </constant>
0N/A <constant id="JVMTI_VERSION_MASK_MICRO" num="0x000000FF">
0N/A Mask to extract micro version number.
0N/A </constant>
0N/A </constants>
0N/A <constants id="jvmtiVersionShifts" label="Version Shifts" kind="bits">
0N/A <constant id="JVMTI_VERSION_SHIFT_MAJOR" num="16">
0N/A Shift to extract major version number.
0N/A </constant>
0N/A <constant id="JVMTI_VERSION_SHIFT_MINOR" num="8">
0N/A Shift to extract minor version number.
0N/A </constant>
0N/A <constant id="JVMTI_VERSION_SHIFT_MICRO" num="0">
0N/A Shift to extract micro version number.
0N/A </constant>
0N/A </constants>
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="version_ptr">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A On return, points to the <jvmti/> version.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A
0N/A <function id="GetErrorName" phase="any" num="128">
0N/A <synopsis>Get Error Name</synopsis>
0N/A <description>
0N/A Return the symbolic name for an
0N/A <internallink id="ErrorSection">error code</internallink>.
0N/A <p/>
0N/A For example
0N/A <code>GetErrorName(env, JVMTI_ERROR_NONE, &amp;err_name)</code>
0N/A would return in <code>err_name</code> the string
0N/A <code>"JVMTI_ERROR_NONE"</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="error">
0N/A <enum>jvmtiError</enum>
0N/A <description>
0N/A The error code.
0N/A </description>
0N/A </param>
0N/A <param id="name_ptr">
0N/A <allocbuf><char/></allocbuf>
0N/A <description>
0N/A On return, points to the error name.
0N/A The name is encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string,
0N/A but is restricted to the ASCII subset.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A <function id="SetVerboseFlag" phase="any" num="150">
0N/A <synopsis>Set Verbose Flag</synopsis>
0N/A <description>
0N/A <constants id="jvmtiVerboseFlag" label="Verbose Flag Enumeration" kind="enum">
0N/A <constant id="JVMTI_VERBOSE_OTHER" num="0">
0N/A Verbose output other than the below.
0N/A </constant>
0N/A <constant id="JVMTI_VERBOSE_GC" num="1">
0N/A Verbose garbage collector output, like that specified with <code>-verbose:gc</code>.
0N/A </constant>
0N/A <constant id="JVMTI_VERBOSE_CLASS" num="2">
0N/A Verbose class loading output, like that specified with <code>-verbose:class</code>.
0N/A </constant>
0N/A <constant id="JVMTI_VERBOSE_JNI" num="4">
0N/A Verbose JNI output, like that specified with <code>-verbose:jni</code>.
0N/A </constant>
0N/A </constants>
0N/A Control verbose output.
0N/A This is the output which typically is sent to <code>stderr</code>.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="flag">
0N/A <enum>jvmtiVerboseFlag</enum>
0N/A <description>
0N/A Which verbose flag to set.
0N/A </description>
0N/A </param>
0N/A <param id="value">
0N/A <jboolean/>
0N/A <description>
0N/A New value of the flag.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A
0N/A <function id="GetJLocationFormat" phase="any" num="129">
0N/A <synopsis>Get JLocation Format</synopsis>
0N/A <description>
0N/A Although the greatest functionality is achieved with location information
0N/A referencing the virtual machine bytecode index, the definition of
0N/A <code>jlocation</code> has intentionally been left unconstrained to allow VM
0N/A implementations that do not have this information.
0N/A <p/>
0N/A This function describes the representation of <code>jlocation</code> used in this VM.
0N/A If the returned format is <datalink id="JVMTI_JLOCATION_JVMBCI"></datalink>,
0N/A <code>jlocation</code>s can
0N/A be used as in indices into the array returned by
0N/A <functionlink id="GetBytecodes"></functionlink>.
0N/A <constants id="jvmtiJlocationFormat" label="JLocation Format Enumeration" kind="enum">
0N/A <constant id="JVMTI_JLOCATION_JVMBCI" num="1">
0N/A <code>jlocation</code> values represent virtual machine
0N/A bytecode indices--that is, offsets into the
0N/A virtual machine code for a method.
0N/A </constant>
0N/A <constant id="JVMTI_JLOCATION_MACHINEPC" num="2">
0N/A <code>jlocation</code> values represent native machine
0N/A program counter values.
0N/A </constant>
0N/A <constant id="JVMTI_JLOCATION_OTHER" num="0">
0N/A <code>jlocation</code> values have some other representation.
0N/A </constant>
0N/A </constants>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="format_ptr">
0N/A <outptr><enum>jvmtiJlocationFormat</enum></outptr>
0N/A <description>
0N/A On return, points to the format identifier for <code>jlocation</code> values.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A <errors>
0N/A </errors>
0N/A </function>
0N/A
0N/A </category>
0N/A
0N/A</functionsection>
0N/A
0N/A<errorsection label="Error Reference">
0N/A <intro>
0N/A Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code.
0N/A <p/>
0N/A It is the responsibility of the agent to call <jvmti/> functions with
0N/A valid parameters and in the proper context (calling thread is attached,
0N/A phase is correct, etc.).
0N/A Detecting some error conditions may be difficult, inefficient, or
0N/A impossible for an implementation.
0N/A The errors listed in
0N/A <internallink id="reqerrors">Function Specific Required Errors</internallink>
0N/A must be detected by the implementation.
0N/A All other errors represent the recommended response to the error
0N/A condition.
0N/A </intro>
0N/A
0N/A <errorcategory id="universal-error" label="Universal Errors">
0N/A <intro>
0N/A The following errors may be returned by any function
0N/A </intro>
0N/A
0N/A <errorid id="JVMTI_ERROR_NONE" num="0">
0N/A No error has occurred. This is the error code that is returned
0N/A on successful completion of the function.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_NULL_POINTER" num="100">
0N/A Pointer is unexpectedly <code>NULL</code>.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_OUT_OF_MEMORY" num="110">
0N/A The function attempted to allocate memory and no more memory was
0N/A available for allocation.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_ACCESS_DENIED" num="111">
0N/A The desired functionality has not been enabled in this virtual machine.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNATTACHED_THREAD" num="115">
0N/A The thread being used to call this function is not attached
0N/A to the virtual machine. Calls must be made from attached threads.
0N/A See <code>AttachCurrentThread</code> in the JNI invocation API.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_ENVIRONMENT" num="116">
0N/A The <jvmti/> environment provided is no longer connected or is
0N/A not an environment.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_WRONG_PHASE" num="112">
0N/A The desired functionality is not available in the current
0N/A <functionlink id="GetPhase">phase</functionlink>.
0N/A Always returned if the virtual machine has completed running.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INTERNAL" num="113">
0N/A An unexpected internal error has occurred.
0N/A </errorid>
0N/A </errorcategory>
0N/A
0N/A <errorcategory id="reqerrors" label="Function Specific Required Errors">
0N/A <intro>
0N/A The following errors are returned by some <jvmti/> functions and must
0N/A be returned by the implementation when the condition occurs.
0N/A </intro>
0N/A
0N/A <errorid id="JVMTI_ERROR_INVALID_PRIORITY" num="12">
0N/A Invalid priority.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_THREAD_NOT_SUSPENDED" num="13">
0N/A Thread was not suspended.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_THREAD_SUSPENDED" num="14">
0N/A Thread already suspended.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_THREAD_NOT_ALIVE" num="15">
0N/A This operation requires the thread to be alive--that is,
0N/A it must be started and not yet have died.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_CLASS_NOT_PREPARED" num="22">
0N/A The class has been loaded but not yet prepared.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_NO_MORE_FRAMES" num="31">
0N/A There are no Java programming language or JNI stack frames at the specified depth.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_OPAQUE_FRAME" num="32">
0N/A Information about the frame is not available (e.g. for native frames).
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_DUPLICATE" num="40">
0N/A Item already set.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_NOT_FOUND" num="41">
0N/A Desired element (e.g. field or breakpoint) not found
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_NOT_MONITOR_OWNER" num="51">
0N/A This thread doesn't own the raw monitor.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INTERRUPT" num="52">
0N/A The call has been interrupted before completion.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNMODIFIABLE_CLASS" num="79">
0N/A The class cannot be modified.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_NOT_AVAILABLE" num="98">
0N/A The functionality is not available in this virtual machine.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_ABSENT_INFORMATION" num="101">
0N/A The requested information is not available.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_EVENT_TYPE" num="102">
0N/A The specified event type ID is not recognized.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_NATIVE_METHOD" num="104">
0N/A The requested information is not available for native method.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED" num="106">
0N/A The class loader does not support this operation.
0N/A </errorid>
0N/A </errorcategory>
0N/A
0N/A <errorcategory id="function-specific-errors" label="Function Specific Agent Errors">
0N/A <intro>
0N/A The following errors are returned by some <jvmti/> functions.
0N/A They are returned in the event of invalid parameters passed by the
0N/A agent or usage in an invalid context.
0N/A An implementation is not required to detect these errors.
0N/A </intro>
0N/A
0N/A <errorid id="JVMTI_ERROR_INVALID_THREAD" num="10">
0N/A The passed thread is not a valid thread.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_FIELDID" num="25">
0N/A Invalid field.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_METHODID" num="23">
0N/A Invalid method.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_LOCATION" num="24">
0N/A Invalid location.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_OBJECT" num="20">
0N/A Invalid object.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_CLASS" num="21">
0N/A Invalid class.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_TYPE_MISMATCH" num="34">
0N/A The variable is not an appropriate type for the function used.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_SLOT" num="35">
0N/A Invalid slot.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_MUST_POSSESS_CAPABILITY" num="99">
0N/A The capability being used is false in this environment.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_THREAD_GROUP" num="11">
0N/A Thread group invalid.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_MONITOR" num="50">
0N/A Invalid raw monitor.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_ILLEGAL_ARGUMENT" num="103">
0N/A Illegal argument.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_TYPESTATE" num="65">
0N/A The state of the thread has been modified, and is now inconsistent.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNSUPPORTED_VERSION" num="68">
0N/A A new class file has a version number not supported by this VM.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_INVALID_CLASS_FORMAT" num="60">
0N/A A new class file is malformed (the VM would return a <code>ClassFormatError</code>).
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION" num="61">
0N/A The new class file definitions would lead to a circular
0N/A definition (the VM would return a <code>ClassCircularityError</code>).
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED" num="63">
0N/A A new class file would require adding a method.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED" num="64">
0N/A A new class version changes a field.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_FAILS_VERIFICATION" num="62">
0N/A The class bytes fail verification.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED" num="66">
0N/A A direct superclass is different for the new class
0N/A version, or the set of directly implemented
0N/A interfaces is different.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED" num="67">
0N/A A new class version does not declare a method
0N/A declared in the old class version.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_NAMES_DONT_MATCH" num="69">
0N/A The class name defined in the new class file is
0N/A different from the name in the old class object.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED" num="70">
0N/A A new class version has different modifiers.
0N/A </errorid>
0N/A <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED" num="71">
0N/A A method in the new class version has different modifiers
0N/A than its counterpart in the old class version.
0N/A </errorid>
0N/A </errorcategory>
0N/A</errorsection>
0N/A
0N/A<eventsection label="Events">
0N/A <intro label="Handling Events" id="eventIntro">
0N/A Agents can be informed of many events that occur in application
0N/A programs.
0N/A <p/>
0N/A To handle events, designate a set of callback functions with
0N/A <functionlink id="SetEventCallbacks"></functionlink>.
0N/A For each event the corresponding callback function will be
0N/A called.
0N/A Arguments to the callback function provide additional
0N/A information about the event.
0N/A <p/>
0N/A The callback function is usually called from within an application
0N/A thread. The <jvmti/> implementation does not
0N/A queue events in any way. This means
0N/A that event callback functions must be written
0N/A carefully. Here are some general guidelines. See
0N/A the individual event descriptions for further
0N/A suggestions.
0N/A <p/>
0N/A <ul>
0N/A <li>Any exception thrown during the execution of an event callback can
0N/A overwrite any current pending exception in the current application thread.
0N/A Care must be taken to preserve a pending exception
0N/A when an event callback makes a JNI call that might generate an exception.
0N/A </li>
0N/A <li>Event callback functions must be re-entrant. The <jvmti/> implementation does
0N/A not queue events. If an agent needs to process events one at a time, it
0N/A can use a raw monitor inside the
0N/A event callback functions to serialize event processing.
0N/A </li>
0N/A <li>Event callback functions that execute JNI's FindClass function to load
0N/A classes need to note that FindClass locates the class loader associated
0N/A with the current native method. For the purposes of class loading, an
0N/A event callback that includes a JNI environment as a parameter to the
0N/A callback will treated as if it is a native call, where the native method
0N/A is in the class of the event thread's current frame.
0N/A </li>
0N/A </ul>
0N/A <p/>
0N/A Some <jvmti/> events identify objects with JNI references.
0N/A All references
0N/A in <jvmti/> events are JNI local references and will become invalid
0N/A after the event callback returns.
0N/A Unless stated otherwise, memory referenced by pointers sent in event
0N/A callbacks may not be referenced after the event callback returns.
0N/A <p/>
0N/A Except where stated otherwise, events are delivered on the thread
0N/A that caused the event.
0N/A Events are sent at the time they occur.
0N/A The specification for each event includes the set of
0N/A <functionlink id="GetPhase">phases</functionlink> in which it can be sent;
0N/A if an event triggering activity occurs during another phase, no event
0N/A is sent.
0N/A <p/>
0N/A A thread that generates an event does not change its execution status
0N/A (for example, the event does not cause the thread to be suspended).
0N/A If an agent wishes the event to result in suspension, then the agent
0N/A is responsible for explicitly suspending the thread with
0N/A <functionlink id="SuspendThread"></functionlink>.
0N/A <p/>
0N/A If an event is enabled in multiple environments, the event will be sent
0N/A to each agent in the order that the environments were created.
0N/A </intro>
0N/A
0N/A <intro label="Enabling Events" id="enablingevents">
0N/A All events are initially disabled. In order to receive any
0N/A event:
0N/A <ul>
0N/A <li>
0N/A If the event requires a capability, that capability must
0N/A be added with
0N/A <functionlink id="AddCapabilities"></functionlink>.
0N/A </li>
0N/A <li>
0N/A A callback for the event must be set with
0N/A <functionlink id="SetEventCallbacks"></functionlink>.
0N/A </li>
0N/A <li>
0N/A The event must be enabled with
0N/A <functionlink id="SetEventNotificationMode"></functionlink>.
0N/A </li>
0N/A </ul>
0N/A </intro>
0N/A
0N/A <intro label="Multiple Co-located Events" id="eventorder">
0N/A In many situations it is possible for multiple events to occur
0N/A at the same location in one thread. When this happens, all the events
0N/A are reported through the event callbacks in the order specified in this section.
0N/A <p/>
0N/A If the current location is at the entry point of a method, the
0N/A <eventlink id="MethodEntry"></eventlink> event is reported before
0N/A any other event at the current location in the same thread.
0N/A <p/>
0N/A If an exception catch has been detected at the current location,
0N/A either because it is the beginning of a catch clause or a native method
0N/A that cleared a pending exception has returned, the
0N/A <code>exceptionCatch</code> event is reported before
0N/A any other event at the current location in the same thread.
0N/A <p/>
0N/A If a <code>singleStep</code> event or
0N/A <code>breakpoint</code> event is triggered at the
0N/A current location, the event is defined to occur
0N/A immediately before the code at the current location is executed.
0N/A These events are reported before any events which are triggered
0N/A by the execution of code at the current location in the same
0N/A thread (specifically:
0N/A <code>exception</code>,
0N/A <code>fieldAccess</code>, and
0N/A <code>fieldModification</code>).
0N/A If both a step and breakpoint event are triggered for the same thread and
0N/A location, the step event is reported before the breakpoint event.
0N/A <p/>
0N/A If the current location is the exit point of a method (that is, the last
0N/A location before returning to the caller), the
0N/A <eventlink id="MethodExit"></eventlink> event and
0N/A the <eventlink id="FramePop"></eventlink> event (if requested)
0N/A are reported after all other events at the current location in the same
0N/A thread. There is no specified ordering of these two events
0N/A with respect to each other.
0N/A <p/>
0N/A Co-located events can be triggered during the processing of some other
0N/A event by the agent at the same location in the same thread.
0N/A If such an event, of type <i>y</i>, is triggered during the processing of
0N/A an event of type <i>x</i>, and if <i>x</i>
0N/A precedes <i>y</i> in the ordering specified above, the co-located event
0N/A <i>y</i> is reported for the current thread and location. If <i>x</i> does not precede
0N/A <i>y</i>, <i>y</i> is not reported for the current thread and location.
0N/A For example, if a breakpoint is set at the current location
0N/A during the processing of <eventlink id="SingleStep"></eventlink>,
0N/A that breakpoint will be reported before the thread moves off the current
0N/A location.
0N/A <p/>The following events are never considered to be co-located with
0N/A other events.
0N/A <ul>
0N/A <li><eventlink id="VMStart"></eventlink></li>
0N/A <li><eventlink id="VMInit"></eventlink></li>
0N/A <li><eventlink id="VMDeath"></eventlink></li>
0N/A <li><eventlink id="ThreadStart"></eventlink></li>
0N/A <li><eventlink id="ThreadEnd"></eventlink></li>
0N/A <li><eventlink id="ClassLoad"></eventlink></li>
0N/A <li><eventlink id="ClassPrepare"></eventlink></li>
0N/A </ul>
0N/A </intro>
0N/A
0N/A <intro label="Event Callbacks" id="jvmtiEventCallbacks">
0N/A The event callback structure below is used to specify the handler function
0N/A for events. It is set with the
0N/A <functionlink id="SetEventCallbacks"></functionlink> function.
0N/A </intro>
0N/A
0N/A <event label="Single Step"
0N/A id="SingleStep" const="JVMTI_EVENT_SINGLE_STEP" filtered="thread" num="60">
0N/A <description>
0N/A Single step events allow the agent to trace thread execution
0N/A at the finest granularity allowed by the VM. A single step event is
0N/A generated whenever a thread reaches a new location.
0N/A Typically, single step events represent the completion of one VM
2427N/A instruction as defined in <vmspec/>. However, some implementations
0N/A may define locations differently. In any case the
0N/A <code>method</code> and <code>location</code>
0N/A parameters uniquely identify the current location and allow
0N/A the mapping to source file and line number when that information is
0N/A available.
0N/A <p/>
0N/A No single step events are generated from within native methods.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_single_step_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread about to execution a new instruction
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method about to execute a new instruction
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method about to execute a new instruction
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A Location of the new instruction
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Breakpoint"
0N/A id="Breakpoint" const="JVMTI_EVENT_BREAKPOINT" filtered="thread" num="62">
0N/A <description>
0N/A Breakpoint events are generated whenever a thread reaches a location
0N/A designated as a breakpoint with <functionlink id="SetBreakpoint"></functionlink>.
0N/A The <code>method</code> and <code>location</code>
0N/A parameters uniquely identify the current location and allow
0N/A the mapping to source file and line number when that information is
0N/A available.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_breakpoint_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread.
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread that hit the breakpoint
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method that hit the breakpoint
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method that hit the breakpoint
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A location of the breakpoint
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Field Access"
0N/A id="FieldAccess" const="JVMTI_EVENT_FIELD_ACCESS" filtered="thread" num="63">
0N/A <description>
0N/A Field access events are generated whenever a thread accesses
0N/A a field that was designated as a watchpoint
0N/A with <functionlink id="SetFieldAccessWatch"></functionlink>.
0N/A The <code>method</code> and <code>location</code>
0N/A parameters uniquely identify the current location and allow
0N/A the mapping to source file and line number when that information is
0N/A available.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_field_access_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread accessing the field
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method where the access is occurring
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method where the access is occurring
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A Location where the access is occurring
0N/A </description>
0N/A </param>
0N/A <param id="field_klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A Class of the field being accessed
0N/A </description>
0N/A </param>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A Object with the field being accessed if the field is an
0N/A instance field; <code>NULL</code> otherwise
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="field_klass"/>
0N/A <description>
0N/A Field being accessed
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Field Modification"
0N/A id="FieldModification" const="JVMTI_EVENT_FIELD_MODIFICATION" filtered="thread" num="64">
0N/A <description>
0N/A Field modification events are generated whenever a thread modifies
0N/A a field that was designated as a watchpoint
0N/A with <functionlink id="SetFieldModificationWatch"></functionlink>.
0N/A The <code>method</code> and <code>location</code>
0N/A parameters uniquely identify the current location and allow
0N/A the mapping to source file and line number when that information is
0N/A available.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_field_modification_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread modifying the field
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method where the modification is occurring
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method where the modification is occurring
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A Location where the modification is occurring
0N/A </description>
0N/A </param>
0N/A <param id="field_klass">
0N/A <jclass field="field"/>
0N/A <description>
0N/A Class of the field being modified
0N/A </description>
0N/A </param>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A Object with the field being modified if the field is an
0N/A instance field; <code>NULL</code> otherwise
0N/A </description>
0N/A </param>
0N/A <param id="field">
0N/A <jfieldID class="field_klass"/>
0N/A <description>
0N/A Field being modified
0N/A </description>
0N/A </param>
0N/A <param id="signature_type">
0N/A <char/>
0N/A <description>
0N/A Signature type of the new value
0N/A </description>
0N/A </param>
0N/A <param id="new_value">
0N/A <jvalue/>
0N/A <description>
0N/A The new value
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Frame Pop"
0N/A id="FramePop" const="JVMTI_EVENT_FRAME_POP" filtered="thread" num="61">
0N/A <description>
0N/A Frame pop events are generated upon exit from a single method
0N/A in a single frame as specified
0N/A in a call to <functionlink id="NotifyFramePop"></functionlink>.
0N/A This is true whether termination is caused by
0N/A executing its return instruction
0N/A or by throwing an exception to its caller
0N/A (see <paramlink id="was_popped_by_exception"></paramlink>).
0N/A However, frame pops caused by the <functionlink id="PopFrame"/>
0N/A function are not reported.
0N/A <p/>
0N/A The location reported by <functionlink id="GetFrameLocation"></functionlink>
0N/A identifies the executable location in the returning method,
0N/A immediately prior to the return.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_frame_pop_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread that is popping the frame
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method being popped
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method being popped
0N/A </description>
0N/A </param>
0N/A <param id="was_popped_by_exception">
0N/A <jboolean/>
0N/A <description>
0N/A True if frame was popped by a thrown exception.
0N/A False if method exited through its return instruction.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Method Entry"
0N/A id="MethodEntry" const="JVMTI_EVENT_METHOD_ENTRY" filtered="thread" num="65">
0N/A <description>
0N/A Method entry events are generated upon entry of Java
0N/A programming language methods (including native methods).
0N/A <p/>
0N/A The location reported by <functionlink id="GetFrameLocation"></functionlink>
0N/A identifies the initial executable location in
0N/A the method.
0N/A <p/>
0N/A Enabling method
0N/A entry or exit events will significantly degrade performance on many platforms and is thus
0N/A not advised for performance critical usage (such as profiling).
0N/A <internallink id="bci">Bytecode instrumentation</internallink> should be
0N/A used in these cases.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_method_entry_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread entering the method
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method being entered
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method being entered
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Method Exit"
0N/A id="MethodExit" const="JVMTI_EVENT_METHOD_EXIT" filtered="thread" num="66">
0N/A <description>
0N/A Method exit events are generated upon exit from Java
0N/A programming language methods (including native methods).
0N/A This is true whether termination is caused by
0N/A executing its return instruction
0N/A or by throwing an exception to its caller
0N/A (see <paramlink id="was_popped_by_exception"></paramlink>).
0N/A <p/>
0N/A The <code>method</code> field uniquely identifies the
0N/A method being entered or exited. The <code>frame</code> field provides
0N/A access to the stack frame for the method.
0N/A <p/>
0N/A The location reported by <functionlink id="GetFrameLocation"></functionlink>
0N/A identifies the executable location in the returning method
0N/A immediately prior to the return.
0N/A <p/>
0N/A Enabling method
0N/A entry or exit events will significantly degrade performance on many platforms and is thus
0N/A not advised for performance critical usage (such as profiling).
0N/A <internallink id="bci">Bytecode instrumentation</internallink> should be
0N/A used in these cases.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_method_exit_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread exiting the method
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method being exited
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method being exited
0N/A </description>
0N/A </param>
0N/A <param id="was_popped_by_exception">
0N/A <jboolean/>
0N/A <description>
0N/A True if frame was popped by a thrown exception.
0N/A False if method exited through its return instruction.
0N/A </description>
0N/A </param>
0N/A <param id="return_value">
0N/A <jvalue/>
0N/A <description>
0N/A The return value of the method being exited.
0N/A Undefined and should not be used if
0N/A <paramlink id="was_popped_by_exception"></paramlink>
0N/A is true.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Native Method Bind" phase="any"
0N/A id="NativeMethodBind" const="JVMTI_EVENT_NATIVE_METHOD_BIND" num="67">
0N/A <description>
0N/A A Native Method Bind event is sent when a VM binds a
0N/A Java programming language native method
0N/A to the address of a function that implements the native method.
0N/A This will occur when the native method is called for the first time
0N/A and also occurs when the JNI function <code>RegisterNatives</code> is called.
0N/A This event allows the bind to be redirected to an agent-specified
0N/A proxy function.
0N/A This event is not sent when the native method is unbound.
0N/A Typically, this proxy function will need to be specific to a
0N/A particular method or, to handle the general case, automatically
0N/A generated assembly code, since after instrumentation code is
0N/A executed the function at the original binding
0N/A address will usually be invoked.
0N/A The original binding can be restored or the redirection changed
0N/A by use of the JNI function <code>RegisterNatives</code>.
0N/A Some events may be sent during the primordial phase, JNI and
0N/A most of <jvmti/> cannot be used at this time but the method and
0N/A address can be saved for use later.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_generate_native_method_bind_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A Will be <code>NULL</code> if sent during the primordial
0N/A <functionlink id="GetPhase">phase</functionlink>.
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread requesting the bind
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method being bound
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Native method being bound
0N/A </description>
0N/A </param>
0N/A <param id="address">
0N/A <outptr><void/></outptr>
0N/A <description>
0N/A The address the VM is about to bind to--that is, the
0N/A address of the implementation of the native method
0N/A </description>
0N/A </param>
0N/A <param id="new_address_ptr">
0N/A <agentbuf><void/></agentbuf>
0N/A <description>
0N/A if the referenced address is changed (that is, if
0N/A <code>*new_address_ptr</code> is set), the binding
0N/A will instead be made to the supplied address.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Exception"
0N/A id="Exception" const="JVMTI_EVENT_EXCEPTION" filtered="thread" num="58">
0N/A <description>
0N/A Exception events are generated whenever an exception is first detected
0N/A in a Java programming language method.
0N/A Where "exception" means any <code>java.lang.Throwable</code>.
0N/A The exception may have been thrown by a Java programming language or native
0N/A method, but in the case of native methods, the event is not generated
0N/A until the exception is first seen by a Java programming language method. If an exception is
0N/A set and cleared in a native method (and thus is never visible to Java programming language code),
0N/A no exception event is generated.
0N/A <p/>
0N/A The <code>method</code> and <code>location</code>
0N/A parameters uniquely identify the current location
0N/A (where the exception was detected) and allow
0N/A the mapping to source file and line number when that information is
0N/A available. The <code>exception</code> field identifies the thrown
0N/A exception object. The <code>catch_method</code>
0N/A and <code>catch_location</code> identify the location of the catch clause,
0N/A if any, that handles the thrown exception. If there is no such catch clause,
0N/A each field is set to 0. There is no guarantee that the thread will ever
0N/A reach this catch clause. If there are native methods on the call stack
0N/A between the throw location and the catch clause, the exception may
0N/A be reset by one of those native methods.
0N/A Similarly, exceptions that are reported as uncaught (<code>catch_klass</code>
0N/A et al. set to 0) may in fact be caught by native code.
0N/A Agents can check for these occurrences by monitoring
0N/A <eventlink id="ExceptionCatch"></eventlink> events.
0N/A Note that finally clauses are implemented as catch and re-throw. Therefore they
0N/A will be reported in the catch location.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_exception_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread generating the exception
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class generating the exception
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method generating the exception
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A Location where exception occurred
0N/A </description>
0N/A </param>
0N/A <param id="exception">
0N/A <jobject/>
0N/A <description>
0N/A The exception being thrown
0N/A </description>
0N/A </param>
0N/A <param id="catch_klass">
0N/A <jclass method="catch_method"/>
0N/A <description>
0N/A Class that will catch the exception, or <code>NULL</code> if no known catch
0N/A </description>
0N/A </param>
0N/A <param id="catch_method">
0N/A <jmethodID class="catch_klass"/>
0N/A <description>
0N/A Method that will catch the exception, or <code>NULL</code> if no known catch
0N/A </description>
0N/A </param>
0N/A <param id="catch_location">
0N/A <jlocation/>
0N/A <description>
0N/A location which will catch the exception or zero if no known catch
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Exception Catch"
0N/A id="ExceptionCatch" const="JVMTI_EVENT_EXCEPTION_CATCH" filtered="thread" num="59">
0N/A <description>
0N/A Exception catch events are generated whenever a thrown exception is caught.
0N/A Where "exception" means any <code>java.lang.Throwable</code>.
0N/A If the exception is caught in a Java programming language method, the event is generated
0N/A when the catch clause is reached. If the exception is caught in a native
0N/A method, the event is generated as soon as control is returned to a Java programming language
0N/A method. Exception catch events are generated for any exception for which
0N/A a throw was detected in a Java programming language method.
0N/A Note that finally clauses are implemented as catch and re-throw. Therefore they
0N/A will generate exception catch events.
0N/A <p/>
0N/A The <code>method</code> and <code>location</code>
0N/A parameters uniquely identify the current location
0N/A and allow the mapping to source file and line number when that information is
0N/A available. For exceptions caught in a Java programming language method, the
0N/A <code>exception</code> object identifies the exception object. Exceptions
0N/A caught in native methods are not necessarily available by the time the
0N/A exception catch is reported, so the <code>exception</code> field is set
0N/A to <code>NULL</code>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_exception_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread catching the exception
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class catching the exception
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method catching the exception
0N/A </description>
0N/A </param>
0N/A <param id="location">
0N/A <jlocation/>
0N/A <description>
0N/A Location where exception is being caught
0N/A </description>
0N/A </param>
0N/A <param id="exception">
0N/A <jobject/>
0N/A <description>
0N/A Exception being caught
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Thread Start"
0N/A id="ThreadStart" const="JVMTI_EVENT_THREAD_START" num="52" phase="start">
0N/A <description>
0N/A Thread start events are generated by a new thread before its initial
0N/A method executes.
0N/A <p/>
0N/A A thread may be listed in the array returned by
0N/A <functionlink id="GetAllThreads"></functionlink>
0N/A before its thread start event is generated.
0N/A It is possible for other events to be generated
0N/A on a thread before its thread start event.
0N/A <p/>
0N/A The event is sent on the newly started <paramlink id="thread"></paramlink>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread.
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread starting
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Thread End"
0N/A id="ThreadEnd" const="JVMTI_EVENT_THREAD_END" filtered="thread" num="53" phase="start">
0N/A <description>
0N/A Thread end events are generated by a terminating thread
0N/A after its initial method has finished execution.
0N/A <p/>
0N/A A thread may be listed in the array returned by
0N/A <functionlink id="GetAllThreads"></functionlink>
0N/A after its thread end event is generated.
0N/A No events are generated on a thread
0N/A after its thread end event.
0N/A <p/>
0N/A The event is sent on the dying <paramlink id="thread"></paramlink>.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread.
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread ending
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Class Load"
0N/A id="ClassLoad" const="JVMTI_EVENT_CLASS_LOAD" filtered="thread" phase="start" num="55">
0N/A <description>
0N/A A class load event is generated when a class is first loaded. The order
0N/A of class load events generated by a particular thread are guaranteed
0N/A to match the order of class loading within that thread.
0N/A Array class creation does not generate a class load event.
0N/A The creation of a primitive class (for example, java.lang.Integer.TYPE)
0N/A does not generate a class load event.
0N/A <p/>
0N/A This event is sent at an early stage in loading the class. As
0N/A a result the class should be used carefully. Note, for example,
0N/A that methods and fields are not yet loaded, so queries for methods,
0N/A fields, subclasses, and so on will not give correct results.
0N/A See "Loading of Classes and Interfaces" in the <i>Java Language
0N/A Specification</i>. For most
0N/A purposes the <eventlink id="ClassPrepare"></eventlink> event will
0N/A be more useful.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread loading the class
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A Class being loaded
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <elide>
0N/A <event label="Class Unload"
0N/A id="ClassUnload" const="JVMTI_EVENT_CLASS_UNLOAD" num="57">
0N/A <description>
0N/A A class unload event is generated when the class is about to be unloaded.
0N/A Class unload events take place during garbage collection and must be
0N/A handled extremely carefully. The garbage collector holds many locks
0N/A and has suspended all other threads, so the event handler cannot depend
0N/A on the ability to acquire any locks. The class unload event handler should
0N/A do as little as possible, perhaps by queuing information to be processed
0N/A later. In particular, the <code>jclass</code> should be used only in
0N/A the JNI function <code>isSameObject</code> or in the following <jvmti/> functions:
0N/A <ul>
0N/A <li><functionlink id="GetClassSignature"></functionlink></li>
0N/A <li><functionlink id="GetSourceFileName"></functionlink></li>
0N/A <li><functionlink id="IsInterface"></functionlink></li>
0N/A <li><functionlink id="IsArrayClass"></functionlink></li>
0N/A </ul>
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread generating the class unload
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A Class being unloaded
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A </elide>
0N/A
0N/A <event label="Class Prepare"
0N/A id="ClassPrepare" const="JVMTI_EVENT_CLASS_PREPARE" filtered="thread" phase="start" num="56">
0N/A <description>
0N/A A class prepare event is generated when class preparation is complete.
0N/A At this point, class fields, methods, and implemented interfaces are
0N/A available, and no code from the class has been executed. Since array
0N/A classes never have fields or methods, class prepare events are not
0N/A generated for them. Class prepare events are not generated for
0N/A primitive classes (for example, <code>java.lang.Integer.TYPE</code>).
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread generating the class prepare
0N/A </description>
0N/A </param>
0N/A <param id="klass">
0N/A <jclass/>
0N/A <description>
0N/A Class being prepared
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Class File Load Hook" phase="any"
0N/A id="ClassFileLoadHook" const="JVMTI_EVENT_CLASS_FILE_LOAD_HOOK" num="54">
0N/A <description>
0N/A This event is sent when the VM obtains class file data,
0N/A but before it constructs
0N/A the in-memory representation for that class.
0N/A This event is also sent when the class is being modified by the
0N/A <functionlink id="RetransformClasses"/> function or
0N/A the <functionlink id="RedefineClasses"/> function,
0N/A called in any <jvmti/> environment.
0N/A The agent can instrument
0N/A the existing class file data sent by the VM to include profiling/debugging hooks.
0N/A See the description of
0N/A <internallink id="bci">bytecode instrumentation</internallink>
0N/A for usage information.
0N/A <p/>
0N/A This event may be sent before the VM is initialized (the primordial
0N/A <functionlink id="GetPhase">phase</functionlink>). During this time
0N/A no VM resources should be created. Some classes might not be compatible
0N/A with the function (eg. ROMized classes) and this event will not be
0N/A generated for these classes.
0N/A <p/>
0N/A The agent must allocate the space for the modified
0N/A class file data buffer
0N/A using the memory allocation function
0N/A <functionlink id="Allocate"></functionlink> because the
0N/A VM is responsible for freeing the new class file data buffer
0N/A using <functionlink id="Deallocate"></functionlink>.
0N/A Note that <functionlink id="Allocate"></functionlink>
0N/A is permitted during the primordial phase.
0N/A <p/>
0N/A If the agent wishes to modify the class file, it must set
0N/A <code>new_class_data</code> to point
0N/A to the newly instrumented class file data buffer and set
0N/A <code>new_class_data_len</code> to the length of that
0N/A buffer before returning
0N/A from this call. If no modification is desired, the agent simply
0N/A does not set <code>new_class_data</code>. If multiple agents
0N/A have enabled this event the results are chained. That is, if
0N/A <code>new_class_data</code> has been set, it becomes the
0N/A <code>class_data</code> for the next agent.
0N/A <p/>
0N/A The order that this event is sent to each environment differs
0N/A from other events.
0N/A This event is sent to environments in the following order:
0N/A <ul>
0N/A <li><fieldlink id="can_retransform_classes"
0N/A struct="jvmtiCapabilities">retransformation
0N/A incapable</fieldlink>
0N/A environments, in the
0N/A order in which they were created
0N/A </li>
0N/A <li><fieldlink id="can_retransform_classes"
0N/A struct="jvmtiCapabilities">retransformation
0N/A capable</fieldlink>
0N/A environments, in the
0N/A order in which they were created
0N/A </li>
0N/A </ul>
0N/A When triggered by <functionlink id="RetransformClasses"/>,
0N/A this event is sent only to <fieldlink id="can_retransform_classes"
0N/A struct="jvmtiCapabilities">retransformation
0N/A capable</fieldlink>
0N/A environments.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A <capability id="can_generate_all_class_hook_events"></capability>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread.
0N/A Will be <code>NULL</code> if sent during the primordial
0N/A <functionlink id="GetPhase">phase</functionlink>.
0N/A </description>
0N/A </param>
0N/A <param id="class_being_redefined">
0N/A <jclass/>
0N/A <description>
0N/A The class being
0N/A <functionlink id="RedefineClasses">redefined</functionlink> or
0N/A <functionlink id="RetransformClasses">retransformed</functionlink>.
0N/A <code>NULL</code> if sent by class load.
0N/A </description>
0N/A </param>
0N/A <param id="loader">
0N/A <jobject/>
0N/A <description>
0N/A The class loader loading the class.
0N/A <code>NULL</code> if the bootstrap class loader.
0N/A </description>
0N/A </param>
0N/A <param id="name">
0N/A <vmbuf><char/></vmbuf>
0N/A <description>
0N/A Name of class being loaded as a VM internal qualified name
0N/A (for example, "java/util/List"), encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A Note: if the class is defined with a <code>NULL</code> name or
0N/A without a name specified, <code>name</code> will be <code>NULL</code>.
0N/A </description>
0N/A </param>
0N/A <param id="protection_domain">
0N/A <jobject/>
0N/A <description>
0N/A The <code>ProtectionDomain</code> of the class.
0N/A </description>
0N/A </param>
0N/A <param id="class_data_len">
0N/A <jint/>
0N/A <description>
0N/A Length of current class file data buffer.
0N/A </description>
0N/A </param>
0N/A <param id="class_data">
0N/A <vmbuf><uchar/></vmbuf>
0N/A <description>
0N/A Pointer to the current class file data buffer.
0N/A </description>
0N/A </param>
0N/A <param id="new_class_data_len">
0N/A <outptr><jint/></outptr>
0N/A <description>
0N/A Pointer to the length of the new class file data buffer.
0N/A </description>
0N/A </param>
0N/A <param id="new_class_data">
0N/A <agentbuf incount="new_class_data_len"><uchar/></agentbuf>
0N/A <description>
0N/A Pointer to the pointer to the instrumented class file data buffer.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="VM Start Event"
0N/A id="VMStart" const="JVMTI_EVENT_VM_START" num="57" phase="start">
0N/A <description>
0N/A The VM initialization event signals the start of the VM.
0N/A At this time JNI is live but the VM is not yet fully initialized.
0N/A Once this event is generated, the agent is free to call any JNI function.
0N/A This event signals the beginning of the start phase,
0N/A <jvmti/> functions permitted in the start phase may be called.
0N/A <p/>
0N/A In the case of VM start-up failure, this event will not be sent.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="VM Initialization Event"
0N/A id="VMInit" const="JVMTI_EVENT_VM_INIT" num="50">
0N/A <description>
0N/A The VM initialization event signals the completion of VM initialization. Once
0N/A this event is generated, the agent is free to call any JNI or <jvmti/>
0N/A function. The VM initialization event can be preceded by or can be concurrent
0N/A with other events, but
0N/A the preceding events should be handled carefully, if at all, because the
0N/A VM has not completed its initialization. The thread start event for the
0N/A main application thread is guaranteed not to occur until after the
0N/A handler for the VM initialization event returns.
0N/A <p/>
0N/A In the case of VM start-up failure, this event will not be sent.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread.
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A The initial thread
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="VM Death Event"
0N/A id="VMDeath" const="JVMTI_EVENT_VM_DEATH" num="51">
0N/A <description>
0N/A The VM death event notifies the agent of the termination of the VM.
0N/A No events will occur after the VMDeath event.
0N/A <p/>
0N/A In the case of VM start-up failure, this event will not be sent.
0N/A Note that <internallink id="onunload">Agent_OnUnload</internallink>
0N/A will still be called in these cases.
0N/A </description>
0N/A <origin>jvmdi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Compiled Method Load"
0N/A id="CompiledMethodLoad" const="JVMTI_EVENT_COMPILED_METHOD_LOAD" num="68">
0N/A <description>
0N/A Sent when a method is compiled and loaded into memory by the VM.
0N/A If it is unloaded, the <eventlink id="CompiledMethodUnload"/> event is sent.
0N/A If it is moved, the <eventlink id="CompiledMethodUnload"/> event is sent,
0N/A followed by a new <code>CompiledMethodLoad</code> event.
0N/A Note that a single method may have multiple compiled forms, and that
0N/A this event will be sent for each form.
0N/A Note also that several methods may be inlined into a single
0N/A address range, and that this event will be sent for each method.
0N/A <p/>
0N/A These events can be sent after their initial occurrence with
0N/A <functionlink id="GenerateEvents"></functionlink>.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <typedef id="jvmtiAddrLocationMap" label="Native address to location entry">
0N/A <field id="start_address">
0N/A <vmbuf><void/></vmbuf>
0N/A <description>
0N/A Starting native address of code corresponding to a location
0N/A </description>
0N/A </field>
0N/A <field id="location">
0N/A <jlocation/>
0N/A <description>
0N/A Corresponding location. See
0N/A <functionlink id="GetJLocationFormat"></functionlink>
0N/A for the meaning of location.
0N/A </description>
0N/A </field>
0N/A </typedef>
0N/A <capabilities>
0N/A <required id="can_generate_compiled_method_load_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the method being compiled and loaded
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Method being compiled and loaded
0N/A </description>
0N/A </param>
0N/A <param id="code_size">
0N/A <jint/>
0N/A <description>
0N/A Size of compiled code
0N/A </description>
0N/A </param>
0N/A <param id="code_addr">
0N/A <vmbuf><void/></vmbuf>
0N/A <description>
0N/A Address where compiled method code is loaded
0N/A </description>
0N/A </param>
0N/A <param id="map_length">
0N/A <jint/>
0N/A <description>
0N/A Number of <typelink id="jvmtiAddrLocationMap"></typelink>
0N/A entries in the address map.
0N/A Zero if mapping information cannot be supplied.
0N/A </description>
0N/A </param>
0N/A <param id="map">
0N/A <vmbuf><struct>jvmtiAddrLocationMap</struct></vmbuf>
0N/A <description>
0N/A Map from native addresses to location.
0N/A The native address range of each entry is from
0N/A <fieldlink id="start_address" struct="jvmtiAddrLocationMap"></fieldlink>
0N/A to <code>start_address-1</code> of the next entry.
0N/A <code>NULL</code> if mapping information cannot be supplied.
0N/A </description>
0N/A </param>
0N/A <param id="compile_info">
0N/A <vmbuf><void/></vmbuf>
0N/A <description>
0N/A VM-specific compilation information.
0N/A The referenced compile information is managed by the VM
0N/A and must not depend on the agent for collection.
0N/A A VM implementation defines the content and lifetime
0N/A of the information.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Compiled Method Unload"
0N/A id="CompiledMethodUnload" const="JVMTI_EVENT_COMPILED_METHOD_UNLOAD" num="69">
0N/A <description>
0N/A Sent when a compiled method is unloaded from memory.
0N/A This event might not be sent on the thread which performed the unload.
0N/A This event may be sent sometime after the unload occurs, but
0N/A will be sent before the memory is reused
0N/A by a newly generated compiled method. This event may be sent after
0N/A the class is unloaded.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_compiled_method_load_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="klass">
0N/A <jclass method="method"/>
0N/A <description>
0N/A Class of the compiled method being unloaded.
0N/A </description>
0N/A </param>
0N/A <param id="method">
0N/A <jmethodID class="klass"/>
0N/A <description>
0N/A Compiled method being unloaded.
0N/A For identification of the compiled method only -- the class
0N/A may be unloaded and therefore the method should not be used
0N/A as an argument to further JNI or <jvmti/> functions.
0N/A </description>
0N/A </param>
0N/A <param id="code_addr">
0N/A <vmbuf><void/></vmbuf>
0N/A <description>
0N/A Address where compiled method code was loaded.
0N/A For identification of the compiled method only --
0N/A the space may have been reclaimed.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Dynamic Code Generated" phase="any"
0N/A id="DynamicCodeGenerated" const="JVMTI_EVENT_DYNAMIC_CODE_GENERATED" num="70">
0N/A <description>
0N/A Sent when a component of the virtual machine is generated dynamically.
0N/A This does not correspond to Java programming language code that is
0N/A compiled--see <eventlink id="CompiledMethodLoad"></eventlink>.
0N/A This is for native code--for example, an interpreter that is generated
0N/A differently depending on command-line options.
0N/A <p/>
0N/A Note that this event has no controlling capability.
0N/A If a VM cannot generate these events, it simply does not send any.
0N/A <p/>
0N/A These events can be sent after their initial occurrence with
0N/A <functionlink id="GenerateEvents"></functionlink>.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="name">
0N/A <vmbuf><char/></vmbuf>
0N/A <description>
0N/A Name of the code, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A Intended for display to an end-user.
0N/A The name might not be unique.
0N/A </description>
0N/A </param>
0N/A <param id="address">
0N/A <vmbuf><void/></vmbuf>
0N/A <description>
0N/A Native address of the code
0N/A </description>
0N/A </param>
0N/A <param id="length">
0N/A <jint/>
0N/A <description>
0N/A Length in bytes of the code
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Data Dump Request"
0N/A id="DataDumpRequest" const="JVMTI_EVENT_DATA_DUMP_REQUEST" num="71">
0N/A <description>
0N/A Sent by the VM to request the agent to dump its data. This
0N/A is just a hint and the agent need not react to this event.
0N/A This is useful for processing command-line signals from users. For
0N/A example, in the Java 2 SDK a CTRL-Break on Win32 and a CTRL-\ on Solaris
0N/A causes the VM to send this event to the agent.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Monitor Contended Enter"
0N/A id="MonitorContendedEnter" const="JVMTI_EVENT_MONITOR_CONTENDED_ENTER" filtered="thread" num="75">
0N/A <description>
0N/A Sent when a thread is attempting to enter a Java programming language
0N/A monitor already acquired by another thread.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_monitor_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A JNI local reference to the thread
0N/A attempting to enter the monitor
0N/A </description>
0N/A </param>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A JNI local reference to the monitor
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Monitor Contended Entered"
0N/A id="MonitorContendedEntered" const="JVMTI_EVENT_MONITOR_CONTENDED_ENTERED" filtered="thread" num="76">
0N/A <description>
0N/A Sent when a thread enters a Java programming language
0N/A monitor after waiting for it to be released by another thread.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_monitor_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A JNI local reference to the thread entering
0N/A the monitor
0N/A </description>
0N/A </param>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A JNI local reference to the monitor
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Monitor Wait"
0N/A id="MonitorWait" const="JVMTI_EVENT_MONITOR_WAIT" filtered="thread" num="73">
0N/A <description>
0N/A Sent when a thread is about to wait on an object.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_monitor_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A JNI local reference to the thread about to wait
0N/A </description>
0N/A </param>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A JNI local reference to the monitor
0N/A </description>
0N/A </param>
0N/A <param id="timeout">
0N/A <jlong/>
0N/A <description>
0N/A The number of milliseconds the thread will wait
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Monitor Waited"
0N/A id="MonitorWaited" const="JVMTI_EVENT_MONITOR_WAITED" filtered="thread" num="74">
0N/A <description>
0N/A Sent when a thread finishes waiting on an object.
0N/A </description>
0N/A <origin>jvmpi</origin>
0N/A <capabilities>
0N/A <required id="can_generate_monitor_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A JNI local reference to the thread that was finished waiting
0N/A </description>
0N/A </param>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A JNI local reference to the monitor.
0N/A </description>
0N/A </param>
0N/A <param id="timed_out">
0N/A <jboolean/>
0N/A <description>
0N/A True if the monitor timed out
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Resource Exhausted"
0N/A id="ResourceExhausted" const="JVMTI_EVENT_RESOURCE_EXHAUSTED" num="80"
0N/A since="1.1">
0N/A <description>
0N/A Sent when a VM resource needed by a running application has been exhausted.
0N/A Except as required by the optional capabilities, the set of resources
0N/A which report exhaustion is implementation dependent.
0N/A <p/>
0N/A The following bit flags define the properties of the resource exhaustion:
0N/A <constants id="jvmtiResourceExhaustionFlags"
0N/A label="Resource Exhaustion Flags"
0N/A kind="bits"
0N/A since="1.1">
0N/A <constant id="JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR" num="0x0001">
0N/A After this event returns, the VM will throw a
0N/A <code>java.lang.OutOfMemoryError</code>.
0N/A </constant>
0N/A <constant id="JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP" num="0x0002">
0N/A The VM was unable to allocate memory from the <tm>Java</tm>
0N/A platform <i>heap</i>.
0N/A The <i>heap</i> is the runtime
0N/A data area from which memory for all class instances and
0N/A arrays are allocated.
0N/A </constant>
0N/A <constant id="JVMTI_RESOURCE_EXHAUSTED_THREADS" num="0x0004">
0N/A The VM was unable to create a thread.
0N/A </constant>
0N/A </constants>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <capability id="can_generate_resource_exhaustion_heap_events">
0N/A Can generate events when the VM is unable to allocate memory from the
0N/A <internallink id="JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP">heap</internallink>.
0N/A </capability>
0N/A <capability id="can_generate_resource_exhaustion_threads_events">
0N/A Can generate events when the VM is unable to
0N/A <internallink id="JVMTI_RESOURCE_EXHAUSTED_THREADS">create
0N/A a thread</internallink>.
0N/A </capability>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="flags">
0N/A <jint/>
0N/A <description>
0N/A Flags defining the properties of the of resource exhaustion
0N/A as specified by the
0N/A <internallink id="jvmtiResourceExhaustionFlags">Resource
0N/A Exhaustion Flags</internallink>.
0N/A </description>
0N/A </param>
0N/A <param id="reserved">
0N/A <vmbuf><void/></vmbuf>
0N/A <description>
0N/A Reserved.
0N/A </description>
0N/A </param>
0N/A <param id="description">
0N/A <vmbuf><char/></vmbuf>
0N/A <description>
0N/A Description of the resource exhaustion, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="VM Object Allocation"
0N/A id="VMObjectAlloc" const="JVMTI_EVENT_VM_OBJECT_ALLOC" num="84">
0N/A <description>
0N/A Sent when a method causes the virtual machine to allocate an
0N/A Object visible to Java programming language code and the
0N/A allocation is not detectable by other intrumentation mechanisms.
0N/A Generally object allocation should be detected by instrumenting
0N/A the bytecodes of allocating methods.
0N/A Object allocation generated in native code by JNI function
0N/A calls should be detected using
0N/A <internallink id="jniIntercept">JNI function interception</internallink>.
0N/A Some methods might not have associated bytecodes and are not
0N/A native methods, they instead are executed directly by the
0N/A VM. These methods should send this event.
0N/A Virtual machines which are incapable of bytecode instrumentation
0N/A for some or all of their methods can send this event.
0N/A <p/>
0N/A Typical examples where this event might be sent:
0N/A <ul>
0N/A <li>Reflection -- for example, <code>java.lang.Class.newInstance()</code></li>
0N/A <li>Methods not represented by bytecodes -- for example, VM intrinsics and
0N/A J2ME preloaded classes</li>
0N/A </ul>
0N/A Cases where this event would not be generated:
0N/A <ul>
0N/A <li>Allocation due to bytecodes -- for example, the <code>new</code>
0N/A and <code>newarray</code> VM instructions</li>
0N/A <li>Allocation due to JNI function calls -- for example,
0N/A <code>AllocObject</code></li>
0N/A <li>Allocations during VM initialization</li>
0N/A <li>VM internal objects</li>
0N/A </ul>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_generate_vm_object_alloc_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="jni_env">
0N/A <outptr>
0N/A <struct>JNIEnv</struct>
0N/A </outptr>
0N/A <description>
0N/A The JNI environment of the event (current) thread
0N/A </description>
0N/A </param>
0N/A <param id="thread">
0N/A <jthread/>
0N/A <description>
0N/A Thread allocating the object.
0N/A </description>
0N/A </param>
0N/A <param id="object">
0N/A <jobject/>
0N/A <description>
0N/A JNI local reference to the object that was allocated
0N/A </description>
0N/A </param>
0N/A <param id="object_klass">
0N/A <jclass/>
0N/A <description>
0N/A JNI local reference to the class of the object
0N/A </description>
0N/A </param>
0N/A <param id="size">
0N/A <jlong/>
0N/A <description>
0N/A Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Object Free"
0N/A id="ObjectFree" const="JVMTI_EVENT_OBJECT_FREE" num="83">
0N/A <description>
0N/A An Object Free event is sent when the garbage collector frees an object.
0N/A Events are only sent for tagged objects--see
0N/A <internallink id="Heap">heap functions</internallink>.
0N/A <p/>
0N/A The event handler must not use JNI functions and
0N/A must not use <jvmti/> functions except those which
0N/A specifically allow such use (see the raw monitor, memory management,
0N/A and environment local storage functions).
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_generate_object_free_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="tag">
0N/A <jlong/>
0N/A <description>
0N/A The freed object's tag
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Garbage Collection Start"
0N/A id="GarbageCollectionStart" const="JVMTI_EVENT_GARBAGE_COLLECTION_START" num="81">
0N/A <description>
2010N/A A Garbage Collection Start event is sent when a
2010N/A garbage collection pause begins.
0N/A Only stop-the-world collections are reported--that is, collections during
0N/A which all threads cease to modify the state of the Java virtual machine.
0N/A This means that some collectors will never generate these events.
0N/A This event is sent while the VM is still stopped, thus
0N/A the event handler must not use JNI functions and
0N/A must not use <jvmti/> functions except those which
0N/A specifically allow such use (see the raw monitor, memory management,
0N/A and environment local storage functions).
0N/A <p/>
0N/A This event is always sent as a matched pair with
0N/A <eventlink id="GarbageCollectionFinish"/>
0N/A (assuming both events are enabled) and no garbage collection
0N/A events will occur between them.
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_generate_garbage_collection_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <event label="Garbage Collection Finish"
0N/A id="GarbageCollectionFinish" const="JVMTI_EVENT_GARBAGE_COLLECTION_FINISH" num="82">
0N/A <description>
2010N/A A Garbage Collection Finish event is sent when a
2010N/A garbage collection pause ends.
0N/A This event is sent while the VM is still stopped, thus
0N/A the event handler must not use JNI functions and
0N/A must not use <jvmti/> functions except those which
0N/A specifically allow such use (see the raw monitor, memory management,
0N/A and environment local storage functions).
0N/A <p/>
0N/A Some agents may need to do post garbage collection operations that
0N/A require the use of the disallowed <jvmti/> or JNI functions. For these
0N/A cases an agent thread can be created which waits on a raw monitor,
0N/A and the handler for the Garbage Collection Finish event simply
0N/A notifies the raw monitor
0N/A <p/>
0N/A This event is always sent as a matched pair with
0N/A <eventlink id="GarbageCollectionStart"/> (assuming both events are enabled).
0N/A <issue>
0N/A The most important use of this event is to provide timing information,
0N/A and thus additional information is not required. However,
0N/A information about the collection which is "free" should be included -
0N/A what that information is needs to be determined.
0N/A </issue>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A <required id="can_generate_garbage_collection_events"></required>
0N/A </capabilities>
0N/A <parameters>
0N/A </parameters>
0N/A </event>
0N/A
0N/A <elide>
0N/A <event label="Verbose Output" phase="any"
0N/A id="VerboseOutput" const="JVMTI_EVENT_VERBOSE_OUTPUT" num="85">
0N/A <description>
0N/A Send verbose messages as strings.
0N/A <issue>
0N/A This format is extremely fragile, as it can change with each
0N/A platform, collector and version. Alternatives include:
0N/A <ul>
0N/A <li>building off Java programming language M and M APIs</li>
0N/A <li>XML</li>
0N/A <li>key/value pairs</li>
0N/A <li>removing it</li>
0N/A </ul>
0N/A </issue>
0N/A <issue>
0N/A Though this seemed trivial to implement.
0N/A In the RI it appears this will be quite complex.
0N/A </issue>
0N/A </description>
0N/A <origin>new</origin>
0N/A <capabilities>
0N/A </capabilities>
0N/A <parameters>
0N/A <param id="flag">
0N/A <enum>jvmtiVerboseFlag</enum>
0N/A <description>
0N/A Which verbose output is being sent.
0N/A </description>
0N/A </param>
0N/A <param id="message">
0N/A <vmbuf><char/></vmbuf>
0N/A <description>
0N/A Message text, encoded as a
0N/A <internallink id="mUTF">modified UTF-8</internallink> string.
0N/A </description>
0N/A </param>
0N/A </parameters>
0N/A </event>
0N/A </elide>
0N/A
0N/A</eventsection>
0N/A
0N/A<datasection>
0N/A <intro>
0N/A <jvmti/> extends the data types defined by JNI.
0N/A </intro>
0N/A <basetypes id="jniTypes" label="JNI Types Used in the JVM Tool Interface">
0N/A <basetype id="jboolean">
0N/A <description>
0N/A Holds a Java programming language <code>boolean</code>.
0N/A Unsigned 8 bits.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jint">
0N/A <description>
0N/A Holds a Java programming language <code>int</code>.
0N/A Signed 32 bits.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jlong">
0N/A <description>
0N/A Holds a Java programming language <code>long</code>.
0N/A Signed 64 bits.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jfloat">
0N/A <description>
0N/A Holds a Java programming language <code>float</code>.
0N/A 32 bits.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jdouble">
0N/A <description>
0N/A Holds a Java programming language <code>double</code>.
0N/A 64 bits.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jobject">
0N/A <description>
0N/A Holds a Java programming language object.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jclass">
0N/A <description>
0N/A Holds a Java programming language class.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jvalue">
0N/A <description>
0N/A Is a union of all primitive types and <code>jobject</code>. Thus, holds any Java
0N/A programming language value.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jfieldID">
0N/A <description>
0N/A Identifies a Java programming language field.
0N/A <code>jfieldID</code>s returned by <jvmti/> functions and events may be
0N/A safely stored.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jmethodID">
0N/A <description>
0N/A Identifies a Java programming language method, initializer, or constructor.
0N/A <code>jmethodID</code>s returned by <jvmti/> functions and events may be
0N/A safely stored. However, if the class is unloaded, they become invalid
0N/A and must not be used.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="JNIEnv">
0N/A <description>
0N/A Pointer to the JNI function table. Pointer to this (<code>JNIEnv *</code>)
0N/A is a JNI environment.
0N/A </description>
0N/A </basetype>
0N/A </basetypes>
0N/A
0N/A <basetypes id="jvmtiTypes" label="JVM Tool Interface Base Types">
0N/A <basetype id="jvmtiEnv">
0N/A <description>
0N/A The <jvmti/> <internallink id="environments">environment</internallink> pointer.
0N/A See the <internallink id="FunctionSection">Function Section</internallink>.
0N/A <code>jvmtiEnv</code> points to the
0N/A <internallink id="FunctionTable">function table</internallink> pointer.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jthread">
0N/A <definition>typedef jobject jthread;</definition>
0N/A <description>
0N/A Subtype of <datalink id="jobject"></datalink> that holds a thread.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jthreadGroup">
0N/A <definition>typedef jobject jthreadGroup;</definition>
0N/A <description>
0N/A Subtype of <datalink id="jobject"></datalink> that holds a thread group.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jlocation">
0N/A <definition>typedef jlong jlocation;</definition>
0N/A <description>
0N/A A 64 bit value, representing a monotonically increasing
0N/A executable position within a method.
0N/A <code>-1</code> indicates a native method.
0N/A See <functionlink id="GetJLocationFormat"></functionlink> for the format on a
0N/A given VM.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jrawMonitorID">
0N/A <definition>struct _jrawMonitorID;
0N/Atypedef struct _jrawMonitorID *jrawMonitorID;</definition>
0N/A <description>
0N/A A raw monitor.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jvmtiError">
0N/A <description>
0N/A Holds an error return code.
0N/A See the <internallink id="ErrorSection">Error section</internallink> for possible values.
0N/A <example>
0N/Atypedef enum {
0N/A JVMTI_ERROR_NONE = 0,
0N/A JVMTI_ERROR_INVALID_THREAD = 10,
0N/A ...
0N/A} jvmtiError;
0N/A</example>
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jvmtiEvent">
0N/A <description>
0N/A An identifier for an event type.
0N/A See the <internallink id="EventSection">Event section</internallink> for possible values.
0N/A It is guaranteed that future versions of this specification will
0N/A never assign zero as an event type identifier.
0N/A<example>
0N/Atypedef enum {
0N/A JVMTI_EVENT_SINGLE_STEP = 1,
0N/A JVMTI_EVENT_BREAKPOINT = 2,
0N/A ...
0N/A} jvmtiEvent;
0N/A</example>
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jvmtiEventCallbacks">
0N/A <description>
0N/A The callbacks used for events.
0N/A<example>
0N/Atypedef struct {
0N/A jvmtiEventVMInit VMInit;
0N/A jvmtiEventVMDeath VMDeath;
0N/A ...
0N/A} jvmtiEventCallbacks;
0N/A</example>
0N/A See <internallink id="jvmtiEventCallbacks">event callbacks</internallink>
0N/A for the complete structure.
0N/A <p/>
0N/A Where, for example, the VM initialization callback is defined:
0N/A<example>
0N/Atypedef void (JNICALL *jvmtiEventVMInit)
0N/A (jvmtiEnv *jvmti_env,
0N/A JNIEnv* jni_env,
0N/A jthread thread);
0N/A</example>
0N/A See the individual events for the callback function definition.
0N/A </description>
0N/A </basetype>
0N/A <basetype id="jniNativeInterface">
0N/A <definition>typedef struct JNINativeInterface_ jniNativeInterface;</definition>
0N/A <description>
0N/A Typedef for the JNI function table <code>JNINativeInterface</code>
0N/A defined in the
0N/A <externallink id="http://java.sun.com/javase/6/docs/guide/jni/spec/functions.html#wp23720">JNI Specification</externallink>.
0N/A The JNI reference implementation defines this with an underscore.
0N/A </description>
0N/A </basetype>
0N/A </basetypes>
0N/A
0N/A</datasection>
0N/A
0N/A<issuessection label="Issues">
0N/A <intro id="suspendRequired" label="Resolved Issue: Suspend - Required or Automatic">
0N/A JVMDI requires that the agent suspend threads before calling
0N/A certain sensitive functions. JVMPI requires garbage collection to be
0N/A disabled before calling certain sensitive functions.
0N/A It was suggested that rather than have this requirement, that
0N/A VM place itself in a suitable state before performing an
0N/A operation. This makes considerable sense since each VM
0N/A knows its requirements and can most easily arrange a
0N/A safe state.
0N/A <p/>
0N/A The ability to externally suspend/resume threads will, of
0N/A course, remain. The ability to enable/disable garbage collection will not.
0N/A <p/>
0N/A This issue is resolved--suspend will not
0N/A be required. The spec has been updated to reflect this.
0N/A </intro>
0N/A
0N/A <intro id="stackSampling" label="Resolved Issue: Call Stack Sampling">
0N/A There are a variety of approaches to sampling call stacks.
0N/A The biggest bifurcation is between VM controlled and agent
0N/A controlled.
0N/A <p/>
0N/A This issue is resolved--agent controlled
0N/A sampling will be the approach.
0N/A </intro>
0N/A
0N/A <intro id="threadRepresentation" label="Resolved Issue: Thread Representation">
0N/A JVMDI represents threads as jthread. JVMPI primarily
0N/A uses JNIEnv* to represent threads.
0N/A <p/>
0N/A The Expert Group has chosen jthread as the representation
0N/A for threads in <jvmti/>.
0N/A JNIEnv* is sent by
0N/A events since it is needed to JNI functions. JNIEnv, per the
0N/A JNI spec, are not supposed to be used outside their thread.
0N/A </intro>
0N/A
0N/A <intro id="design" label="Resolved Issue: Method Representation">
0N/A The JNI spec allows an implementation to depend on jclass/jmethodID
0N/A pairs, rather than simply a jmethodID, to reference a method.
0N/A JVMDI, for consistency, choose the same representation.
0N/A JVMPI, however, specifies that a jmethodID alone maps to a
0N/A method. Both of the Sun <tm>J2SE</tm> virtual machines (Classic and <tm>HotSpot</tm>) store
0N/A pointers in jmethodIDs, and as a result, a jmethodID is sufficient.
0N/A In fact, any JVM implementation that supports JVMPI must have
0N/A such a representation.
0N/A <jvmti/> will use jmethodID as a unique representation of a method
0N/A (no jclass is used).
0N/A There should be efficiency gains, particularly in
0N/A functionality like stack dumping, to this representation.
0N/A <p/>
0N/A Note that fields were not used in JVMPI and that the access profile
0N/A of fields differs from methods--for implementation efficiency
0N/A reasons, a jclass/jfieldID pair will still be needed for field
0N/A reference.
0N/A </intro>
0N/A
0N/A <intro id="localReferenceIssue" label="Resolved Issue: Local References">
0N/A Functions return local references.
0N/A </intro>
0N/A
0N/A <intro id="frameRep" label="Resolved Issue: Representation of frames">
0N/A In JVMDI, a frame ID is used to represent a frame. Problem with this
0N/A is that a VM must track when a frame becomes invalid, a far better
0N/A approach, and the one used in <jvmti/>, is to reference frames by depth.
0N/A </intro>
0N/A
0N/A <intro id="requiredCapabilities" label="Issue: Required Capabilities">
0N/A Currently, having a required capabilities means that the functionality
0N/A is optional. Capabilities are useful even for required functionality
0N/A since they can inform the VM is needed set-up. Thus, there should be
0N/A a set of capabilities that a conformant implementation must provide
0N/A (if requested during Agent_OnLoad).
0N/A </intro>
0N/A
0N/A <intro id="taghint" label="Proposal: add tag hint function">
0N/A A hint of the percentage of objects that will be tagged would
0N/A help the VM pick a good implementation.
0N/A </intro>
0N/A
0N/A <intro id="moreMonitorQueries" label="Request: More Monitor Quires">
0N/A How difficult or easy would be to extend the monitor_info category to include
0N/A <pre>
0N/A - current number of monitors
0N/A - enumeration of monitors
0N/A - enumeration of threads waiting on a given monitor
0N/A </pre>
0N/A The reason for my question is the fact that current get_monitor_info support
0N/A requires the agent to specify a given thread to get the info which is probably
0N/A OK in the profiling/debugging space, while in the monitoring space the agent
0N/A could be watching the monitor list and then decide which thread to ask for
0N/A the info. You might ask why is this important for monitoring .... I think it
0N/A can aid in the detection/prediction of application contention caused by hot-locks.
0N/A </intro>
0N/A</issuessection>
0N/A
0N/A<changehistory id="ChangeHistory" update="09/05/07">
0N/A <intro>
0N/A The <jvmti/> specification is an evolving document with major, minor,
0N/A and micro version numbers.
0N/A A released version of the specification is uniquely identified
0N/A by its major and minor version.
0N/A The functions, events, and capabilities in this specification
0N/A indicate a "Since" value which is the major and minor version in
0N/A which it was introduced.
0N/A The version of the specification implemented by the VM can
0N/A be retrieved at runtime with the <functionlink id="GetVersionNumber"/>
0N/A function.
0N/A </intro>
0N/A <change date="14 Nov 2002">
0N/A Converted to XML document.
0N/A </change>
0N/A <change date="14 Nov 2002">
0N/A Elided heap dump functions (for now) since what was there
0N/A was wrong.
0N/A </change>
0N/A <change date="18 Nov 2002">
0N/A Added detail throughout.
0N/A </change>
0N/A <change date="18 Nov 2002">
0N/A Changed JVMTI_THREAD_STATUS_RUNNING to JVMTI_THREAD_STATUS_RUNNABLE.
0N/A </change>
0N/A <change date="19 Nov 2002">
0N/A Added AsyncGetStackTrace.
0N/A </change>
0N/A <change date="19 Nov 2002">
0N/A Added jframeID return to GetStackTrace.
0N/A </change>
0N/A <change date="19 Nov 2002">
0N/A Elided GetCurrentFrame and GetCallingFrame functions (for now) since what was there
0N/A since they are redundant with GetStackTrace.
0N/A </change>
0N/A <change date="19 Nov 2002">
0N/A Elided ClearAllBreakpoints since it has always been redundant.
0N/A </change>
0N/A <change date="19 Nov 2002">
0N/A Added GetSystemProperties.
0N/A </change>
0N/A <change date="19 Nov 2002">
0N/A Changed the thread local storage functions to use jthread.
0N/A </change>
0N/A <change date="20 Nov 2002">
0N/A Added GetJLocationFormat.
0N/A </change>
0N/A <change date="22 Nov 2002">
0N/A Added events and introductory text.
0N/A </change>
0N/A <change date="22 Nov 2002">
0N/A Cross reference type and constant definitions.
0N/A </change>
0N/A <change date="24 Nov 2002">
0N/A Added DTD.
0N/A </change>
0N/A <change date="24 Nov 2002">
0N/A Added capabilities function section.
0N/A </change>
0N/A <change date="29 Nov 2002">
0N/A Assign capabilities to each function and event.
0N/A </change>
0N/A <change date="29 Nov 2002">
0N/A Add <internallink id="jniIntercept">JNI interception functions</internallink>.
0N/A </change>
0N/A <change date="30 Nov 2002">
0N/A Auto generate SetEventNotificationMode capabilities.
0N/A </change>
0N/A <change date="30 Nov 2002">
0N/A Add <eventlink id="VMObjectAlloc"></eventlink> event.
0N/A </change>
0N/A <change date="30 Nov 2002">
0N/A Add <eventlink id="DynamicCodeGenerated"></eventlink> event.
0N/A </change>
0N/A <change date="30 Nov 2002">
0N/A Add const to declarations.
0N/A </change>
0N/A <change date="30 Nov 2002">
0N/A Change method exit and frame pop to send on exception.
0N/A </change>
0N/A <change date="1 Dec 2002">
0N/A Add ForceGarbageCollection.
0N/A </change>
0N/A <change date="2 Dec 2002">
0N/A Redo Xrun section; clarify GetStackTrace and add example;
0N/A Fix width problems; use "agent" consistently.
0N/A </change>
0N/A <change date="8 Dec 2002">
0N/A Remove previous start-up intro.
0N/A Add <internallink id="environments"><jvmti/> Environments</internallink>
0N/A section.
0N/A </change>
0N/A <change date="8 Dec 2002">
0N/A Add <functionlink id="DisposeEnvironment"></functionlink>.
0N/A </change>
0N/A <change date="9 Dec 2002">
0N/A Numerous minor updates.
0N/A </change>
0N/A <change date="15 Dec 2002">
0N/A Add heap profiling functions added:
0N/A get/set annotation, iterate live objects/heap.
0N/A Add heap profiling functions place holder added:
0N/A heap roots.
0N/A Heap profiling event added: object free.
0N/A Heap profiling event redesigned: vm object allocation.
0N/A Heap profiling event placeholders added: garbage collection start/finish.
0N/A Native method bind event added.
0N/A </change>
0N/A <change date="19 Dec 2002">
0N/A Revamp suspend/resume functions.
0N/A Add origin information with jvmdi tag.
0N/A Misc fixes.
0N/A </change>
0N/A <change date="24 Dec 2002">
0N/A Add semantics to types.
0N/A </change>
0N/A <change date="27 Dec 2002">
0N/A Add local reference section.
0N/A Autogenerate parameter descriptions from types.
0N/A </change>
0N/A <change date="28 Dec 2002">
0N/A Document that RunAgentThread sends threadStart.
0N/A </change>
0N/A <change date="29 Dec 2002">
0N/A Remove redundant local ref and dealloc warning.
0N/A Convert GetRawMonitorName to allocated buffer.
0N/A Add GenerateEvents.
0N/A </change>
0N/A <change date="30 Dec 2002">
0N/A Make raw monitors a type and rename to "jrawMonitorID".
0N/A </change>
0N/A <change date="1 Jan 2003">
0N/A Include origin information.
0N/A Clean-up JVMDI issue references.
0N/A Remove Deallocate warnings which are now automatically generated.
0N/A </change>
0N/A <change date="2 Jan 2003">
0N/A Fix representation issues for jthread.
0N/A </change>
0N/A <change date="3 Jan 2003">
0N/A Make capabilities buffered out to 64 bits - and do it automatically.
0N/A </change>
0N/A <change date="4 Jan 2003">
0N/A Make constants which are enumeration into enum types.
0N/A Parameters now of enum type.
0N/A Clean-up and index type section.
0N/A Replace remaining datadef entities with callback.
0N/A </change>
0N/A <change date="7 Jan 2003">
0N/A Correct GenerateEvents description.
0N/A More internal semantics work.
0N/A </change>
0N/A <change date="9 Jan 2003">
0N/A Replace previous GetSystemProperties with two functions
0N/A which use allocated information instead fixed.
0N/A Add SetSystemProperty.
0N/A More internal semantics work.
0N/A </change>
0N/A <change date="12 Jan 2003">
0N/A Add varargs to end of SetEventNotificationMode.
0N/A </change>
0N/A <change date="20 Jan 2003">
0N/A Finish fixing spec to reflect that alloc sizes are jlong.
0N/A </change>
0N/A <change date="22 Jan 2003">
0N/A Allow NULL as RunAgentThread arg.
0N/A </change>
0N/A <change date="22 Jan 2003">
0N/A Fixed names to standardized naming convention
0N/A Removed AsyncGetStackTrace.
0N/A </change>
0N/A <change date="29 Jan 2003">
0N/A Since we are using jthread, removed GetThread.
0N/A </change>
0N/A <change date="31 Jan 2003">
0N/A Change GetFieldName to allow NULLs like GetMethodName.
0N/A </change>
0N/A <change date="29 Feb 2003" version="v40">
0N/A Rewrite the introductory text, adding sections on
0N/A start-up, environments and bytecode instrumentation.
0N/A Change the command line arguments per EG discussions.
0N/A Add an introduction to the capabilities section.
0N/A Add the extension mechanism category and functions.
0N/A Mark for deletion, but clarified anyhow, SuspendAllThreads.
0N/A Rename IterateOverLiveObjects to IterateOverReachableObjects and
0N/A change the text accordingly.
0N/A Clarify IterateOverHeap.
0N/A Clarify CompiledMethodLoad.
0N/A Discuss prerequisite state for Calling Functions.
0N/A Clarify SetAllocationHooks.
0N/A Added issues ("To be resolved:") through-out.
0N/A And so on...
0N/A </change>
0N/A <change date="6 Mar 2003" version="v41">
0N/A Remove struct from the call to GetOwnedMonitorInfo.
0N/A Automatically generate most error documentation, remove
0N/A (rather broken) hand written error doc.
0N/A Better describe capability use (empty initial set).
0N/A Add min value to jint params.
0N/A Remove the capability can_access_thread_local_storage.
0N/A Rename error JVMTI_ERROR_NOT_IMPLEMENTED to JVMTI_ERROR_MUST_POSSESS_CAPABILITY;
0N/A same for *NOT_IMPLEMENTED.
0N/A Description fixes.
0N/A </change>
0N/A <change date="8 Mar 2003" version="v42">
0N/A Rename GetClassSignature to GetClassName.
0N/A Rename IterateOverClassObjects to IterateOverInstancesOfClass.
0N/A Remove GetMaxStack (operand stack isn't used in <jvmti/>).
0N/A Description fixes: define launch-time, remove native frame pop
0N/A from PopFrame, and assorted clarifications.
0N/A </change>
0N/A <change date="8 Mar 2003" version="v43">
0N/A Fix minor editing problem.
0N/A </change>
0N/A <change date="10 Mar 2003" version="v44">
0N/A Add phase information.
0N/A Remap (compact) event numbers.
0N/A </change>
0N/A <change date="11 Mar 2003" version="v45">
0N/A More phase information - allow "any".
0N/A Elide raw monitor queries and events.
0N/A Minor description fixes.
0N/A </change>
0N/A <change date="12 Mar 2003" version="v46">
0N/A Add GetPhase.
0N/A Use "phase" through document.
0N/A Elide GetRawMonitorName.
0N/A Elide GetObjectMonitors.
0N/A </change>
0N/A <change date="12 Mar 2003" version="v47">
0N/A Fixes from link, XML, and spell checking.
0N/A Auto-generate the callback structure.
0N/A </change>
0N/A <change date="13 Mar 2003" version="v48">
0N/A One character XML fix.
0N/A </change>
0N/A <change date="13 Mar 2003" version="v49">
0N/A Change function parameter names to be consistent with
0N/A event parameters (fooBarBaz becomes foo_bar_baz).
0N/A </change>
0N/A <change date="14 Mar 2003" version="v50">
0N/A Fix broken link. Fix thread markers.
0N/A </change>
0N/A <change date="14 Mar 2003" version="v51">
0N/A Change constants so they are under 128 to workaround
0N/A compiler problems.
0N/A </change>
0N/A <change date="23 Mar 2003" version="v52">
0N/A Overhaul capabilities. Separate GetStackTrace into
0N/A GetStackTrace and GetStackFrames.
0N/A </change>
0N/A <change date="8 Apr 2003" version="v54">
0N/A Use depth instead of jframeID to reference frames.
0N/A Remove the now irrelevant GetCurrentFrame, GetCallerFrame and GetStackFrames.
0N/A Remove frame arg from events.
0N/A </change>
0N/A <change date="9 Apr 2003" version="v55">
0N/A Remove GetObjectWithAnnotation since tests show bufferred approach more efficient.
0N/A Add missing annotation_count to GetObjectsWithAnnotations
0N/A </change>
0N/A <change date="10 Apr 2003" version="v56">
0N/A Remove confusing parenthetical statement in GetObjectsWithAnnotations
0N/A </change>
0N/A <change date="13 Apr 2003" version="v58">
0N/A Replace jclass/jmethodID representation of method with simply jmethodID;
0N/A Pass JvmtiEnv* as first arg of every event; remove JNIEnv* where inappropriate.
0N/A Replace can_access_frames with can_access_local_variables; remove from purely stack access.
0N/A Use can_get_synthetic_attribute; fix description.
0N/A Clarify that zero length arrays must be deallocated.
0N/A Clarify RelinquishCapabilities.
0N/A Generalize JVMTI_ERROR_VM_DEAD to JVMTI_ERROR_WRONG_PHASE.
0N/A </change>
0N/A <change date="27 Apr 2003" version="v59">
0N/A Remove lingering indirect references to OBSOLETE_METHOD_ID.
0N/A </change>
0N/A <change date="4 May 2003" version="v60">
0N/A Allow DestroyRawMonitor during OnLoad.
0N/A </change>
0N/A <change date="7 May 2003" version="v61">
0N/A Added not monitor owner error return to DestroyRawMonitor.
0N/A </change>
0N/A <change date="13 May 2003" version="v62">
0N/A Clarify semantics of raw monitors.
0N/A Change flags on <code>GetThreadStatus</code>.
0N/A <code>GetClassLoader</code> return NULL for the bootstrap class loader.
0N/A Add <code>GetClassName</code> issue.
0N/A Define local variable signature.
0N/A Disallow zero in annotations array of <code>GetObjectsWithAnnotations</code>.
0N/A Remove over specification in <code>GetObjectsWithAnnotations</code>.
0N/A Elide <code>SetAllocationHooks</code>.
0N/A Elide <code>SuspendAllThreads</code>.
0N/A </change>
0N/A <change date="14 May 2003" version="v63">
0N/A Define the data type <code>jvmtiEventCallbacks</code>.
0N/A Zero length allocations return NULL.
0N/A Keep SetAllocationHooks in JVMDI, but remove from <jvmti/>.
0N/A Add JVMTI_THREAD_STATUS_FLAG_INTERRUPTED.
0N/A </change>
0N/A <change date="15 May 2003" version="v64">
0N/A Better wording, per review.
0N/A </change>
0N/A <change date="15 May 2003" version="v65">
0N/A First Alpha.
0N/A Make jmethodID and jfieldID unique, jclass not used.
0N/A </change>
0N/A <change date="27 May 2003" version="v66">
0N/A Fix minor XSLT errors.
0N/A </change>
0N/A <change date="13 June 2003" version="v67">
0N/A Undo making jfieldID unique (jmethodID still is).
0N/A </change>
0N/A <change date="17 June 2003" version="v68">
0N/A Changes per June 11th Expert Group meeting --
0N/A Overhaul Heap functionality: single callback,
0N/A remove GetHeapRoots, add reachable iterators,
0N/A and rename "annotation" to "tag".
0N/A NULL thread parameter on most functions is current
0N/A thread.
0N/A Add timers.
0N/A Remove ForceExit.
0N/A Add GetEnvironmentLocalStorage.
0N/A Add verbose flag and event.
0N/A Add AddToBootstrapClassLoaderSearch.
0N/A Update ClassFileLoadHook.
0N/A </change>
0N/A <change date="18 June 2003" version="v69">
0N/A Clean up issues sections.
0N/A Rename GetClassName back to GetClassSignature and
0N/A fix description.
0N/A Add generic signature to GetClassSignature,
0N/A GetFieldSignature, GetMethodSignature, and
0N/A GetLocalVariableTable.
0N/A Elide EstimateCostOfCapabilities.
0N/A Clarify that the system property functions operate
0N/A on the VM view of system properties.
0N/A Clarify Agent_OnLoad.
0N/A Remove "const" from JNIEnv* in events.
0N/A Add metadata accessors.
0N/A </change>
0N/A <change date="18 June 2003" version="v70">
0N/A Add start_depth to GetStackTrace.
0N/A Move system properties to a new category.
0N/A Add GetObjectSize.
0N/A Remove "X" from command line flags.
0N/A XML, HTML, and spell check corrections.
0N/A </change>
0N/A <change date="19 June 2003" version="v71">
0N/A Fix JVMTI_HEAP_ROOT_THREAD to be 6.
0N/A Make each synopsis match the function name.
0N/A Fix unclear wording.
0N/A </change>
0N/A <change date="26 June 2003" version="v72">
0N/A SetThreadLocalStorage and SetEnvironmentLocalStorage should allow value
0N/A to be set to NULL.
0N/A NotifyFramePop, GetFrameLocationm and all the local variable operations
0N/A needed to have their wording about frames fixed.
0N/A Grammar and clarity need to be fixed throughout.
0N/A Capitalization and puntuation need to be consistent.
0N/A Need micro version number and masks for accessing major, minor, and micro.
0N/A The error code lists should indicate which must be returned by
0N/A an implementation.
0N/A The command line properties should be visible in the properties functions.
0N/A Disallow popping from the current thread.
0N/A Allow implementations to return opaque frame error when they cannot pop.
0N/A The NativeMethodBind event should be sent during any phase.
0N/A The DynamicCodeGenerated event should be sent during any phase.
0N/A The following functions should be allowed to operate before VMInit:
0N/A Set/GetEnvironmentLocalStorage
0N/A GetMethodDeclaringClass
0N/A GetClassSignature
0N/A GetClassModifiers
0N/A IsInterface
0N/A IsArrayClass
0N/A GetMethodName
0N/A GetMethodModifiers
0N/A GetMaxLocals
0N/A GetArgumentsSize
0N/A GetLineNumberTable
0N/A GetMethodLocation
0N/A IsMethodNative
0N/A IsMethodSynthetic.
0N/A Other changes (to XSL):
0N/A Argument description should show asterisk after not before pointers.
0N/A NotifyFramePop, GetFrameLocationm and all the local variable operations
0N/A should hsve the NO_MORE_FRAMES error added.
0N/A Not alive threads should have a different error return than invalid thread.
0N/A </change>
0N/A <change date="7 July 2003" version="v73">
0N/A VerboseOutput event was missing message parameter.
0N/A Minor fix-ups.
0N/A </change>
0N/A <change date="14 July 2003" version="v74">
0N/A Technical Publications Department corrections.
0N/A Allow thread and environment local storage to be set to NULL.
0N/A </change>
0N/A <change date="23 July 2003" version="v75">
0N/A Use new Agent_OnLoad rather than overloaded JVM_OnLoad.
0N/A Add JNICALL to callbacks (XSL).
0N/A Document JNICALL requirement for both events and callbacks (XSL).
0N/A Restrict RedefineClasses to methods and attributes.
0N/A Elide the VerboseOutput event.
0N/A VMObjectAlloc: restrict when event is sent and remove method parameter.
0N/A Finish loose ends from Tech Pubs edit.
0N/A </change>
0N/A <change date="24 July 2003" version="v76">
0N/A Change ClassFileLoadHook event to send the class instead of a boolean of redefine.
0N/A </change>
0N/A <change date="24 July 2003" version="v77">
0N/A XML fixes.
0N/A Minor text clarifications and corrections.
0N/A </change>
0N/A <change date="24 July 2003" version="v78">
0N/A Remove GetExceptionHandlerTable and GetThrownExceptions from <jvmti/>.
0N/A Clarify that stack frames are JVM Spec frames.
0N/A Split can_get_source_info into can_get_source_file_name, can_get_line_numbers,
0N/A and can_get_source_debug_extension.
0N/A PopFrame cannot have a native calling method.
0N/A Removed incorrect statement in GetClassloaderClasses
2427N/A (see <vmspec chapter="4.4"/>).
0N/A </change>
0N/A <change date="24 July 2003" version="v79">
0N/A XML and text fixes.
0N/A Move stack frame description into Stack Frame category.
0N/A </change>
0N/A <change date="26 July 2003" version="v80">
0N/A Allow NULL (means bootstrap loader) for GetClassloaderClasses.
0N/A Add new heap reference kinds for references from classes.
0N/A Add timer information struct and query functions.
0N/A Add AvailableProcessors.
0N/A Rename GetOtherThreadCpuTime to GetThreadCpuTime.
0N/A Explicitly add JVMTI_ERROR_INVALID_THREAD and JVMTI_ERROR_THREAD_NOT_ALIVE
0N/A to SetEventNotification mode.
0N/A Add initial thread to the VM_INIT event.
0N/A Remove platform assumptions from AddToBootstrapClassLoaderSearch.
0N/A </change>
0N/A <change date="26 July 2003" version="v81">
0N/A Grammar and clarity changes per review.
0N/A </change>
0N/A <change date="27 July 2003" version="v82">
0N/A More grammar and clarity changes per review.
0N/A Add Agent_OnUnload.
0N/A </change>
0N/A <change date="28 July 2003" version="v83">
0N/A Change return type of Agent_OnUnload to void.
0N/A </change>
0N/A <change date="28 July 2003" version="v84">
0N/A Rename JVMTI_REFERENCE_ARRAY to JVMTI_REFERENCE_ARRAY_ELEMENT.
0N/A </change>
0N/A <change date="28 July 2003" version="v85">
0N/A Steal java.lang.Runtime.availableProcessors() wording for
0N/A AvailableProcessors().
0N/A Guarantee that zero will never be an event ID.
0N/A Remove some issues which are no longer issues.
0N/A Per review, rename and more completely document the timer
0N/A information functions.
0N/A </change>
0N/A <change date="29 July 2003" version="v86">
0N/A Non-spec visible change to XML controlled implementation:
0N/A SetThreadLocalStorage must run in VM mode.
0N/A </change>
0N/A <change date="5 August 2003" version="0.1.87">
0N/A Add GetErrorName.
0N/A Add varargs warning to jvmtiExtensionEvent.
0N/A Remove "const" on the jvmtiEnv* of jvmtiExtensionEvent.
0N/A Remove unused can_get_exception_info capability.
0N/A Pass jvmtiEnv* and JNIEnv* to the jvmtiStartFunction.
0N/A Fix jvmtiExtensionFunctionInfo.func declared type.
0N/A Extension function returns error code.
0N/A Use new version numbering.
0N/A </change>
0N/A <change date="5 August 2003" version="0.2.88">
0N/A Remove the ClassUnload event.
0N/A </change>
0N/A <change date="8 August 2003" version="0.2.89">
0N/A Heap reference iterator callbacks return an enum that
0N/A allows outgoing object references to be ignored.
0N/A Allow JNIEnv as a param type to extension events/functions.
0N/A </change>
0N/A <change date="15 August 2003" version="0.2.90">
0N/A Fix a typo.
0N/A </change>
0N/A <change date="2 September 2003" version="0.2.91">
0N/A Remove all metadata functions: GetClassMetadata,
0N/A GetFieldMetadata, and GetMethodMetadata.
0N/A </change>
0N/A <change date="1 October 2003" version="0.2.92">
0N/A Mark the functions Allocate. Deallocate, RawMonitor*,
0N/A SetEnvironmentLocalStorage, and GetEnvironmentLocalStorage
0N/A as safe for use in heap callbacks and GC events.
0N/A </change>
0N/A <change date="24 November 2003" version="0.2.93">
0N/A Add pass through opaque user data pointer to heap iterate
0N/A functions and callbacks.
0N/A In the CompiledMethodUnload event, send the code address.
0N/A Add GarbageCollectionOccurred event.
0N/A Add constant pool reference kind.
0N/A Mark the functions CreateRawMonitor and DestroyRawMonitor
0N/A as safe for use in heap callbacks and GC events.
0N/A Clarify: VMDeath, GetCurrentThreadCpuTimerInfo,
0N/A GetThreadCpuTimerInfo, IterateOverReachableObjects,
0N/A IterateOverObjectsReachableFromObject, GetTime and
0N/A JVMTI_ERROR_NULL_POINTER.
0N/A Add missing errors to: GenerateEvents and
0N/A AddToBootstrapClassLoaderSearch.
0N/A Fix description of ClassFileLoadHook name parameter.
0N/A In heap callbacks and GC/ObjectFree events, specify
0N/A that only explicitly allowed functions can be called.
0N/A Allow GetCurrentThreadCpuTimerInfo, GetCurrentThreadCpuTime,
0N/A GetTimerInfo, and GetTime during callback.
0N/A Allow calling SetTag/GetTag during the onload phase.
0N/A SetEventNotificationMode, add: error attempted inappropriate
0N/A thread level control.
0N/A Remove jvmtiExceptionHandlerEntry.
0N/A Fix handling of native methods on the stack --
0N/A location_ptr param of GetFrameLocation, remove
0N/A JVMTI_ERROR_OPAQUE_FRAME from GetFrameLocation,
0N/A jvmtiFrameInfo.location, and jlocation.
0N/A Remove typo (from JVMPI) implying that the MonitorWaited
0N/A event is sent on sleep.
0N/A </change>
0N/A <change date="25 November 2003" version="0.2.94">
0N/A Clarifications and typos.
0N/A </change>
0N/A <change date="3 December 2003" version="0.2.95">
0N/A Allow NULL user_data in heap iterators.
0N/A </change>
0N/A <change date="28 January 2004" version="0.2.97">
0N/A Add GetThreadState, deprecate GetThreadStatus.
0N/A </change>
0N/A <change date="29 January 2004" version="0.2.98">
0N/A INVALID_SLOT and TYPE_MISMATCH errors should be optional.
0N/A </change>
0N/A <change date="12 February 2004" version="0.2.102">
0N/A Remove MonitorContendedExit.
0N/A Added JNIEnv parameter to VMObjectAlloc.
0N/A Clarified definition of class_tag and referrer_index
0N/A parameters to heap callbacks.
0N/A </change>
0N/A <change date="16 Febuary 2004" version="0.2.103">
0N/A Document JAVA_TOOL_OPTIONS.
0N/A </change>
0N/A <change date="17 Febuary 2004" version="0.2.105">
0N/A Divide start phase into primordial and start.
0N/A Add VMStart event
0N/A Change phase associations of functions and events.
0N/A </change>
0N/A <change date="18 Febuary 2004" version="0.3.6">
0N/A Elide deprecated GetThreadStatus.
0N/A Bump minor version, subtract 100 from micro version
0N/A </change>
0N/A <change date="18 Febuary 2004" version="0.3.7">
0N/A Document that timer nanosecond values are unsigned.
0N/A Clarify text having to do with native methods.
0N/A </change>
0N/A <change date="19 Febuary 2004" version="0.3.8">
0N/A Fix typos.
0N/A Remove elided deprecated GetThreadStatus.
0N/A </change>
0N/A <change date="23 Febuary 2004" version="0.3.9">
0N/A Require NotifyFramePop to act on suspended threads.
0N/A </change>
0N/A <change date="24 Febuary 2004" version="0.3.10">
0N/A Add capabilities
0N/A (<internallink id="jvmtiCapabilities.can_redefine_any_class"
0N/A ><code>can_redefine_any_class</code></internallink>
0N/A and
0N/A <internallink id="jvmtiCapabilities.can_generate_all_class_hook_events"
0N/A ><code>can_generate_all_class_hook_events</code></internallink>)
0N/A and an error (<errorlink id="JVMTI_ERROR_UNMODIFIABLE_CLASS"></errorlink>)
0N/A which allow some classes to be unmodifiable.
0N/A </change>
0N/A <change date="28 Febuary 2004" version="0.3.11">
0N/A Add JVMTI_ERROR_MUST_POSSESS_CAPABILITY to SetEventNotificationMode.
0N/A </change>
0N/A <change date="8 March 2004" version="0.3.12">
0N/A Clarified CompiledMethodUnload so that it is clear the event
0N/A may be posted after the class has been unloaded.
0N/A </change>
0N/A <change date="5 March 2004" version="0.3.13">
0N/A Change the size parameter of VMObjectAlloc to jlong to match GetObjectSize.
0N/A </change>
0N/A <change date="13 March 2004" version="0.3.14">
0N/A Added guideline for the use of the JNI FindClass function in event
0N/A callback functions.
0N/A </change>
0N/A <change date="15 March 2004" version="0.3.15">
0N/A Add GetAllStackTraces and GetThreadListStackTraces.
0N/A </change>
0N/A <change date="19 March 2004" version="0.3.16">
0N/A ClassLoad and ClassPrepare events can be posted during start phase.
0N/A </change>
0N/A <change date="25 March 2004" version="0.3.17">
0N/A Add JVMTI_ERROR_NATIVE_METHOD to GetLineNumberTable, GetLocalVariableTable,
0N/A GetMaxLocals, GetArgumentsSize, GetMethodLocation, GetBytecodes.
0N/A </change>
0N/A <change date="29 March 2004" version="0.3.18">
0N/A Return the timer kind in the timer information structure.
0N/A </change>
0N/A <change date="31 March 2004" version="0.3.19">
0N/A Spec clarifications:
0N/A JVMTI_THREAD_STATE_IN_NATIVE might not include JNI or <jvmti/>.
0N/A ForceGarbageCollection does not run finalizers.
0N/A The context of the specification is the Java platform.
0N/A Warn about early instrumentation.
0N/A </change>
0N/A <change date="1 April 2004" version="0.3.20">
0N/A Refinements to the above clarifications and
0N/A Clarify that an error returned by Agent_OnLoad terminates the VM.
0N/A </change>
0N/A <change date="1 April 2004" version="0.3.21">
0N/A Array class creation does not generate a class load event.
0N/A </change>
0N/A <change date="7 April 2004" version="0.3.22">
0N/A Align thread state hierarchy more closely with java.lang.Thread.State.
0N/A </change>
0N/A <change date="12 April 2004" version="0.3.23">
0N/A Clarify the documentation of thread state.
0N/A </change>
0N/A <change date="19 April 2004" version="0.3.24">
0N/A Remove GarbageCollectionOccurred event -- can be done by agent.
0N/A </change>
0N/A <change date="22 April 2004" version="0.3.25">
0N/A Define "command-line option".
0N/A </change>
0N/A <change date="29 April 2004" version="0.3.26">
0N/A Describe the intended use of bytecode instrumentation.
0N/A Fix description of extension event first parameter.
0N/A </change>
0N/A <change date="30 April 2004" version="0.3.27">
0N/A Clarification and typos.
0N/A </change>
0N/A <change date="18 May 2004" version="0.3.28">
0N/A Remove DataDumpRequest event.
0N/A </change>
0N/A <change date="18 May 2004" version="0.3.29">
0N/A Clarify RawMonitorWait with zero timeout.
0N/A Clarify thread state after RunAgentThread.
0N/A </change>
0N/A <change date="24 May 2004" version="0.3.30">
0N/A Clean-up: fix bad/old links, etc.
0N/A </change>
0N/A <change date="30 May 2004" version="0.3.31">
0N/A Clarifications including:
0N/A All character strings are modified UTF-8.
0N/A Agent thread visibiity.
0N/A Meaning of obsolete method version.
0N/A Thread invoking heap callbacks,
0N/A </change>
0N/A <change date="1 June 2004" version="1.0.32">
0N/A Bump major.minor version numbers to "1.0".
0N/A </change>
0N/A <change date="2 June 2004" version="1.0.33">
0N/A Clarify interaction between ForceGarbageCollection
0N/A and ObjectFree.
0N/A </change>
0N/A <change date="6 June 2004" version="1.0.34">
0N/A Restrict AddToBootstrapClassLoaderSearch and
0N/A SetSystemProperty to the OnLoad phase only.
0N/A </change>
0N/A <change date="11 June 2004" version="1.0.35">
0N/A Fix typo in SetTag.
0N/A </change>
0N/A <change date="18 June 2004" version="1.0.36">
0N/A Fix trademarks.
0N/A Add missing parameter in example GetThreadState usage.
0N/A </change>
0N/A <change date="4 August 2004" version="1.0.37">
0N/A Copyright updates.
0N/A </change>
0N/A <change date="5 November 2004" version="1.0.38">
0N/A Add missing function table layout.
0N/A Add missing description of C++ member function format of functions.
0N/A Clarify that name in CFLH can be NULL.
0N/A Released as part of <tm>J2SE</tm> 5.0.
0N/A </change>
0N/A <change date="24 April 2005" version="1.1.47">
0N/A Bump major.minor version numbers to "1.1".
0N/A Add ForceEarlyReturn* functions.
0N/A Add GetOwnedMonitorStackDepthInfo function.
0N/A Add GetCurrentThread function.
0N/A Add "since" version marker.
0N/A Add AddToSystemClassLoaderSearch.
0N/A Allow AddToBootstrapClassLoaderSearch be used in live phase.
0N/A Fix historic rubbish in the descriptions of the heap_object_callback
0N/A parameter of IterateOverHeap and IterateOverInstancesOfClass functions;
0N/A disallow NULL for this parameter.
0N/A Clarify, correct and make consistent: wording about current thread,
0N/A opaque frames and insufficient number of frames in PopFrame.
0N/A Consistently use "current frame" rather than "topmost".
0N/A Clarify the JVMTI_ERROR_TYPE_MISMATCH errors in GetLocal* and SetLocal*
0N/A by making them compatible with those in ForceEarlyReturn*.
0N/A Many other clarifications and wording clean ups.
0N/A </change>
0N/A <change date="25 April 2005" version="1.1.48">
0N/A Add GetConstantPool.
0N/A Switch references to the first edition of the VM Spec, to the seconds edition.
0N/A </change>
0N/A <change date="26 April 2005" version="1.1.49">
0N/A Clarify minor/major version order in GetConstantPool.
0N/A </change>
0N/A <change date="26 April 2005" version="1.1.50">
0N/A Add SetNativeMethodPrefix and SetNativeMethodPrefixes.
0N/A Reassign GetOwnedMonitorStackDepthInfo to position 153.
0N/A Break out Class Loader Search in its own documentation category.
0N/A Deal with overly long lines in XML source.
0N/A </change>
0N/A <change date="29 April 2005" version="1.1.51">
0N/A Allow agents be started in the live phase.
0N/A Added paragraph about deploying agents.
0N/A </change>
0N/A <change date="30 April 2005" version="1.1.52">
0N/A Add specification description to SetNativeMethodPrefix(es).
0N/A Better define the conditions on GetConstantPool.
0N/A </change>
0N/A <change date="30 April 2005" version="1.1.53">
0N/A Break out the GetClassVersionNumber function from GetConstantPool.
0N/A Clean-up the references to the VM Spec.
0N/A </change>
0N/A <change date="1 May 2005" version="1.1.54">
0N/A Allow SetNativeMethodPrefix(es) in any phase.
0N/A Add clarifications about the impact of redefinition on GetConstantPool.
0N/A </change>
0N/A <change date="2 May 2005" version="1.1.56">
0N/A Various clarifications to SetNativeMethodPrefix(es).
0N/A </change>
0N/A <change date="2 May 2005" version="1.1.57">
0N/A Add missing performance warning to the method entry event.
0N/A </change>
0N/A <change date="5 May 2005" version="1.1.58">
0N/A Remove internal JVMDI support.
0N/A </change>
0N/A <change date="8 May 2005" version="1.1.59">
0N/A Add <functionlink id="RetransformClasses"/>.
0N/A Revamp the bytecode instrumentation documentation.
0N/A Change <functionlink id="IsMethodObsolete"/> to no longer
0N/A require the can_redefine_classes capability.
0N/A </change>
0N/A <change date="11 May 2005" version="1.1.63">
0N/A Clarifications for retransformation.
0N/A </change>
0N/A <change date="11 May 2005" version="1.1.64">
0N/A Clarifications for retransformation, per review.
0N/A Lock "retransformation (in)capable" at class load enable time.
0N/A </change>
0N/A <change date="4 June 2005" version="1.1.67">
0N/A Add new heap functionity which supports reporting primitive values,
0N/A allows setting the referrer tag, and has more powerful filtering:
0N/A FollowReferences, IterateThroughHeap, and their associated
0N/A callbacks, structs, enums, and constants.
0N/A </change>
0N/A <change date="4 June 2005" version="1.1.68">
0N/A Clarification.
0N/A </change>
0N/A <change date="6 June 2005" version="1.1.69">
0N/A FollowReferences, IterateThroughHeap: Put callbacks in a struct;
0N/A Add missing error codes; reduce bits in the visit control flags.
0N/A </change>
0N/A <change date="14 June 2005" version="1.1.70">
0N/A More on new heap functionity: spec clean-up per review.
0N/A </change>
0N/A <change date="15 June 2005" version="1.1.71">
0N/A More on new heap functionity: Rename old heap section to Heap (1.0).
0N/A </change>
0N/A <change date="21 June 2005" version="1.1.72">
0N/A Fix typos.
0N/A </change>
0N/A <change date="27 June 2005" version="1.1.73">
0N/A Make referrer info structure a union.
0N/A </change>
0N/A <change date="9 September 2005" version="1.1.74">
0N/A In new heap functions:
0N/A Add missing superclass reference kind.
0N/A Use a single scheme for computing field indexes.
0N/A Remove outdated references to struct based referrer info.
0N/A </change>
0N/A <change date="12 September 2005" version="1.1.75">
0N/A Don't callback during FollowReferences on frivolous java.lang.Object superclass.
0N/A </change>
0N/A <change date="13 September 2005" version="1.1.76">
0N/A In string primitive callback, length now Unicode length.
0N/A In array and string primitive callbacks, value now "const".
0N/A Note possible compiler impacts on setting JNI function table.
0N/A </change>
0N/A <change date="13 September 2005" version="1.1.77">
0N/A GetClassVersionNumbers() and GetConstantPool() should return
0N/A error on array or primitive class.
0N/A </change>
0N/A <change date="14 September 2005" version="1.1.78">
0N/A Grammar fixes.
0N/A </change>
0N/A <change date="26 September 2005" version="1.1.79">
0N/A Add IsModifiableClass query.
0N/A </change>
0N/A <change date="9 February 2006" version="1.1.81">
0N/A Add referrer_class_tag parameter to jvmtiHeapReferenceCallback.
0N/A </change>
0N/A <change date="13 February 2006" version="1.1.82">
0N/A Doc fixes: update can_redefine_any_class to include retransform.
0N/A Clarify that exception events cover all Throwables.
0N/A In GetStackTrace, no test is done for start_depth too big if start_depth is zero,
0N/A Clarify fields reported in Primitive Field Callback -- static vs instance.
0N/A Repair confusing names of heap types, including callback names.
0N/A Require consistent usage of stack depth in the face of thread launch methods.
0N/A Note incompatibility of <jvmti/> memory management with other systems.
0N/A </change>
0N/A <change date="14 February 2006" version="1.1.85">
0N/A Fix typos and missing renames.
0N/A </change>
0N/A <change date="13 March 2006" version="1.1.86">
0N/A Clarify that jmethodIDs and jfieldIDs can be saved.
0N/A Clarify that Iterate Over Instances Of Class includes subclasses.
0N/A </change>
0N/A <change date="14 March 2006" version="1.1.87">
0N/A Better phrasing.
0N/A </change>
0N/A <change date="16 March 2006" version="1.1.88">
0N/A Match the referrer_index for static fields in Object Reference Callback
0N/A with the Reference Implementation (and all other known implementations);
0N/A that is, make it match the definition for instance fields.
0N/A In GetThreadListStackTraces, add JVMTI_ERROR_INVALID_THREAD to cover
0N/A an invalid thread in the list; and specify that not started threads
0N/A return empty stacks.
0N/A </change>
0N/A <change date="17 March 2006" version="1.1.89">
0N/A Typo.
0N/A </change>
0N/A <change date="25 March 2006" version="1.1.90">
0N/A Typo.
0N/A </change>
0N/A <change date="6 April 2006" version="1.1.91">
0N/A Remove restrictions on AddToBootstrapClassLoaderSearch and
0N/A AddToSystemClassLoaderSearch.
0N/A </change>
0N/A <change date="1 May 2006" version="1.1.93">
0N/A Changed spec to return -1 for monitor stack depth for the
0N/A implementation which can not determine stack depth.
0N/A </change>
0N/A <change date="3 May 2006" version="1.1.94">
0N/A Corrections for readability and accuracy courtesy of Alan Pratt of IBM.
0N/A List the object relationships reported in FollowReferences.
0N/A </change>
0N/A <change date="5 May 2006" version="1.1.95">
0N/A Clarify the object relationships reported in FollowReferences.
0N/A </change>
0N/A <change date="28 June 2006" version="1.1.98">
0N/A Clarify DisposeEnvironment; add warning.
0N/A Fix typos in SetLocalXXX "retrieve" => "set".
0N/A Clarify that native method prefixes must remain set while used.
0N/A Clarify that exactly one Agent_OnXXX is called per agent.
0N/A Clarify that library loading is independent from start-up.
0N/A Remove ambiguous reference to Agent_OnLoad in the Agent_OnUnload spec.
0N/A </change>
0N/A <change date="31 July 2006" version="1.1.99">
0N/A Clarify the interaction between functions and exceptions.
0N/A Clarify and give examples of field indices.
0N/A Remove confusing "That is" sentence from MonitorWait and MonitorWaited events.
0N/A Update links to point to Java 6.
0N/A </change>
0N/A <change date="6 August 2006" version="1.1.102">
0N/A Add ResourceExhaustedEvent.
0N/A </change>
0N/A</changehistory>
0N/A
0N/A</specification>
0N/A<!-- Keep this comment at the end of the file
0N/ALocal variables:
0N/Amode: sgml
0N/Asgml-omittag:t
0N/Asgml-shorttag:t
0N/Asgml-namecase-general:t
0N/Asgml-general-insert-case:lower
0N/Asgml-minimize-attributes:nil
0N/Asgml-always-quote-attributes:t
0N/Asgml-indent-step:2
0N/Asgml-indent-data:t
0N/Asgml-parent-document:nil
0N/Asgml-exposed-tags:nil
0N/Asgml-local-catalogs:nil
0N/Asgml-local-ecat-files:nil
0N/AEnd:
0N/A-->