< prev index next >

src/share/vm/prims/jvmti.xml

Print this page




10333           See <eventlink id="ResourceExhausted"/>.
10334         </description>
10335       </capabilityfield>
10336       <capabilityfield id="can_generate_early_vmstart" since="9">
10337         <description>
10338           Can generate the <code>VMStart</code> event early.
10339           See <eventlink id="VMStart"/>.
10340         </description>
10341       </capabilityfield>
10342       <capabilityfield id="can_generate_early_class_hook_events" since="9">
10343         <description>
10344           Can generate the <eventlink id="ClassFileLoadHook"/> events
10345           in the primordial phase. If this capability and
10346           <internallink id="jvmtiCapabilities.can_generate_all_class_hook_events">
10347           <code>can_generate_all_class_hook_events</code></internallink>
10348           are enabled then the <eventlink id="ClassFileLoadHook"/> events
10349           can be posted for classes loaded in the primordial phase.
10350           See <eventlink id="ClassFileLoadHook"/>.
10351         </description>
10352       </capabilityfield>







10353     </capabilitiestypedef>
10354 
10355     <function id="GetPotentialCapabilities" jkernel="yes" phase="onload" num="140">
10356       <synopsis>Get Potential Capabilities</synopsis>
10357       <description>
10358         Returns via <paramlink id="capabilities_ptr"></paramlink> the <jvmti/>
10359         features that can potentially be possessed by this environment
10360         at this time.
10361         The returned capabilities differ from the complete set of capabilities
10362         implemented by the VM in two cases: another environment possesses
10363         capabilities that can only be possessed by one environment, or the
10364         current <functionlink id="GetPhase">phase</functionlink> is live,
10365         and certain capabilities can only be added during the <code>OnLoad</code> phase.
10366         The <functionlink id="AddCapabilities"></functionlink> function
10367         may be used to set any or all or these capabilities.
10368         Currently possessed capabilities are included.
10369         <p/>
10370         Typically this function is used in the <code>OnLoad</code> function.
10371         Some virtual machines may allow a limited set of capabilities to be
10372         added in the live phase.


11509           <constant id="JVMTI_JLOCATION_OTHER" num="0">
11510             <code>jlocation</code> values have some other representation.
11511           </constant>
11512         </constants>
11513       </description>
11514       <origin>new</origin>
11515       <capabilities>
11516       </capabilities>
11517       <parameters>
11518         <param id="format_ptr">
11519           <outptr><enum>jvmtiJlocationFormat</enum></outptr>
11520           <description>
11521             On return, points to the format identifier for <code>jlocation</code> values.
11522           </description>
11523         </param>
11524       </parameters>
11525       <errors>
11526       </errors>
11527     </function>
11528 




































































































































































































































































11529   </category>
11530 
11531 </functionsection>
11532 
11533 <errorsection label="Error Reference">
11534   <intro>
11535     Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code.
11536     <p/>
11537     It is the responsibility of the agent to call <jvmti/> functions with
11538     valid parameters and in the proper context (calling thread is attached,
11539     phase is correct, etc.).
11540     Detecting some error conditions may be difficult, inefficient, or
11541     impossible for an implementation.
11542     The errors listed in
11543     <internallink id="reqerrors">Function Specific Required Errors</internallink>
11544     must be detected by the implementation.
11545     All other errors represent the recommended response to the error
11546     condition.
11547   </intro>
11548 




10333           See <eventlink id="ResourceExhausted"/>.
10334         </description>
10335       </capabilityfield>
10336       <capabilityfield id="can_generate_early_vmstart" since="9">
10337         <description>
10338           Can generate the <code>VMStart</code> event early.
10339           See <eventlink id="VMStart"/>.
10340         </description>
10341       </capabilityfield>
10342       <capabilityfield id="can_generate_early_class_hook_events" since="9">
10343         <description>
10344           Can generate the <eventlink id="ClassFileLoadHook"/> events
10345           in the primordial phase. If this capability and
10346           <internallink id="jvmtiCapabilities.can_generate_all_class_hook_events">
10347           <code>can_generate_all_class_hook_events</code></internallink>
10348           are enabled then the <eventlink id="ClassFileLoadHook"/> events
10349           can be posted for classes loaded in the primordial phase.
10350           See <eventlink id="ClassFileLoadHook"/>.
10351         </description>
10352       </capabilityfield>
10353 
10354       <capabilityfield id="can_sample_heap" since="9">
10355         <description>
10356           Can sample the heap.
10357           If this capability is enabled then the heap sampling methods can be called.
10358         </description>
10359       </capabilityfield>
10360     </capabilitiestypedef>
10361 
10362     <function id="GetPotentialCapabilities" jkernel="yes" phase="onload" num="140">
10363       <synopsis>Get Potential Capabilities</synopsis>
10364       <description>
10365         Returns via <paramlink id="capabilities_ptr"></paramlink> the <jvmti/>
10366         features that can potentially be possessed by this environment
10367         at this time.
10368         The returned capabilities differ from the complete set of capabilities
10369         implemented by the VM in two cases: another environment possesses
10370         capabilities that can only be possessed by one environment, or the
10371         current <functionlink id="GetPhase">phase</functionlink> is live,
10372         and certain capabilities can only be added during the <code>OnLoad</code> phase.
10373         The <functionlink id="AddCapabilities"></functionlink> function
10374         may be used to set any or all or these capabilities.
10375         Currently possessed capabilities are included.
10376         <p/>
10377         Typically this function is used in the <code>OnLoad</code> function.
10378         Some virtual machines may allow a limited set of capabilities to be
10379         added in the live phase.


11516           <constant id="JVMTI_JLOCATION_OTHER" num="0">
11517             <code>jlocation</code> values have some other representation.
11518           </constant>
11519         </constants>
11520       </description>
11521       <origin>new</origin>
11522       <capabilities>
11523       </capabilities>
11524       <parameters>
11525         <param id="format_ptr">
11526           <outptr><enum>jvmtiJlocationFormat</enum></outptr>
11527           <description>
11528             On return, points to the format identifier for <code>jlocation</code> values.
11529           </description>
11530         </param>
11531       </parameters>
11532       <errors>
11533       </errors>
11534     </function>
11535 
11536   </category>
11537 
11538   <category id="heap_monitoring" label="Heap Monitoring">
11539     <typedef id="jvmtiCallFrame" label="Call Frame">
11540       <field id="bci">
11541         <jint/>
11542         <description>BCI for the given allocation.</description>
11543       </field>
11544       <field id="method_id">
11545         <jmethodID/>
11546         <description>Method ID for the given frame.</description>
11547       </field>
11548     </typedef>
11549 
11550     <typedef id="jvmtiStackTrace" label="Stack Trace">
11551       <field id="env_id">
11552         <allocfieldbuf><struct>JNIEnv</struct></allocfieldbuf>
11553         <description>Environment where the trace was recorded.</description>
11554       </field>
11555       <field id="frames">
11556         <allocfieldbuf outcount="trace_count">
11557           <struct>jvmtiCallFrame</struct>
11558         </allocfieldbuf>
11559         <description>Pointer to the call frames.</description>
11560       </field>
11561       <field id="frame_count">
11562         <jint/>
11563         <description>The number of frames for the trace.</description>
11564       </field>
11565       <field id="size">
11566         <jint/>
11567         <description>The size of the object allocation.</description>
11568       </field>
11569       <field id="thread_id">
11570         <jlong/>
11571         <description>The thread id number.</description>
11572       </field>
11573     </typedef>
11574 
11575     <typedef id="jvmtiStackTraces" label="Stack Traces">
11576       <field id="stack_traces">
11577         <allocfieldbuf outcount="trace_count">
11578           <struct>jvmtiStackTrace</struct>
11579         </allocfieldbuf>
11580         <description>
11581           The <datalink id="jvmtiStackTrace"/> array with the various stack traces.
11582         </description>
11583       </field>
11584 
11585       <field id="trace_count">
11586         <jint/>
11587         <description>
11588           Number of traces pointed by the array <datalink id="jvmtiStackTraces"/>.
11589         </description>
11590       </field>
11591     </typedef>
11592 
11593     <typedef id="jvmtiHeapSamplingStats" label="Heap Sampling Statistics">
11594       <field id="sample_count">
11595         <jlong/>
11596         <description>
11597           The number of sampled allocations during the lifetime of the sampler.
11598           For very long sampling, this number can overflow.
11599         </description>
11600       </field>
11601 
11602       <field id="garbage_collected_samples">
11603         <jlong/>
11604         <description>
11605           The number of samples already garbage collected.
11606           For very long sampling, this number can overflow.
11607         </description>
11608       </field>
11609 
11610       <field id="sample_rate_accumulation">
11611         <jlong/>
11612         <description>
11613           Accumulation of the sample rates chosen.
11614           For very long sampling, this number can overflow.
11615         </description>
11616       </field>
11617 
11618       <field id="sample_rate_count">
11619         <jlong/>
11620         <description>
11621           The number of sample rates chosen.
11622           For very long sampling, this number can overflow.
11623         </description>
11624       </field>
11625 
11626       <field id="stack_depth_accumulation">
11627         <jlong/>
11628         <description>
11629           Accumulation of stack depths collected by the sampler.
11630           For very long sampling, this number can overflow.
11631         </description>
11632       </field>
11633     </typedef>
11634 
11635     <function id="StartHeapSampling" phase="any" num="156">
11636       <synopsis>Start Heap Sampling</synopsis>
11637       <description>
11638         Start the heap sampler in the JVM. The function provides, via its argument, the sampling
11639         rate requested and will fill internal data structures with heap allocation samples. The
11640         samples are obtained via the <functionlink id="GetLiveTraces"></functionlink>,
11641         <functionlink id="GetGarbageTraces"></functionlink>, <functionlink id="GetFrequentGarbageTraces"></functionlink>,
11642         functions.
11643       </description>
11644       <origin>new</origin>
11645       <capabilities>
11646         <required id="can_sample_heap"></required>
11647       </capabilities>
11648       <parameters>
11649         <param id="monitoring_rate">
11650           <jint/>
11651           <description>
11652             The monitoring rate used for sampling. The sampler will use a statistical approach to
11653             provide in average sampling every <paramlink id="monitoring_rate"/> allocated bytes.
11654           </description>
11655         </param>
11656         <param id="max_storage">
11657           <jint/>
11658           <description>
11659             The maximum storage used for the sampler. By default, the value is 200.
11660           </description>
11661         </param>
11662       </parameters>
11663       <errors>
11664         <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
11665           <paramlink id="monitoring_period"></paramlink> is less than zero.
11666         </error>
11667       </errors>
11668     </function>
11669 
11670     <function id="StopHeapSampling" phase="any" num="157">
11671       <synopsis>Start Heap Sampling</synopsis>
11672       <description>
11673         Stop the heap sampler in the JVM.
11674         Any sample obtained during sampling is still available via the <functionlink id="GetLiveTraces"></functionlink>,
11675         <functionlink id="GetGarbageTraces"></functionlink>, <functionlink id="GetFrequentGarbageTraces"></functionlink>,
11676         functions.
11677       </description>
11678       <origin>new</origin>
11679       <capabilities>
11680         <required id="can_sample_heap"></required>
11681       </capabilities>
11682       <parameters>
11683       </parameters>
11684       <errors>
11685       </errors>
11686     </function>
11687 
11688     <function id="GetLiveTraces" num="158">
11689       <synopsis>Get Live Traces</synopsis>
11690       <description>
11691         Get Live Heap Sampled traces.  The fields of the <datalink id="jvmtiStackTraces"/>
11692         structure are filled in with details of the specified sampled allocation.
11693       </description>
11694       <origin>new</origin>
11695       <capabilities>
11696         <required id="can_sample_heap"></required>
11697       </capabilities>
11698       <parameters>
11699         <param id="stack_traces">
11700           <outptr><struct>jvmtiStackTraces</struct></outptr>
11701           <description>
11702             The stack trace data structure to be filled.
11703           </description>
11704         </param>
11705       </parameters>
11706       <errors>
11707       </errors>
11708     </function>
11709 
11710     <function id="GetGarbageTraces" num="159">
11711       <synopsis>Get Garbage Traces</synopsis>
11712       <description>
11713         Get the recent garbage heap sampled traces.  The fields of the <datalink id="jvmtiStackTraces"/>
11714         structure are filled in with details of the specified sampled allocation.
11715       </description>
11716       <origin>new</origin>
11717       <capabilities>
11718         <required id="can_sample_heap"></required>
11719       </capabilities>
11720       <parameters>
11721         <param id="stack_traces">
11722           <outptr><struct>jvmtiStackTraces</struct></outptr>
11723           <description>
11724             The stack trace data structure to be filled.
11725           </description>
11726         </param>
11727       </parameters>
11728       <errors>
11729       </errors>
11730     </function>
11731 
11732     <function id="GetFrequentGarbageTraces" num="160">
11733       <synopsis>Get Frequent Garbage Traces</synopsis>
11734       <description>
11735         Get the frequent garbage heap sampled traces.  The fields of the <datalink id="jvmtiStackTraces"/>
11736         structure are filled in with details of the specified sampled allocation.
11737       </description>
11738       <origin>new</origin>
11739       <capabilities>
11740         <required id="can_sample_heap"></required>
11741       </capabilities>
11742       <parameters>
11743         <param id="stack_traces">
11744           <outptr><struct>jvmtiStackTraces</struct></outptr>
11745           <description>
11746             The stack trace data structure to be filled.
11747           </description>
11748         </param>
11749       </parameters>
11750       <errors>
11751       </errors>
11752     </function>
11753 
11754     <function id="ReleaseTraces" num="161">
11755       <synopsis>Release traces provided by the heap monitoring</synopsis>
11756       <description>
11757         Release traces provided by any of the trace retrieval methods.
11758       </description>
11759       <origin>new</origin>
11760       <capabilities>
11761         <required id="can_sample_heap"></required>
11762       </capabilities>
11763       <parameters>
11764         <param id="stack_traces">
11765           <outptr><struct>jvmtiStackTraces</struct></outptr>
11766           <description>
11767             The stack trace data structure to be released.
11768           </description>
11769         </param>
11770       </parameters>
11771       <errors>
11772       </errors>
11773     </function>
11774 
11775     <function id="GetHeapSamplingStats" num="162">
11776       <synopsis>Get the heap sampling statistics</synopsis>
11777       <description>
11778         Returns a <datalink id="jvmtiHeapSamplingStats"/> to understand the heap sampling behavior and current
11779         internal data storage status.
11780       </description>
11781       <origin>new</origin>
11782       <capabilities>
11783         <required id="can_sample_heap"></required>
11784       </capabilities>
11785       <parameters>
11786         <param id="stats">
11787           <outptr><struct>jvmtiHeapSamplingStats</struct></outptr>
11788           <description>
11789             The structure to be filled with the heap sampler's statistics.
11790           </description>
11791         </param>
11792       </parameters>
11793       <errors>
11794       </errors>
11795     </function>
11796   </category>
11797 
11798 </functionsection>
11799 
11800 <errorsection label="Error Reference">
11801   <intro>
11802     Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code.
11803     <p/>
11804     It is the responsibility of the agent to call <jvmti/> functions with
11805     valid parameters and in the proper context (calling thread is attached,
11806     phase is correct, etc.).
11807     Detecting some error conditions may be difficult, inefficient, or
11808     impossible for an implementation.
11809     The errors listed in
11810     <internallink id="reqerrors">Function Specific Required Errors</internallink>
11811     must be detected by the implementation.
11812     All other errors represent the recommended response to the error
11813     condition.
11814   </intro>
11815 


< prev index next >