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 11549 <errorcategory id="universal-error" label="Universal Errors"> 11550 <intro> | 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 <category id="heap_monitoring" label="Heap Monitoring"> 11532 <typedef id="jvmtiCallFrame" label="Call Frame"> 11533 <field id="bci"> 11534 <jint/> 11535 <description>BCI for the given allocation.</description> 11536 </field> 11537 <field id="method_id"> 11538 <jmethodID/> 11539 <description>Method ID for the given frame.</description> 11540 </field> 11541 </typedef> 11542 11543 <typedef id="jvmtiStackTrace" label="Stack Trace"> 11544 <field id="env_id"> 11545 <allocfieldbuf><struct>JNIEnv</struct></allocfieldbuf> 11546 <description>Environment where the trace was recorded.</description> 11547 </field> 11548 <field id="frames"> 11549 <allocfieldbuf outcount="trace_count"> 11550 <struct>jvmtiCallFrame</struct> 11551 </allocfieldbuf> 11552 <description>Pointer to the call frames.</description> 11553 </field> 11554 <field id="frame_count"> 11555 <jint/> 11556 <description>The number of frames for the trace.</description> 11557 </field> 11558 <field id="size"> 11559 <jint/> 11560 <description>The size of the object allocation.</description> 11561 </field> 11562 <field id="thread_id"> 11563 <jlong/> 11564 <description>The thread id number.</description> 11565 </field> 11566 </typedef> 11567 11568 <typedef id="jvmtiStackTraces" label="Stack Traces"> 11569 <field id="stack_traces"> 11570 <allocfieldbuf outcount="trace_count"> 11571 <struct>jvmtiStackTrace</struct> 11572 </allocfieldbuf> 11573 <description> 11574 The <datalink id="jvmtiStackTrace"/> array with the various stack traces. 11575 </description> 11576 </field> 11577 11578 <field id="trace_count"> 11579 <jint/> 11580 <description> 11581 Number of traces pointed by the array <datalink id="jvmtiStackTraces"/>. 11582 </description> 11583 </field> 11584 </typedef> 11585 11586 <function id="StartHeapSampling" phase="any" num="156"> 11587 <synopsis>Start Heap Sampling</synopsis> 11588 <description> 11589 Start the heap sampler in the JVM. The function provides, via its argument, the sampling 11590 rate requested and will fill internal data structures with heap allocation samples. The 11591 samples are obtained via the <functionlink id="GetLiveTraces"></functionlink>, 11592 <functionlink id="GetGarbageTraces"></functionlink>, <functionlink id="GetFrequentGarbageTraces"></functionlink>, 11593 functions. 11594 </description> 11595 <origin>new</origin> 11596 <capabilities> 11597 </capabilities> 11598 <parameters> 11599 <param id="monitoring_rate"> 11600 <jint/> 11601 <description> 11602 The monitoring rate used for sampling. The sampler will use a statistical approach to 11603 provide in average sampling every <paramlink id="monitoring_rate"/> allocated bytes. 11604 </description> 11605 </param> 11606 <param id="max_storage"> 11607 <jint/> 11608 <description> 11609 The maximum storage used for the sampler. By default, the value is 200. 11610 </description> 11611 </param> 11612 </parameters> 11613 <errors> 11614 <error id="JVMTI_ERROR_ILLEGAL_ARGUMENT"> 11615 <paramlink id="monitoring_period"></paramlink> is less than zero. 11616 </error> 11617 </errors> 11618 </function> 11619 11620 <function id="StopHeapSampling" phase="any" num="157"> 11621 <synopsis>Start Heap Sampling</synopsis> 11622 <description> 11623 Stop the heap sampler in the JVM. 11624 Any sample obtained during sampling is still available via the <functionlink id="GetLiveTraces"></functionlink>, 11625 <functionlink id="GetGarbageTraces"></functionlink>, <functionlink id="GetFrequentGarbageTraces"></functionlink>, 11626 functions. 11627 </description> 11628 <origin>new</origin> 11629 <capabilities> 11630 </capabilities> 11631 <parameters> 11632 </parameters> 11633 <errors> 11634 </errors> 11635 </function> 11636 11637 <function id="GetLiveTraces" num="158"> 11638 <synopsis>Get Live Traces</synopsis> 11639 <description> 11640 Get Live Heap Sampled traces. The fields of the <datalink id="jvmtiStackTraces"/> 11641 structure are filled in with details of the specified sampled allocation. 11642 </description> 11643 <origin>new</origin> 11644 <capabilities> 11645 </capabilities> 11646 <parameters> 11647 <param id="stack_traces"> 11648 <outptr><struct>jvmtiStackTraces</struct></outptr> 11649 <description> 11650 The stack trace data structure to be filled. 11651 </description> 11652 </param> 11653 </parameters> 11654 <errors> 11655 </errors> 11656 </function> 11657 11658 <function id="GetGarbageTraces" num="159"> 11659 <synopsis>Get Garbage Traces</synopsis> 11660 <description> 11661 Get the recent garbage heap sampled traces. The fields of the <datalink id="jvmtiStackTraces"/> 11662 structure are filled in with details of the specified sampled allocation. 11663 </description> 11664 <origin>new</origin> 11665 <capabilities> 11666 </capabilities> 11667 <parameters> 11668 <param id="stack_traces"> 11669 <outptr><struct>jvmtiStackTraces</struct></outptr> 11670 <description> 11671 The stack trace data structure to be filled. 11672 </description> 11673 </param> 11674 </parameters> 11675 <errors> 11676 </errors> 11677 </function> 11678 11679 <function id="GetFrequentGarbageTraces" num="160"> 11680 <synopsis>Get Frequent Garbage Traces</synopsis> 11681 <description> 11682 Get the frequent garbage heap sampled traces. The fields of the <datalink id="jvmtiStackTraces"/> 11683 structure are filled in with details of the specified sampled allocation. 11684 </description> 11685 <origin>new</origin> 11686 <capabilities> 11687 </capabilities> 11688 <parameters> 11689 <param id="stack_traces"> 11690 <outptr><struct>jvmtiStackTraces</struct></outptr> 11691 <description> 11692 The stack trace data structure to be filled. 11693 </description> 11694 </param> 11695 </parameters> 11696 <errors> 11697 </errors> 11698 </function> 11699 11700 <function id="ReleaseTraces" num="161"> 11701 <synopsis>Release traces provided by the heap monitoring</synopsis> 11702 <description> 11703 Release traces provided by any of the trace retrieval methods. 11704 </description> 11705 <origin>new</origin> 11706 <capabilities> 11707 </capabilities> 11708 <parameters> 11709 <param id="stack_traces"> 11710 <outptr><struct>jvmtiStackTraces</struct></outptr> 11711 <description> 11712 The stack trace data structure to be released. 11713 </description> 11714 </param> 11715 </parameters> 11716 <errors> 11717 </errors> 11718 </function> 11719 </category> 11720 11721 </functionsection> 11722 11723 <errorsection label="Error Reference"> 11724 <intro> 11725 Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code. 11726 <p/> 11727 It is the responsibility of the agent to call <jvmti/> functions with 11728 valid parameters and in the proper context (calling thread is attached, 11729 phase is correct, etc.). 11730 Detecting some error conditions may be difficult, inefficient, or 11731 impossible for an implementation. 11732 The errors listed in 11733 <internallink id="reqerrors">Function Specific Required Errors</internallink> 11734 must be detected by the implementation. 11735 All other errors represent the recommended response to the error 11736 condition. 11737 </intro> 11738 11739 <errorcategory id="universal-error" label="Universal Errors"> 11740 <intro> |