10336 See <eventlink id="ResourceExhausted"/>.
10337 </description>
10338 </capabilityfield>
10339 <capabilityfield id="can_generate_early_vmstart" since="9">
10340 <description>
10341 Can generate the <code>VMStart</code> event early.
10342 See <eventlink id="VMStart"/>.
10343 </description>
10344 </capabilityfield>
10345 <capabilityfield id="can_generate_early_class_hook_events" since="9">
10346 <description>
10347 Can generate the <eventlink id="ClassFileLoadHook"/> events
10348 in the primordial phase. If this capability and
10349 <internallink id="jvmtiCapabilities.can_generate_all_class_hook_events">
10350 <code>can_generate_all_class_hook_events</code></internallink>
10351 are enabled then the <eventlink id="ClassFileLoadHook"/> events
10352 can be posted for classes loaded in the primordial phase.
10353 See <eventlink id="ClassFileLoadHook"/>.
10354 </description>
10355 </capabilityfield>
10356 </capabilitiestypedef>
10357
10358 <function id="GetPotentialCapabilities" jkernel="yes" phase="onload" num="140">
10359 <synopsis>Get Potential Capabilities</synopsis>
10360 <description>
10361 Returns via <paramlink id="capabilities_ptr"></paramlink> the <jvmti/>
10362 features that can potentially be possessed by this environment
10363 at this time.
10364 The returned capabilities differ from the complete set of capabilities
10365 implemented by the VM in two cases: another environment possesses
10366 capabilities that can only be possessed by one environment, or the
10367 current <functionlink id="GetPhase">phase</functionlink> is live,
10368 and certain capabilities can only be added during the <code>OnLoad</code> phase.
10369 The <functionlink id="AddCapabilities"></functionlink> function
10370 may be used to set any or all or these capabilities.
10371 Currently possessed capabilities are included.
10372 <p/>
10373 Typically this function is used in the <code>OnLoad</code> function.
10374 Some virtual machines may allow a limited set of capabilities to be
10375 added in the live phase.
11514 </constant>
11515 </constants>
11516 </description>
11517 <origin>new</origin>
11518 <capabilities>
11519 </capabilities>
11520 <parameters>
11521 <param id="format_ptr">
11522 <outptr><enum>jvmtiJlocationFormat</enum></outptr>
11523 <description>
11524 On return, points to the format identifier for <code>jlocation</code> values.
11525 </description>
11526 </param>
11527 </parameters>
11528 <errors>
11529 </errors>
11530 </function>
11531
11532 </category>
11533
11534 </functionsection>
11535
11536 <errorsection label="Error Reference">
11537 <intro>
11538 Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code.
11539 <p/>
11540 It is the responsibility of the agent to call <jvmti/> functions with
11541 valid parameters and in the proper context (calling thread is attached,
11542 phase is correct, etc.).
11543 Detecting some error conditions may be difficult, inefficient, or
11544 impossible for an implementation.
11545 The errors listed in
11546 <internallink id="reqerrors">Function Specific Required Errors</internallink>
11547 must be detected by the implementation.
11548 All other errors represent the recommended response to the error
11549 condition.
11550 </intro>
11551
11552 <errorcategory id="universal-error" label="Universal Errors">
11553 <intro>
11722 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED" num="66">
11723 A direct superclass is different for the new class
11724 version, or the set of directly implemented
11725 interfaces is different.
11726 </errorid>
11727 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED" num="67">
11728 A new class version does not declare a method
11729 declared in the old class version.
11730 </errorid>
11731 <errorid id="JVMTI_ERROR_NAMES_DONT_MATCH" num="69">
11732 The class name defined in the new class file is
11733 different from the name in the old class object.
11734 </errorid>
11735 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED" num="70">
11736 A new class version has different modifiers.
11737 </errorid>
11738 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED" num="71">
11739 A method in the new class version has different modifiers
11740 than its counterpart in the old class version.
11741 </errorid>
11742 </errorcategory>
11743 </errorsection>
11744
11745 <eventsection label="Events">
11746 <intro label="Handling Events" id="eventIntro">
11747 Agents can be informed of many events that occur in application
11748 programs.
11749 <p/>
11750 To handle events, designate a set of callback functions with
11751 <functionlink id="SetEventCallbacks"></functionlink>.
11752 For each event the corresponding callback function will be
11753 called.
11754 Arguments to the callback function provide additional
11755 information about the event.
11756 <p/>
11757 The callback function is usually called from within an application
11758 thread. The <jvmti/> implementation does not
11759 queue events in any way. This means
11760 that event callback functions must be written
11761 carefully. Here are some general guidelines. See
13496 <jobject/>
13497 <description>
13498 JNI local reference to the object that was allocated
13499 </description>
13500 </param>
13501 <param id="object_klass">
13502 <jclass/>
13503 <description>
13504 JNI local reference to the class of the object
13505 </description>
13506 </param>
13507 <param id="size">
13508 <jlong/>
13509 <description>
13510 Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
13511 </description>
13512 </param>
13513 </parameters>
13514 </event>
13515
13516 <event label="Object Free"
13517 id="ObjectFree" const="JVMTI_EVENT_OBJECT_FREE" num="83">
13518 <description>
13519 An Object Free event is sent when the garbage collector frees an object.
13520 Events are only sent for tagged objects--see
13521 <internallink id="Heap">heap functions</internallink>.
13522 <p/>
13523 The event handler must not use JNI functions and
13524 must not use <jvmti/> functions except those which
13525 specifically allow such use (see the raw monitor, memory management,
13526 and environment local storage functions).
13527 </description>
13528 <origin>new</origin>
13529 <capabilities>
13530 <required id="can_generate_object_free_events"></required>
13531 </capabilities>
13532 <parameters>
13533 <param id="tag">
13534 <jlong/>
13535 <description>
|
10336 See <eventlink id="ResourceExhausted"/>.
10337 </description>
10338 </capabilityfield>
10339 <capabilityfield id="can_generate_early_vmstart" since="9">
10340 <description>
10341 Can generate the <code>VMStart</code> event early.
10342 See <eventlink id="VMStart"/>.
10343 </description>
10344 </capabilityfield>
10345 <capabilityfield id="can_generate_early_class_hook_events" since="9">
10346 <description>
10347 Can generate the <eventlink id="ClassFileLoadHook"/> events
10348 in the primordial phase. If this capability and
10349 <internallink id="jvmtiCapabilities.can_generate_all_class_hook_events">
10350 <code>can_generate_all_class_hook_events</code></internallink>
10351 are enabled then the <eventlink id="ClassFileLoadHook"/> events
10352 can be posted for classes loaded in the primordial phase.
10353 See <eventlink id="ClassFileLoadHook"/>.
10354 </description>
10355 </capabilityfield>
10356 <capabilityfield id="can_sample_heap" since="11">
10357 <description>
10358 Can sample the heap.
10359 If this capability is enabled then the heap sampling methods can be called.
10360 </description>
10361 </capabilityfield>
10362 <capabilityfield id="can_generate_sampled_object_alloc_events" since="11">
10363 <description>
10364 Can generate sampled object allocation events.
10365 If this capability is enabled then an event for a sampled object allocation is sent
10366 when the heap sampler is enabled as well.
10367 </description>
10368 </capabilityfield>
10369 </capabilitiestypedef>
10370
10371 <function id="GetPotentialCapabilities" jkernel="yes" phase="onload" num="140">
10372 <synopsis>Get Potential Capabilities</synopsis>
10373 <description>
10374 Returns via <paramlink id="capabilities_ptr"></paramlink> the <jvmti/>
10375 features that can potentially be possessed by this environment
10376 at this time.
10377 The returned capabilities differ from the complete set of capabilities
10378 implemented by the VM in two cases: another environment possesses
10379 capabilities that can only be possessed by one environment, or the
10380 current <functionlink id="GetPhase">phase</functionlink> is live,
10381 and certain capabilities can only be added during the <code>OnLoad</code> phase.
10382 The <functionlink id="AddCapabilities"></functionlink> function
10383 may be used to set any or all or these capabilities.
10384 Currently possessed capabilities are included.
10385 <p/>
10386 Typically this function is used in the <code>OnLoad</code> function.
10387 Some virtual machines may allow a limited set of capabilities to be
10388 added in the live phase.
11527 </constant>
11528 </constants>
11529 </description>
11530 <origin>new</origin>
11531 <capabilities>
11532 </capabilities>
11533 <parameters>
11534 <param id="format_ptr">
11535 <outptr><enum>jvmtiJlocationFormat</enum></outptr>
11536 <description>
11537 On return, points to the format identifier for <code>jlocation</code> values.
11538 </description>
11539 </param>
11540 </parameters>
11541 <errors>
11542 </errors>
11543 </function>
11544
11545 </category>
11546
11547 <category id="heap_monitoring" label="Heap Monitoring">
11548 <typedef id="jvmtiAllocTraceInfo" label="Allocation Trace Information" since="11">
11549 <field id="stack_info">
11550 <allocfieldbuf>
11551 <struct>jvmtiStackInfo</struct>
11552 </allocfieldbuf>
11553 <description>Pointer to the stack information.</description>
11554 </field>
11555 <field id="size">
11556 <jlong/>
11557 <description>The size of the object allocation.</description>
11558 </field>
11559 <field id="thread_id">
11560 <jint/>
11561 <description>The thread id of the object allocation.</description>
11562 </field>
11563 </typedef>
11564
11565 <typedef id="jvmtiHeapSamplingStats" label="Heap Sampling Statistics" since="11">
11566 <field id="sample_count">
11567 <jlong/>
11568 <description>
11569 The number of sampled allocations during the lifetime of the sampler.
11570 For very long sampling, this number can overflow.
11571 </description>
11572 </field>
11573
11574 <field id="garbage_collected_samples">
11575 <jlong/>
11576 <description>
11577 The number of samples already garbage collected.
11578 For very long sampling, this number can overflow.
11579 </description>
11580 </field>
11581
11582 <field id="sample_rate_accumulation">
11583 <jlong/>
11584 <description>
11585 Accumulation of the sample rates chosen.
11586 For very long sampling, this number can overflow.
11587 </description>
11588 </field>
11589
11590 <field id="sample_rate_count">
11591 <jlong/>
11592 <description>
11593 The number of sample rates chosen.
11594 For very long sampling, this number can overflow.
11595 </description>
11596 </field>
11597
11598 <field id="stack_depth_accumulation">
11599 <jlong/>
11600 <description>
11601 Accumulation of stack depths collected by the sampler.
11602 For very long sampling, this number can overflow.
11603 </description>
11604 </field>
11605 </typedef>
11606
11607 <function id="StartHeapSampling" phase="any" num="156" since="11">
11608 <synopsis>Start Heap Sampling</synopsis>
11609 <description>
11610 Start the heap sampler in the JVM. The function provides, via its arguments, the sampling
11611 rate requested and will fill internal data structures with heap allocation samples. The
11612 samples are obtained via the <functionlink id="GetLiveObjectAllocTraces"></functionlink>,
11613 <functionlink id="GetGarbageObjectAllocTraces"></functionlink>,
11614 <functionlink id="GetFrequentGarbageObjectAllocTraces"></functionlink>,
11615 or <functionlink id="GetCachedLiveObjectAllocTraces"></functionlink> functions.
11616 </description>
11617 <origin>new</origin>
11618 <capabilities>
11619 <required id="can_sample_heap"></required>
11620 </capabilities>
11621 <parameters>
11622 <param id="monitoring_rate">
11623 <jint/>
11624 <description>
11625 The monitoring rate in bytes used for sampling. The sampler will use a statistical approach to
11626 provide in average sampling every <paramlink id="monitoring_rate"/> allocated bytes.
11627
11628 Note: a low monitoring rate, such as sampling every 1024 bytes, will probably incur a high overhead.
11629 Due to the incurred overhead, the sampler should only be used when knowing it may impact performance.
11630 On the other hand, sampling however every 1024kB has a far less chance of a high overhead since it will sample
11631 1024 times less than the 1024-byte sampling.
11632 </description>
11633 </param>
11634 <param id="max_gc_storage">
11635 <jint/>
11636 <description>
11637 The sampler keeps in memory a maximum number of garbage collected traces. This parameter sets the maximum number
11638 to be preserved by the system. The bigger the number, the more traces will be preserved at a given time, augmenting
11639 memory usage by the system.
11640 </description>
11641 </param>
11642 </parameters>
11643 <errors>
11644 <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT">
11645 <paramlink id="monitoring_period"></paramlink> is less than zero.
11646 </error>
11647 <error id="JVMTI_ERROR_TLAB_DISABLED">
11648 Calling this method without TLAB.
11649 </error>
11650 </errors>
11651 </function>
11652
11653 <function id="StopHeapSampling" phase="any" num="157" since="11">
11654 <synopsis>Stop Heap Sampling</synopsis>
11655 <description>
11656 Stop the heap sampler in the JVM.
11657 Any sample obtained during sampling is still available via the
11658 <functionlink id="GetLiveObjectAllocTraces"></functionlink>,
11659 <functionlink id="GetGarbageObjectAllocTraces"></functionlink>,
11660 <functionlink id="GetFrequentGarbageObjectAllocTraces"></functionlink>,
11661 or <functionlink id="GetCachedLiveObjectAllocTraces"></functionlink> functions.
11662
11663 Stopping the heap sampler resets internal traces and counters. Therefore stopping the sampler frees any
11664 internal trace samples, any subsequent call to the <functionlink id="GetLiveObjectAllocTraces"></functionlink>,
11665 <functionlink id="GetGarbageObjectAllocTraces"></functionlink>, <functionlink id="GetFrequentGarbageObjectAllocTraces"></functionlink>,
11666 or <functionlink id="GetCachedLiveObjectAllocTraces"></functionlink> functions will return no traces.
11667 </description>
11668 <origin>new</origin>
11669 <capabilities>
11670 <required id="can_sample_heap"></required>
11671 </capabilities>
11672 <parameters>
11673 </parameters>
11674 <errors>
11675 </errors>
11676 </function>
11677
11678 <function id="GetLiveObjectAllocTraces" num="158" since="11">
11679 <synopsis>Get Live Object Allocation Traces</synopsis>
11680 <description>
11681 Get the live object heap sampled traces. The fields of the <datalink id="jvmtiAllocTraceInfo"/>
11682 structure are filled in with details of the specified sampled allocation.
11683
11684 Live objects are defined in this case as objects that either have survived the latest GC
11685 or have not yet been collected by a GC.
11686
11687 This method can be called at any time but if the sampler is not enabled, via
11688 <functionlink id="StartHeapSampling"></functionlink>, it returns no traces.
11689 </description>
11690 <origin>new</origin>
11691 <capabilities>
11692 <required id="can_sample_heap"></required>
11693 </capabilities>
11694 <parameters>
11695 <param id="trace_info_ptr">
11696 <allocbuf>
11697 <struct>jvmtiAllocTraceInfo</struct>
11698 </allocbuf>
11699 <description>
11700 On return, this buffer is filled with stack information for each live object.
11701 The number of <datalink id="jvmtiAllocTraceInfo"/> records is determined
11702 by <paramlink id="trace_count_ptr"/>.
11703 <p/>
11704 Note that this buffer is allocated to include the <datalink id="jvmtiStackInfo"/>
11705 buffers pointed to by <datalink id="jvmtiAllocTraceInfo.stack_info"/>, which also
11706 include the <datalink id="jvmtiFrameInfo"/> buffers pointed by
11707 <datalink id="jvmtiStackInfo.frame_buffer"/>.
11708
11709 All these buffers must not be separately deallocated.
11710 </description>
11711 </param>
11712 <param id="trace_count_ptr">
11713 <outptr><jint/></outptr>
11714 <description>
11715 The number of traces allocated.
11716 </description>
11717 </param>
11718 </parameters>
11719 <errors>
11720 </errors>
11721 </function>
11722
11723 <function id="GetGarbageObjectAllocTraces" num="159" since="11">
11724 <synopsis>Get Garbage Traces</synopsis>
11725 <description>
11726 Get the recent garbage heap sampled traces. The fields of the <datalink id="jvmtiAllocTraceInfo"/>
11727 structure are filled in with details of the specified sampled allocation.
11728
11729 The garbage object traces returned by this method are the most recent garbage collected traces. Up to
11730 <paramlink id="max_gc_storage"></paramlink> from the call to <functionlink id="StartHeapSampling"></functionlink>
11731 will be provided.
11732
11733 This method can be called at any time but if the sampler is not enabled, via
11734 <functionlink id="StartHeapSampling"></functionlink>, it returns no traces.
11735 </description>
11736 <origin>new</origin>
11737 <capabilities>
11738 <required id="can_sample_heap"></required>
11739 </capabilities>
11740 <parameters>
11741 <param id="trace_info_ptr">
11742 <allocbuf>
11743 <struct>jvmtiAllocTraceInfo</struct>
11744 </allocbuf>
11745 <description>
11746 On return, this buffer is filled with stack information for each live object.
11747 The number of <datalink id="jvmtiAllocTraceInfo"/> records is determined
11748 by <paramlink id="trace_count_ptr"/>.
11749 <p/>
11750 Note that this buffer is allocated to include the <datalink id="jvmtiStackInfo"/>
11751 buffers pointed to by <datalink id="jvmtiAllocTraceInfo.stack_info"/>, which also
11752 include the <datalink id="jvmtiFrameInfo"/> buffers pointed by
11753 <datalink id="jvmtiStackInfo.frame_buffer"/>.
11754
11755 All these buffers must not be separately deallocated.
11756 </description>
11757 </param>
11758 <param id="trace_count_ptr">
11759 <outptr><jint/></outptr>
11760 <description>
11761 The number of traces allocated.
11762 </description>
11763 </param>
11764 </parameters>
11765 <errors>
11766 </errors>
11767 </function>
11768
11769 <function id="GetFrequentGarbageObjectAllocTraces" num="160" since="11">
11770 <synopsis>Get Frequent Garbage Traces</synopsis>
11771 <description>
11772 Get the frequent garbage heap sampled traces. The fields of the <datalink id="jvmtiAllocTraceInfo"/>
11773 structure are filled in with details of the specified sampled allocation.
11774
11775 The garbage object traces returned by this method are the most frequent garbage collected traces. Most frequent
11776 being done by allowing less and less traces in the frequent cache, which statistically only allows frequent objects
11777 to be cached and returned to the user. Up to <paramlink id="max_gc_storage"></paramlink> from the call to
11778 <functionlink id="StartHeapSampling"></functionlink> will be provided.
11779
11780 This method can be called at any time but if the sampler is not enabled, via
11781 <functionlink id="StartHeapSampling"></functionlink>, it returns no traces.
11782 </description>
11783 <origin>new</origin>
11784 <capabilities>
11785 <required id="can_sample_heap"></required>
11786 </capabilities>
11787 <parameters>
11788 <param id="trace_info_ptr">
11789 <allocbuf>
11790 <struct>jvmtiAllocTraceInfo</struct>
11791 </allocbuf>
11792 <description>
11793 On return, this buffer is filled with stack information for each live object.
11794 The number of <datalink id="jvmtiAllocTraceInfo"/> records is determined
11795 by <paramlink id="trace_count_ptr"/>.
11796 <p/>
11797 Note that this buffer is allocated to include the <datalink id="jvmtiStackInfo"/>
11798 buffers pointed to by <datalink id="jvmtiAllocTraceInfo.stack_info"/>, which also
11799 include the <datalink id="jvmtiFrameInfo"/> buffers pointed by
11800 <datalink id="jvmtiStackInfo.frame_buffer"/>.
11801
11802 All these buffers must not be separately deallocated.
11803 </description>
11804 </param>
11805 <param id="trace_count_ptr">
11806 <outptr><jint/></outptr>
11807 <description>
11808 The number of traces allocated.
11809 </description>
11810 </param>
11811 </parameters>
11812 <errors>
11813 </errors>
11814 </function>
11815
11816 <function id="GetCachedLiveObjectAllocTraces" num="161" since="11">
11817 <synopsis>Get Cached Object Allocated Traces</synopsis>
11818 <description>
11819 Get the cached sampled traces: the traces are the ones that were collected during the last
11820 full GC. The fields of the <datalink id="jvmtiAllocTraceInfo"/> structure are filled in with
11821 details of the specified sampled allocation.
11822
11823 Cached object traces are defined as being the objects still live after the last full GC. As opposed to the function
11824 <functionlink id="GetLiveObjectAllocTraces"></functionlink>, this method does not contain objects
11825 that have not survived at least one GC.
11826
11827 This method can be called at any time but if the sampler is not enabled, via
11828 <functionlink id="StartHeapSampling"></functionlink>, it returns no traces.
11829 </description>
11830 <origin>new</origin>
11831 <capabilities>
11832 <required id="can_sample_heap"></required>
11833 </capabilities>
11834 <parameters>
11835 <param id="trace_info_ptr">
11836 <allocbuf>
11837 <struct>jvmtiAllocTraceInfo</struct>
11838 </allocbuf>
11839 <description>
11840 On return, this buffer is filled with stack information for each live object.
11841 The number of <datalink id="jvmtiAllocTraceInfo"/> records is determined
11842 by <paramlink id="trace_count_ptr"/>.
11843 <p/>
11844 Note that this buffer is allocated to include the <datalink id="jvmtiStackInfo"/>
11845 buffers pointed to by <datalink id="jvmtiAllocTraceInfo.stack_info"/>, which also
11846 include the <datalink id="jvmtiFrameInfo"/> buffers pointed by
11847 <datalink id="jvmtiAllocTraceInfo.frame_buffer"/>.
11848
11849 All these buffers must not be separately deallocated.
11850 </description>
11851 </param>
11852 <param id="trace_count_ptr">
11853 <outptr><jint/></outptr>
11854 <description>
11855 The number of traces allocated.
11856 </description>
11857 </param>
11858 </parameters>
11859 <errors>
11860 </errors>
11861 </function>
11862
11863 <function id="GetHeapSamplingStats" num="162" since="11">
11864 <synopsis>Get Heap Sampling Statistics</synopsis>
11865 <description>
11866 Fills a <datalink id="jvmtiHeapSamplingStats"/> to understand the heap sampling behavior and current
11867 internal data storage status.
11868
11869 This method can be called at any time but if the sampler has not been started via at least
11870 one call to <functionlink id="StartHeapSampling"></functionlink> it returns a zeroed-out structure.
11871 </description>
11872 <origin>new</origin>
11873 <capabilities>
11874 <required id="can_sample_heap"></required>
11875 </capabilities>
11876 <parameters>
11877 <param id="stats">
11878 <outptr><struct>jvmtiHeapSamplingStats</struct></outptr>
11879 <description>
11880 The structure to be filled with the heap sampler's statistics.
11881 </description>
11882 </param>
11883 </parameters>
11884 <errors>
11885 </errors>
11886 </function>
11887 </category>
11888
11889 </functionsection>
11890
11891 <errorsection label="Error Reference">
11892 <intro>
11893 Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code.
11894 <p/>
11895 It is the responsibility of the agent to call <jvmti/> functions with
11896 valid parameters and in the proper context (calling thread is attached,
11897 phase is correct, etc.).
11898 Detecting some error conditions may be difficult, inefficient, or
11899 impossible for an implementation.
11900 The errors listed in
11901 <internallink id="reqerrors">Function Specific Required Errors</internallink>
11902 must be detected by the implementation.
11903 All other errors represent the recommended response to the error
11904 condition.
11905 </intro>
11906
11907 <errorcategory id="universal-error" label="Universal Errors">
11908 <intro>
12077 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED" num="66">
12078 A direct superclass is different for the new class
12079 version, or the set of directly implemented
12080 interfaces is different.
12081 </errorid>
12082 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED" num="67">
12083 A new class version does not declare a method
12084 declared in the old class version.
12085 </errorid>
12086 <errorid id="JVMTI_ERROR_NAMES_DONT_MATCH" num="69">
12087 The class name defined in the new class file is
12088 different from the name in the old class object.
12089 </errorid>
12090 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED" num="70">
12091 A new class version has different modifiers.
12092 </errorid>
12093 <errorid id="JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED" num="71">
12094 A method in the new class version has different modifiers
12095 than its counterpart in the old class version.
12096 </errorid>
12097 <errorid id="JVMTI_ERROR_TLAB_DISABLED" num="72">
12098 The Thread Local Allocation Buffer system is disabled and the method requires it enabled.
12099 </errorid>
12100 </errorcategory>
12101 </errorsection>
12102
12103 <eventsection label="Events">
12104 <intro label="Handling Events" id="eventIntro">
12105 Agents can be informed of many events that occur in application
12106 programs.
12107 <p/>
12108 To handle events, designate a set of callback functions with
12109 <functionlink id="SetEventCallbacks"></functionlink>.
12110 For each event the corresponding callback function will be
12111 called.
12112 Arguments to the callback function provide additional
12113 information about the event.
12114 <p/>
12115 The callback function is usually called from within an application
12116 thread. The <jvmti/> implementation does not
12117 queue events in any way. This means
12118 that event callback functions must be written
12119 carefully. Here are some general guidelines. See
13854 <jobject/>
13855 <description>
13856 JNI local reference to the object that was allocated
13857 </description>
13858 </param>
13859 <param id="object_klass">
13860 <jclass/>
13861 <description>
13862 JNI local reference to the class of the object
13863 </description>
13864 </param>
13865 <param id="size">
13866 <jlong/>
13867 <description>
13868 Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
13869 </description>
13870 </param>
13871 </parameters>
13872 </event>
13873
13874 <event label="Sampled Object Allocation Trace"
13875 id="SampledObjectAlloc" const="JVMTI_EVENT_SAMPLED_OBJECT_ALLOC" num="86">
13876 <description>
13877 Sent when an object is sampled via the
13878 <internallink id="heap_monitoring"> Heap Sampling Monitoring system </internallink>.
13879 The event is sent once the allocation has been done and provides the object, stack trace
13880 for the allocation, the thread allocating, the size of allocation, and class.
13881 </description>
13882 <origin>new</origin>
13883 <capabilities>
13884 <required id="can_generate_sampled_object_alloc_events"></required>
13885 </capabilities>
13886 <parameters>
13887 <param id="jni_env">
13888 <outptr>
13889 <struct>JNIEnv</struct>
13890 </outptr>
13891 <description>
13892 The JNI environment of the event (current) thread.
13893 </description>
13894 </param>
13895 <param id="thread">
13896 <jthread/>
13897 <description>
13898 Thread allocating the object.
13899 </description>
13900 </param>
13901 <param id="object">
13902 <jobject/>
13903 <description>
13904 JNI local reference to the object that was allocated.
13905 </description>
13906 </param>
13907 <param id="object_klass">
13908 <jclass/>
13909 <description>
13910 JNI local reference to the class of the object
13911 </description>
13912 </param>
13913 <param id="size">
13914 <jlong/>
13915 <description>
13916 Size of the object (in bytes). See <functionlink id="GetObjectSize"/>.
13917 </description>
13918 </param>
13919 </parameters>
13920 </event>
13921
13922 <event label="Object Free"
13923 id="ObjectFree" const="JVMTI_EVENT_OBJECT_FREE" num="83">
13924 <description>
13925 An Object Free event is sent when the garbage collector frees an object.
13926 Events are only sent for tagged objects--see
13927 <internallink id="Heap">heap functions</internallink>.
13928 <p/>
13929 The event handler must not use JNI functions and
13930 must not use <jvmti/> functions except those which
13931 specifically allow such use (see the raw monitor, memory management,
13932 and environment local storage functions).
13933 </description>
13934 <origin>new</origin>
13935 <capabilities>
13936 <required id="can_generate_object_free_events"></required>
13937 </capabilities>
13938 <parameters>
13939 <param id="tag">
13940 <jlong/>
13941 <description>
|