4 #include "native/jni.h"
6 #define JVMTI_VERSION_1_0 0x30010000
8 typedef jobject jthread;
9 typedef jobject jthreadGroup;
10 typedef jlong jlocation;
11 struct _jrawMonitorID;
12 typedef struct _jrawMonitorID *jrawMonitorID;
13 typedef struct jvmtiEnv_struct jvmtiEnv;
16 JVMTI_ERROR_NONE = 0, /* No error has occurred. This is the error code that is
17 returned on successful completion of the function. */
18 JVMTI_ERROR_NULL_POINTER = 100, /* Pointer is unexpectedly NULL. */
19 JVMTI_ERROR_OUT_OF_MEMORY = 110, /* The function attempted to allocate memory
20 and no more memory was available for
22 JVMTI_ERROR_ACCESS_DENIED = 111, /* The desired functionality has not been
23 enabled in this virtual machine. */
24 JVMTI_ERROR_UNATTACHED_THREAD = 115, /* The thread being used to call this
25 function is not attached to the virtual
26 machine. Calls must be made from attached threads.
27 See AttachCurrentThread in the JNI invocation API. */
28 JVMTI_ERROR_INVALID_ENVIRONMENT = 116, /*
29 The JVM TI environment provided is no longer connected or is not an environment. */
30 JVMTI_ERROR_WRONG_PHASE = 112, /*
31 The desired functionality is not available in the current phase. Always returned if the virtual machine has completed running. */
32 JVMTI_ERROR_INTERNAL = 113, /*
33 An unexpected internal error has occurred. */
35 /* ****** Function Specific Required Errors ********** */
36 JVMTI_ERROR_INVALID_PRIORITY = 12, /*
38 JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13, /*
39 Thread was not suspended. */
40 JVMTI_ERROR_THREAD_SUSPENDED = 14, /*
41 Thread already suspended. */
42 JVMTI_ERROR_THREAD_NOT_ALIVE = 15, /*
43 This operation requires the thread to be alive--that is, it must be started and not yet have died. */
44 JVMTI_ERROR_CLASS_NOT_PREPARED = 22, /*
45 The class has been loaded but not yet prepared. */
46 JVMTI_ERROR_NO_MORE_FRAMES = 31, /*
47 There are no Java programming language or JNI stack frames at the specified depth. */
48 JVMTI_ERROR_OPAQUE_FRAME = 32, /*
49 Information about the frame is not available = e.g. for native frames, */
50 JVMTI_ERROR_DUPLICATE = 40, /*
52 JVMTI_ERROR_NOT_FOUND = 41, /*
53 Desired element = e.g. field or breakpoint, not found */
54 JVMTI_ERROR_NOT_MONITOR_OWNER = 51, /*
55 This thread doesn't own the raw monitor. */
56 JVMTI_ERROR_INTERRUPT = 52, /*
57 The call has been interrupted before completion. */
58 JVMTI_ERROR_UNMODIFIABLE_CLASS = 79, /*
59 The class cannot be modified. */
60 JVMTI_ERROR_NOT_AVAILABLE = 98, /*
61 The functionality is not available in this virtual machine. */
62 JVMTI_ERROR_ABSENT_INFORMATION = 101, /*
63 The requested information is not available. */
64 JVMTI_ERROR_INVALID_EVENT_TYPE = 102, /*
65 The specified event type ID is not recognized. */
66 JVMTI_ERROR_NATIVE_METHOD = 104, /*
67 The requested information is not available for native method.
68 Function Specific Agent Errors
69 The following errors are returned by some JVM TI functions. They are returned in the event of invalid parameters passed by the agent or usage in an invalid context. An implementation is not required to detect these errors. */
70 JVMTI_ERROR_INVALID_THREAD = 10, /*
71 The passed thread is not a valid thread.*/
72 JVMTI_ERROR_INVALID_FIELDID = 25, /*
74 JVMTI_ERROR_INVALID_METHODID = 23, /*
76 JVMTI_ERROR_INVALID_LOCATION = 24, /*
78 JVMTI_ERROR_INVALID_OBJECT = 20, /*
80 JVMTI_ERROR_INVALID_CLASS = 21, /*
82 JVMTI_ERROR_TYPE_MISMATCH = 34, /*
83 The variable is not an appropriate type for the function used. */
84 JVMTI_ERROR_INVALID_SLOT = 35, /*
86 JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99, /*
87 The capability being used is false in this environment. */
88 JVMTI_ERROR_INVALID_THREAD_GROUP = 11, /*
89 Thread group invalid. */
90 JVMTI_ERROR_INVALID_MONITOR = 50, /*
91 Invalid raw monitor. */
92 JVMTI_ERROR_ILLEGAL_ARGUMENT = 103, /*
94 JVMTI_ERROR_INVALID_TYPESTATE = 65, /*
95 The state of the thread has been modified, and is now inconsistent. */
96 JVMTI_ERROR_UNSUPPORTED_VERSION = 68, /*
97 A new class file has a version number not supported by this VM. */
98 JVMTI_ERROR_INVALID_CLASS_FORMAT = 60, /*
99 A new class file is malformed = the VM would return a ClassFormatError, */
100 JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61, /*
101 The new class file definitions would lead to a circular definition = the VM would return a ClassCircularityError, */
102 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63, /*
103 A new class file would require adding a method. */
104 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64, /*
105 A new class version changes a field. */
106 JVMTI_ERROR_FAILS_VERIFICATION = 62, /*
107 The class bytes fail verification. */
108 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66, /*
109 A direct superclass is different for the new class version, or the set of directly implemented interfaces is different. */
110 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67, /*
111 A new class version does not declare a method declared in the old class version. */
112 JVMTI_ERROR_NAMES_DONT_MATCH = 69, /*
113 The class name defined in the new class file is different from the name in the old class object. */
114 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70, /*
115 A new class version has different modifiers. */
116 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71 /*
117 A method in the new class version has different modifiers than its counterpart in the old class version.*/
123 JVMTI_PHASE_ONLOAD = 1,
124 JVMTI_PHASE_PRIMORDIAL = 2,
125 JVMTI_PHASE_START = 6,
126 JVMTI_PHASE_LIVE = 4,
132 JVMTI_JLOCATION_JVMBCI = 1,
133 JVMTI_JLOCATION_MACHINEPC = 2,
134 JVMTI_JLOCATION_OTHER = 0
135 } jvmtiJlocationFormat;
138 jlocation start_location;
140 } jvmtiLineNumberEntry;
146 jthreadGroup thread_group;
147 jobject context_class_loader;
151 JVMTI_VERBOSE_OTHER = 0,
152 JVMTI_VERBOSE_GC = 1,
153 JVMTI_VERBOSE_CLASS = 2,
154 JVMTI_VERBOSE_JNI = 4
159 jint class_byte_count;
160 const unsigned char* class_bytes;
161 } jvmtiClassDefinition;
163 typedef struct JNINativeInterface jniNativeInterface;
166 const void* start_address;
168 } jvmtiAddrLocationMap;
171 typedef void (JNICALL *jvmtiEventSingleStep)
172 (jvmtiEnv *jvmti_env,
178 typedef void (JNICALL *jvmtiEventBreakpoint)
179 (jvmtiEnv *jvmti_env,
185 typedef void (JNICALL *jvmtiEventFieldAccess)
186 (jvmtiEnv *jvmti_env,
195 typedef void (JNICALL *jvmtiEventFieldModification)
196 (jvmtiEnv *jvmti_env,
207 typedef void (JNICALL *jvmtiEventFramePop)
208 (jvmtiEnv *jvmti_env,
212 jboolean was_popped_by_exception);
214 typedef void (JNICALL *jvmtiEventMethodEntry)
215 (jvmtiEnv *jvmti_env,
220 typedef void (JNICALL *jvmtiEventMethodExit)
221 (jvmtiEnv *jvmti_env,
225 jboolean was_popped_by_exception,
226 jvalue return_value);
228 typedef void (JNICALL *jvmtiEventNativeMethodBind)
229 (jvmtiEnv *jvmti_env,
234 void** new_address_ptr);
236 typedef void (JNICALL *jvmtiEventException)
237 (jvmtiEnv *jvmti_env,
243 jmethodID catch_method,
244 jlocation catch_location);
246 typedef void (JNICALL *jvmtiEventExceptionCatch)
247 (jvmtiEnv *jvmti_env,
254 typedef void (JNICALL *jvmtiEventThreadStart)
255 (jvmtiEnv *jvmti_env,
259 typedef void (JNICALL *jvmtiEventThreadEnd)
260 (jvmtiEnv *jvmti_env,
264 typedef void (JNICALL *jvmtiEventClassLoad)
265 (jvmtiEnv *jvmti_env,
270 typedef void (JNICALL *jvmtiEventClassPrepare)
271 (jvmtiEnv *jvmti_env,
276 typedef void (JNICALL *jvmtiEventClassFileLoadHook)
277 (jvmtiEnv *jvmti_env,
279 jclass class_being_redefined,
282 jobject protection_domain,
284 const unsigned char* class_data,
285 jint* new_class_data_len,
286 unsigned char** new_class_data);
288 typedef void (JNICALL *jvmtiEventVMStart)
289 (jvmtiEnv *jvmti_env,
292 typedef void (JNICALL *jvmtiEventVMInit)
293 (jvmtiEnv *jvmti_env,
297 typedef void (JNICALL *jvmtiEventVMDeath)
298 (jvmtiEnv *jvmti_env,
302 typedef void (JNICALL *jvmtiEventCompiledMethodLoad)
303 (jvmtiEnv *jvmti_env,
306 const void* code_addr,
308 const jvmtiAddrLocationMap* map,
309 const void* compile_info);
311 typedef void (JNICALL *jvmtiEventCompiledMethodUnload)
312 (jvmtiEnv *jvmti_env,
314 const void* code_addr);
316 typedef void (JNICALL *jvmtiEventDynamicCodeGenerated)
317 (jvmtiEnv *jvmti_env,
322 typedef void (JNICALL *jvmtiEventDataDumpRequest)
323 (jvmtiEnv *jvmti_env);
325 typedef void (JNICALL *jvmtiEventMonitorContendedEnter)
326 (jvmtiEnv *jvmti_env,
331 typedef void (JNICALL *jvmtiEventMonitorContendedEntered)
332 (jvmtiEnv *jvmti_env,
337 typedef void (JNICALL *jvmtiEventMonitorWait)
338 (jvmtiEnv *jvmti_env,
344 typedef void (JNICALL *jvmtiEventMonitorWaited)
345 (jvmtiEnv *jvmti_env,
351 typedef void (JNICALL *jvmtiEventVMObjectAlloc)
352 (jvmtiEnv *jvmti_env,
359 typedef void (JNICALL *jvmtiEventObjectFree)
360 (jvmtiEnv *jvmti_env,
363 typedef void (JNICALL *jvmtiEventGarbageCollectionStart)
364 (jvmtiEnv *jvmti_env);
366 typedef void (JNICALL *jvmtiEventGarbageCollectionFinish)
367 (jvmtiEnv *jvmti_env);
369 typedef void (JNICALL *jvmtiStartFunction)
370 (jvmtiEnv* jvmti_env,
379 } jvmtiThreadGroupInfo;
386 jint notify_waiter_count;
387 jthread* notify_waiters;
391 jlocation start_location;
395 char* generic_signature;
397 } jvmtiLocalVariableEntry;
407 jvmtiFrameInfo* frame_buffer;
412 JVMTI_HEAP_OBJECT_TAGGED = 1,
413 JVMTI_HEAP_OBJECT_UNTAGGED = 2,
414 JVMTI_HEAP_OBJECT_EITHER = 3
415 } jvmtiHeapObjectFilter;
418 JVMTI_REFERENCE_CLASS = 1,
419 JVMTI_REFERENCE_FIELD = 2,
420 JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
421 JVMTI_REFERENCE_CLASS_LOADER = 4,
422 JVMTI_REFERENCE_SIGNERS = 5,
423 JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
424 JVMTI_REFERENCE_INTERFACE = 7,
425 JVMTI_REFERENCE_STATIC_FIELD = 8,
426 JVMTI_REFERENCE_CONSTANT_POOL = 9
427 } jvmtiObjectReferenceKind;
430 JVMTI_ITERATION_CONTINUE = 1,
431 JVMTI_ITERATION_IGNORE = 2,
432 JVMTI_ITERATION_ABORT = 0
433 } jvmtiIterationControl;
436 JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
437 JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
438 JVMTI_HEAP_ROOT_MONITOR = 3,
439 JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
440 JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
441 JVMTI_HEAP_ROOT_THREAD = 6,
442 JVMTI_HEAP_ROOT_OTHER = 7
445 typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
446 (jvmtiObjectReferenceKind reference_kind,
454 typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
455 (jvmtiHeapRootKind root_kind,
461 typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
462 (jvmtiHeapRootKind root_kind,
472 typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
478 typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
479 (jvmtiEnv* jvmti_env,
484 JVMTI_KIND_IN_PTR = 92,
485 JVMTI_KIND_IN_BUF = 93,
486 JVMTI_KIND_ALLOC_BUF = 94,
487 JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
489 JVMTI_KIND_OUT_BUF = 97
493 JVMTI_TYPE_JBYTE = 101,
494 JVMTI_TYPE_JCHAR = 102,
495 JVMTI_TYPE_JSHORT = 103,
496 JVMTI_TYPE_JINT = 104,
497 JVMTI_TYPE_JLONG = 105,
498 JVMTI_TYPE_JFLOAT = 106,
499 JVMTI_TYPE_JDOUBLE = 107,
500 JVMTI_TYPE_JBOOLEAN = 108,
501 JVMTI_TYPE_JOBJECT = 109,
502 JVMTI_TYPE_JTHREAD = 110,
503 JVMTI_TYPE_JCLASS = 111,
504 JVMTI_TYPE_JVALUE = 112,
505 JVMTI_TYPE_JFIELDID = 113,
506 JVMTI_TYPE_JMETHODID = 114,
507 JVMTI_TYPE_CCHAR = 115,
508 JVMTI_TYPE_CVOID = 116,
509 JVMTI_TYPE_JNIENV = 117
515 jvmtiParamTypes base_type;
520 jint extension_event_index;
522 char* short_description;
524 jvmtiParamInfo* params;
525 } jvmtiExtensionEventInfo;
527 typedef void (JNICALL *jvmtiExtensionEvent)
528 (jvmtiEnv* jvmti_env,
532 JVMTI_TIMER_USER_CPU = 30,
533 JVMTI_TIMER_TOTAL_CPU = 31,
534 JVMTI_TIMER_ELAPSED = 32
539 jboolean may_skip_forward;
540 jboolean may_skip_backward;
547 jvmtiExtensionFunction func;
549 char* short_description;
551 jvmtiParamInfo* params;
554 } jvmtiExtensionFunctionInfo;
556 typedef void* jvmtiEventReserved;
559 jvmtiEventVMInit VMInit;
560 jvmtiEventVMDeath VMDeath;
561 jvmtiEventThreadStart ThreadStart;
562 jvmtiEventThreadEnd ThreadEnd;
563 jvmtiEventClassFileLoadHook ClassFileLoadHook;
564 jvmtiEventClassLoad ClassLoad;
565 jvmtiEventClassPrepare ClassPrepare;
566 jvmtiEventVMStart VMStart;
567 jvmtiEventException Exception;
568 jvmtiEventExceptionCatch ExceptionCatch;
569 jvmtiEventSingleStep SingleStep;
570 jvmtiEventFramePop FramePop;
571 jvmtiEventBreakpoint Breakpoint;
572 jvmtiEventFieldAccess FieldAccess;
573 jvmtiEventFieldModification FieldModification;
574 jvmtiEventMethodEntry MethodEntry;
575 jvmtiEventMethodExit MethodExit;
576 jvmtiEventNativeMethodBind NativeMethodBind;
577 jvmtiEventCompiledMethodLoad CompiledMethodLoad;
578 jvmtiEventCompiledMethodUnload CompiledMethodUnload;
579 jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
580 jvmtiEventDataDumpRequest DataDumpRequest;
581 jvmtiEventReserved reserved72;
582 jvmtiEventMonitorWait MonitorWait;
583 jvmtiEventMonitorWaited MonitorWaited;
584 jvmtiEventMonitorContendedEnter MonitorContendedEnter;
585 jvmtiEventMonitorContendedEntered MonitorContendedEntered;
586 jvmtiEventReserved reserved77;
587 jvmtiEventReserved reserved78;
588 jvmtiEventReserved reserved79;
589 jvmtiEventReserved reserved80;
590 jvmtiEventGarbageCollectionStart GarbageCollectionStart;
591 jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
592 jvmtiEventObjectFree ObjectFree;
593 jvmtiEventVMObjectAlloc VMObjectAlloc;
594 } jvmtiEventCallbacks;
602 JVMTI_MIN_EVENT_TYPE_VAL = 50,
603 JVMTI_EVENT_VM_INIT = 50,
604 JVMTI_EVENT_VM_DEATH = 51,
605 JVMTI_EVENT_THREAD_START = 52,
606 JVMTI_EVENT_THREAD_END = 53,
607 JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
608 JVMTI_EVENT_CLASS_LOAD = 55,
609 JVMTI_EVENT_CLASS_PREPARE = 56,
610 JVMTI_EVENT_VM_START = 57,
611 JVMTI_EVENT_EXCEPTION = 58,
612 JVMTI_EVENT_EXCEPTION_CATCH = 59,
613 JVMTI_EVENT_SINGLE_STEP = 60,
614 JVMTI_EVENT_FRAME_POP = 61,
615 JVMTI_EVENT_BREAKPOINT = 62,
616 JVMTI_EVENT_FIELD_ACCESS = 63,
617 JVMTI_EVENT_FIELD_MODIFICATION = 64,
618 JVMTI_EVENT_METHOD_ENTRY = 65,
619 JVMTI_EVENT_METHOD_EXIT = 66,
620 JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
621 JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
622 JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
623 JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
624 JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
625 JVMTI_EVENT_MONITOR_WAIT = 73,
626 JVMTI_EVENT_MONITOR_WAITED = 74,
627 JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
628 JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
629 JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
630 JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
631 JVMTI_EVENT_OBJECT_FREE = 83,
632 JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
633 JVMTI_MAX_EVENT_TYPE_VAL = 84
638 unsigned int can_tag_objects : 1;
639 unsigned int can_generate_field_modification_events : 1;
640 unsigned int can_generate_field_access_events : 1;
641 unsigned int can_get_bytecodes : 1;
642 unsigned int can_get_synthetic_attribute : 1;
643 unsigned int can_get_owned_monitor_info : 1;
644 unsigned int can_get_current_contended_monitor : 1;
645 unsigned int can_get_monitor_info : 1;
646 unsigned int can_pop_frame : 1;
647 unsigned int can_redefine_classes : 1;
648 unsigned int can_signal_thread : 1;
649 unsigned int can_get_source_file_name : 1;
650 unsigned int can_get_line_numbers : 1;
651 unsigned int can_get_source_debug_extension : 1;
652 unsigned int can_access_local_variables : 1;
653 unsigned int can_maintain_original_method_order : 1;
654 unsigned int can_generate_single_step_events : 1;
655 unsigned int can_generate_exception_events : 1;
656 unsigned int can_generate_frame_pop_events : 1;
657 unsigned int can_generate_breakpoint_events : 1;
658 unsigned int can_suspend : 1;
659 unsigned int can_redefine_any_class : 1;
660 unsigned int can_get_current_thread_cpu_time : 1;
661 unsigned int can_get_thread_cpu_time : 1;
662 unsigned int can_generate_method_entry_events : 1;
663 unsigned int can_generate_method_exit_events : 1;
664 unsigned int can_generate_all_class_hook_events : 1;
665 unsigned int can_generate_compiled_method_load_events : 1;
666 unsigned int can_generate_monitor_events : 1;
667 unsigned int can_generate_vm_object_alloc_events : 1;
668 unsigned int can_generate_native_method_bind_events : 1;
669 unsigned int can_generate_garbage_collection_events : 1;
670 unsigned int can_generate_object_free_events : 1;
683 /* Function Interface */
684 struct jvmtiEnv_struct {
686 jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env,
688 jvmtiEvent event_type,
689 jthread event_thread,
692 jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env,
693 jint* threads_count_ptr,
694 jthread** threads_ptr);
695 jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env,
697 jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env,
699 jvmtiError (JNICALL *StopThread) (jvmtiEnv* env,
702 jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env,
704 jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env,
706 jvmtiThreadInfo* info_ptr);
707 jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env,
709 jint* owned_monitor_count_ptr,
710 jobject** owned_monitors_ptr);
711 jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env,
713 jobject* monitor_ptr);
714 jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env,
716 jvmtiStartFunction proc,
719 jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env,
720 jint* group_count_ptr,
721 jthreadGroup** groups_ptr);
722 jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env,
724 jvmtiThreadGroupInfo* info_ptr);
725 jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env,
727 jint* thread_count_ptr,
728 jthread** threads_ptr,
729 jint* group_count_ptr,
730 jthreadGroup** groups_ptr);
731 jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env,
734 jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env,
736 jint* thread_state_ptr);
738 jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env,
741 jmethodID* method_ptr,
742 jlocation* location_ptr);
743 jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env,
746 jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env,
751 jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env,
756 jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env,
761 jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env,
766 jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env,
771 jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env,
776 jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env,
781 jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env,
786 jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env,
791 jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env,
796 jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env,
798 jrawMonitorID* monitor_ptr);
799 jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env,
800 jrawMonitorID monitor);
801 jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env,
802 jrawMonitorID monitor);
803 jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env,
804 jrawMonitorID monitor);
805 jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env,
806 jrawMonitorID monitor,
808 jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env,
809 jrawMonitorID monitor);
810 jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env,
811 jrawMonitorID monitor);
812 jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env,
815 jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env,
819 jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env,
822 jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env,
825 jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env,
828 jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env,
832 jvmtiError (JNICALL *Allocate) (jvmtiEnv* env,
834 unsigned char** mem_ptr);
835 jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env,
837 jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env,
839 char** signature_ptr,
841 jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env,
844 jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env,
846 char** source_name_ptr);
847 jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env,
849 jint* modifiers_ptr);
850 jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env,
852 jint* method_count_ptr,
853 jmethodID** methods_ptr);
854 jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env,
856 jint* field_count_ptr,
857 jfieldID** fields_ptr);
858 jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env,
860 jint* interface_count_ptr,
861 jclass** interfaces_ptr);
862 jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env,
864 jboolean* is_interface_ptr);
865 jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env,
867 jboolean* is_array_class_ptr);
868 jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env,
870 jobject* classloader_ptr);
871 jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env,
873 jint* hash_code_ptr);
874 jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env,
876 jvmtiMonitorUsage* info_ptr);
877 jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env,
881 char** signature_ptr,
883 jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env,
886 jclass* declaring_class_ptr);
887 jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env,
890 jint* modifiers_ptr);
891 jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env,
894 jboolean* is_synthetic_ptr);
895 jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env,
898 char** signature_ptr,
900 jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env,
902 jclass* declaring_class_ptr);
903 jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env,
905 jint* modifiers_ptr);
907 jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env,
910 jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env,
913 jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env,
915 jint* entry_count_ptr,
916 jvmtiLineNumberEntry** table_ptr);
917 jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env,
919 jlocation* start_location_ptr,
920 jlocation* end_location_ptr);
921 jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env,
923 jint* entry_count_ptr,
924 jvmtiLocalVariableEntry** table_ptr);
927 jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env,
929 jint* bytecode_count_ptr,
930 unsigned char** bytecodes_ptr);
931 jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env,
933 jboolean* is_native_ptr);
934 jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env,
936 jboolean* is_synthetic_ptr);
937 jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env,
938 jint* class_count_ptr,
939 jclass** classes_ptr);
940 jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env,
941 jobject initiating_loader,
942 jint* class_count_ptr,
943 jclass** classes_ptr);
944 jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env,
952 jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env,
954 const jvmtiClassDefinition* class_definitions);
955 jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env,
957 jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env,
958 jvmtiCapabilities* capabilities_ptr);
959 jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env,
961 char** source_debug_extension_ptr);
962 jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env,
964 jboolean* is_obsolete_ptr);
965 jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env,
967 const jthread* request_list,
968 jvmtiError* results);
969 jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env,
971 const jthread* request_list,
972 jvmtiError* results);
979 jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env,
980 jint max_frame_count,
981 jvmtiStackInfo** stack_info_ptr,
982 jint* thread_count_ptr);
983 jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env,
985 const jthread* thread_list,
986 jint max_frame_count,
987 jvmtiStackInfo** stack_info_ptr);
988 jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env,
991 jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env,
994 jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env,
997 jint max_frame_count,
998 jvmtiFrameInfo* frame_buffer,
1001 jvmtiError (JNICALL *GetTag) (jvmtiEnv* env,
1004 jvmtiError (JNICALL *SetTag) (jvmtiEnv* env,
1007 jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
1008 jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env,
1010 jvmtiObjectReferenceCallback object_reference_callback,
1012 jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env,
1013 jvmtiHeapRootCallback heap_root_callback,
1014 jvmtiStackReferenceCallback stack_ref_callback,
1015 jvmtiObjectReferenceCallback object_ref_callback,
1017 jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env,
1018 jvmtiHeapObjectFilter object_filter,
1019 jvmtiHeapObjectCallback heap_object_callback,
1021 jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env,
1023 jvmtiHeapObjectFilter object_filter,
1024 jvmtiHeapObjectCallback heap_object_callback,
1027 jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env,
1031 jobject** object_result_ptr,
1032 jlong** tag_result_ptr);
1038 jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env,
1039 const jniNativeInterface* function_table);
1040 jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env,
1041 jniNativeInterface** function_table);
1042 jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env,
1043 const jvmtiEventCallbacks* callbacks,
1044 jint size_of_callbacks);
1045 jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env,
1046 jvmtiEvent event_type);
1047 jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env,
1048 jint* extension_count_ptr,
1049 jvmtiExtensionFunctionInfo** extensions);
1050 jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env,
1051 jint* extension_count_ptr,
1052 jvmtiExtensionEventInfo** extensions);
1053 jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env,
1054 jint extension_event_index,
1055 jvmtiExtensionEvent callback);
1056 jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
1057 jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env,
1060 jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env,
1061 jvmtiJlocationFormat* format_ptr);
1062 jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env,
1064 char*** property_ptr);
1065 jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env,
1066 const char* property,
1068 jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env,
1069 const char* property,
1071 jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env,
1072 jvmtiPhase* phase_ptr);
1073 jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env,
1074 jvmtiTimerInfo* info_ptr);
1075 jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env,
1077 jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env,
1078 jvmtiTimerInfo* info_ptr);
1079 jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env,
1082 jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env,
1083 jvmtiTimerInfo* info_ptr);
1084 jvmtiError (JNICALL *GetTime) (jvmtiEnv* env,
1086 jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env,
1087 jvmtiCapabilities* capabilities_ptr);
1089 jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env,
1090 const jvmtiCapabilities* capabilities_ptr);
1091 jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env,
1092 const jvmtiCapabilities* capabilities_ptr);
1093 jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env,
1094 jint* processor_count_ptr);
1097 jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env,
1099 jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env,
1101 jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env,
1102 const char* segment);
1103 jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env,
1104 jvmtiVerboseFlag flag,
1109 jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env,
1114 /* cacao specific */
1115 jvmtiEnv* new_jvmtienv();
1116 void set_jvmti_phase(jvmtiPhase p);
1124 * These are local overrides for various environment variables in Emacs.
1125 * Please do not remove this and leave it at the end of the file, where
1126 * Emacs will automagically detect them.
1127 * ---------------------------------------------------------------------
1130 * indent-tabs-mode: t