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="GetLiveTraces" num="157"> 11621 <synopsis>Get Live Traces</synopsis> 11622 <description> 11623 Get Live Heap Sampled traces. The fields of the <datalink id="jvmtiStackTraces"/> 11624 structure are filled in with details of the specified sampled allocation. 11625 </description> 11626 <origin>new</origin> 11627 <capabilities> 11628 </capabilities> 11629 <parameters> 11630 <param id="stack_traces"> 11631 <outptr><struct>jvmtiStackTraces</struct></outptr> 11632 <description> 11633 The stack trace data structure to be filled. 11634 </description> 11635 </param> 11636 </parameters> 11637 <errors> 11638 </errors> 11639 </function> 11640 11641 <function id="GetGarbageTraces" num="158"> 11642 <synopsis>Get Garbage Traces</synopsis> 11643 <description> 11644 Get the recent garbage heap sampled traces. The fields of the <datalink id="jvmtiStackTraces"/> 11645 structure are filled in with details of the specified sampled allocation. 11646 </description> 11647 <origin>new</origin> 11648 <capabilities> 11649 </capabilities> 11650 <parameters> 11651 <param id="stack_traces"> 11652 <outptr><struct>jvmtiStackTraces</struct></outptr> 11653 <description> 11654 The stack trace data structure to be filled. 11655 </description> 11656 </param> 11657 </parameters> 11658 <errors> 11659 </errors> 11660 </function> 11661 11662 <function id="GetFrequentGarbageTraces" num="159"> 11663 <synopsis>Get Frequent Garbage Traces</synopsis> 11664 <description> 11665 Get the frequent garbage heap sampled traces. The fields of the <datalink id="jvmtiStackTraces"/> 11666 structure are filled in with details of the specified sampled allocation. 11667 </description> 11668 <origin>new</origin> 11669 <capabilities> 11670 </capabilities> 11671 <parameters> 11672 <param id="stack_traces"> 11673 <outptr><struct>jvmtiStackTraces</struct></outptr> 11674 <description> 11675 The stack trace data structure to be filled. 11676 </description> 11677 </param> 11678 </parameters> 11679 <errors> 11680 </errors> 11681 </function> 11682 11683 <function id="ReleaseTraces" num="160"> 11684 <synopsis>Release traces provided by the heap monitoring</synopsis> 11685 <description> 11686 Release traces provided by any of the trace retrieval methods. 11687 </description> 11688 <origin>new</origin> 11689 <capabilities> 11690 </capabilities> 11691 <parameters> 11692 <param id="stack_traces"> 11693 <outptr><struct>jvmtiStackTraces</struct></outptr> 11694 <description> 11695 The stack trace data structure to be released. 11696 </description> 11697 </param> 11698 </parameters> 11699 <errors> 11700 </errors> 11701 </function> 11702 </category> 11703 11704 </functionsection> 11705 11706 <errorsection label="Error Reference"> 11707 <intro> 11708 Every <jvmti/> function returns a <b><code>jvmtiError</code></b> error code. 11709 <p/> 11710 It is the responsibility of the agent to call <jvmti/> functions with 11711 valid parameters and in the proper context (calling thread is attached, 11712 phase is correct, etc.). 11713 Detecting some error conditions may be difficult, inefficient, or 11714 impossible for an implementation. 11715 The errors listed in 11716 <internallink id="reqerrors">Function Specific Required Errors</internallink> 11717 must be detected by the implementation. 11718 All other errors represent the recommended response to the error 11719 condition. 11720 </intro> 11721 11722 <errorcategory id="universal-error" label="Universal Errors"> 11723 <intro> |