< prev index next >

src/share/vm/prims/jvmti.xml

Print this page

        

@@ -11526,10 +11526,183 @@
       </errors>
     </function>
 
   </category>
 
+  <category id="heap_monitoring" label="Heap Monitoring">
+    <typedef id="jvmtiCallFrame" label="Call Frame">
+      <field id="bci">
+        <jint/>
+        <description>BCI for the given allocation.</description>
+      </field>
+      <field id="method_id">
+        <jmethodID/>
+        <description>Method ID for the given frame.</description>
+      </field>
+    </typedef>
+
+    <typedef id="jvmtiStackTrace" label="Stack Trace">
+      <field id="env_id">
+        <allocfieldbuf><struct>JNIEnv</struct></allocfieldbuf>
+        <description>Environment where the trace was recorded.</description>
+      </field>
+      <field id="frames">
+        <allocfieldbuf outcount="trace_count">
+          <struct>jvmtiCallFrame</struct>
+        </allocfieldbuf>
+        <description>Pointer to the call frames.</description>
+      </field>
+      <field id="frame_count">
+        <jint/>
+        <description>The number of frames for the trace.</description>
+      </field>
+      <field id="size">
+        <jint/>
+        <description>The size of the object allocation.</description>
+      </field>
+      <field id="thread_id">
+        <jlong/>
+        <description>The thread id number.</description>
+      </field>
+    </typedef>
+
+    <typedef id="jvmtiStackTraces" label="Stack Traces">
+      <field id="stack_traces">
+        <allocfieldbuf outcount="trace_count">
+          <struct>jvmtiStackTrace</struct>
+        </allocfieldbuf>
+        <description>
+          The <datalink id="jvmtiStackTrace"/> array with the various stack traces.
+        </description>
+      </field>
+
+      <field id="trace_count">
+        <jint/>
+        <description>
+          Number of traces pointed by the array <datalink id="jvmtiStackTraces"/>.
+        </description>
+      </field>
+    </typedef>
+
+    <function id="StartHeapSampling" phase="any" num="156">
+      <synopsis>Start Heap Sampling</synopsis>
+      <description>
+        Start the heap sampler in the JVM. The function provides, via its argument, the sampling
+        rate requested and will fill internal data structures with heap allocation samples. The
+        samples are obtained via the <functionlink id="GetLiveTraces"></functionlink>,
+        <functionlink id="GetGarbageTraces"></functionlink>, <functionlink id="GetFrequentGarbageTraces"></functionlink>,
+        functions.
+      </description>
+      <origin>new</origin>
+      <capabilities>
+      </capabilities>
+      <parameters>
+        <param id="monitoring_rate">
+          <jint/>
+          <description>
+            The monitoring rate used for sampling. The sampler will use a statistical approach to
+            provide in average sampling every <paramlink id="monitoring_rate"/> allocated bytes.
+          </description>
+        </param>
+        <param id="max_storage">
+          <jint/>
+          <description>
+            The maximum storage used for the sampler. By default, the value is 200.
+          </description>
+        </param>
+      </parameters>
+      <errors>
+        <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
+          <paramlink id="monitoring_period"></paramlink> is less than zero.
+        </error>
+      </errors>
+    </function>
+
+    <function id="GetLiveTraces" num="157">
+      <synopsis>Get Live Traces</synopsis>
+      <description>
+        Get Live Heap Sampled traces.  The fields of the <datalink id="jvmtiStackTraces"/>
+        structure are filled in with details of the specified sampled allocation.
+      </description>
+      <origin>new</origin>
+      <capabilities>
+      </capabilities>
+      <parameters>
+        <param id="stack_traces">
+          <outptr><struct>jvmtiStackTraces</struct></outptr>
+          <description>
+            The stack trace data structure to be filled.
+          </description>
+        </param>
+      </parameters>
+      <errors>
+      </errors>
+    </function>
+
+    <function id="GetGarbageTraces" num="158">
+      <synopsis>Get Garbage Traces</synopsis>
+      <description>
+        Get the recent garbage heap sampled traces.  The fields of the <datalink id="jvmtiStackTraces"/>
+        structure are filled in with details of the specified sampled allocation.
+      </description>
+      <origin>new</origin>
+      <capabilities>
+      </capabilities>
+      <parameters>
+        <param id="stack_traces">
+          <outptr><struct>jvmtiStackTraces</struct></outptr>
+          <description>
+            The stack trace data structure to be filled.
+          </description>
+        </param>
+      </parameters>
+      <errors>
+      </errors>
+    </function>
+
+    <function id="GetFrequentGarbageTraces" num="159">
+      <synopsis>Get Frequent Garbage Traces</synopsis>
+      <description>
+        Get the frequent garbage heap sampled traces.  The fields of the <datalink id="jvmtiStackTraces"/>
+        structure are filled in with details of the specified sampled allocation.
+      </description>
+      <origin>new</origin>
+      <capabilities>
+      </capabilities>
+      <parameters>
+        <param id="stack_traces">
+          <outptr><struct>jvmtiStackTraces</struct></outptr>
+          <description>
+            The stack trace data structure to be filled.
+          </description>
+        </param>
+      </parameters>
+      <errors>
+      </errors>
+    </function>
+
+    <function id="ReleaseTraces" num="160">
+      <synopsis>Release traces provided by the heap monitoring</synopsis>
+      <description>
+        Release traces provided by any of the trace retrieval methods.
+      </description>
+      <origin>new</origin>
+      <capabilities>
+      </capabilities>
+      <parameters>
+        <param id="stack_traces">
+          <outptr><struct>jvmtiStackTraces</struct></outptr>
+          <description>
+            The stack trace data structure to be released.
+          </description>
+        </param>
+      </parameters>
+      <errors>
+      </errors>
+    </function>
+  </category>
+
 </functionsection>
 
 <errorsection label="Error Reference">
   <intro>
     Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code.
< prev index next >