2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
26 /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
28 /* Include file for the Java(tm) Virtual Machine Tool Interface */
30 #ifndef _JAVA_JVMTI_H_
31 #define _JAVA_JVMTI_H_
40 JVMTI_VERSION_1 = 0x30010000,
41 JVMTI_VERSION_1_0 = 0x30010000,
42 JVMTI_VERSION_1_1 = 0x30010100,
43 JVMTI_VERSION_1_2 = 0x30010200,
44 JVMTI_VERSION_9 = 0x30090000,
45 JVMTI_VERSION_11 = 0x300B0000,
47 JVMTI_VERSION = 0x30000000 + (11 * 0x10000) + (0 * 0x100) + 0 /* version: 11.0.0 */
50 JNIEXPORT jint JNICALL
51 Agent_OnLoad(JavaVM *vm, char *options, void *reserved);
53 JNIEXPORT jint JNICALL
54 Agent_OnAttach(JavaVM* vm, char* options, void* reserved);
56 JNIEXPORT void JNICALL
57 Agent_OnUnload(JavaVM *vm);
59 /* Forward declaration of the environment */
63 struct jvmtiInterface_1_;
66 typedef _jvmtiEnv jvmtiEnv;
68 typedef const struct jvmtiInterface_1_ *jvmtiEnv;
69 #endif /* __cplusplus */
71 /* Derived Base Types */
73 typedef jobject jthread;
74 typedef jobject jthreadGroup;
75 typedef jlong jlocation;
76 struct _jrawMonitorID;
77 typedef struct _jrawMonitorID *jrawMonitorID;
78 typedef struct JNINativeInterface_ jniNativeInterface;
83 /* Thread State Flags */
86 JVMTI_THREAD_STATE_ALIVE = 0x0001,
87 JVMTI_THREAD_STATE_TERMINATED = 0x0002,
88 JVMTI_THREAD_STATE_RUNNABLE = 0x0004,
89 JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400,
90 JVMTI_THREAD_STATE_WAITING = 0x0080,
91 JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010,
92 JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020,
93 JVMTI_THREAD_STATE_SLEEPING = 0x0040,
94 JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100,
95 JVMTI_THREAD_STATE_PARKED = 0x0200,
96 JVMTI_THREAD_STATE_SUSPENDED = 0x100000,
97 JVMTI_THREAD_STATE_INTERRUPTED = 0x200000,
98 JVMTI_THREAD_STATE_IN_NATIVE = 0x400000,
99 JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000,
100 JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000,
101 JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000
104 /* java.lang.Thread.State Conversion Masks */
107 JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT,
108 JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0,
109 JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED,
110 JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE,
111 JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER,
112 JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY,
113 JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
116 /* Thread Priority Constants */
119 JVMTI_THREAD_MIN_PRIORITY = 1,
120 JVMTI_THREAD_NORM_PRIORITY = 5,
121 JVMTI_THREAD_MAX_PRIORITY = 10
124 /* Heap Filter Flags */
127 JVMTI_HEAP_FILTER_TAGGED = 0x4,
128 JVMTI_HEAP_FILTER_UNTAGGED = 0x8,
129 JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10,
130 JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20
133 /* Heap Visit Control Flags */
136 JVMTI_VISIT_OBJECTS = 0x100,
137 JVMTI_VISIT_ABORT = 0x8000
140 /* Heap Reference Enumeration */
143 JVMTI_HEAP_REFERENCE_CLASS = 1,
144 JVMTI_HEAP_REFERENCE_FIELD = 2,
145 JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3,
146 JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4,
147 JVMTI_HEAP_REFERENCE_SIGNERS = 5,
148 JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6,
149 JVMTI_HEAP_REFERENCE_INTERFACE = 7,
150 JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8,
151 JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9,
152 JVMTI_HEAP_REFERENCE_SUPERCLASS = 10,
153 JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21,
154 JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22,
155 JVMTI_HEAP_REFERENCE_MONITOR = 23,
156 JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24,
157 JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25,
158 JVMTI_HEAP_REFERENCE_THREAD = 26,
159 JVMTI_HEAP_REFERENCE_OTHER = 27
160 } jvmtiHeapReferenceKind;
162 /* Primitive Type Enumeration */
165 JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90,
166 JVMTI_PRIMITIVE_TYPE_BYTE = 66,
167 JVMTI_PRIMITIVE_TYPE_CHAR = 67,
168 JVMTI_PRIMITIVE_TYPE_SHORT = 83,
169 JVMTI_PRIMITIVE_TYPE_INT = 73,
170 JVMTI_PRIMITIVE_TYPE_LONG = 74,
171 JVMTI_PRIMITIVE_TYPE_FLOAT = 70,
172 JVMTI_PRIMITIVE_TYPE_DOUBLE = 68
173 } jvmtiPrimitiveType;
175 /* Heap Object Filter Enumeration */
178 JVMTI_HEAP_OBJECT_TAGGED = 1,
179 JVMTI_HEAP_OBJECT_UNTAGGED = 2,
180 JVMTI_HEAP_OBJECT_EITHER = 3
181 } jvmtiHeapObjectFilter;
183 /* Heap Root Kind Enumeration */
186 JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
187 JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
188 JVMTI_HEAP_ROOT_MONITOR = 3,
189 JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
190 JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
191 JVMTI_HEAP_ROOT_THREAD = 6,
192 JVMTI_HEAP_ROOT_OTHER = 7
195 /* Object Reference Enumeration */
198 JVMTI_REFERENCE_CLASS = 1,
199 JVMTI_REFERENCE_FIELD = 2,
200 JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
201 JVMTI_REFERENCE_CLASS_LOADER = 4,
202 JVMTI_REFERENCE_SIGNERS = 5,
203 JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
204 JVMTI_REFERENCE_INTERFACE = 7,
205 JVMTI_REFERENCE_STATIC_FIELD = 8,
206 JVMTI_REFERENCE_CONSTANT_POOL = 9
207 } jvmtiObjectReferenceKind;
209 /* Iteration Control Enumeration */
212 JVMTI_ITERATION_CONTINUE = 1,
213 JVMTI_ITERATION_IGNORE = 2,
214 JVMTI_ITERATION_ABORT = 0
215 } jvmtiIterationControl;
217 /* Class Status Flags */
220 JVMTI_CLASS_STATUS_VERIFIED = 1,
221 JVMTI_CLASS_STATUS_PREPARED = 2,
222 JVMTI_CLASS_STATUS_INITIALIZED = 4,
223 JVMTI_CLASS_STATUS_ERROR = 8,
224 JVMTI_CLASS_STATUS_ARRAY = 16,
225 JVMTI_CLASS_STATUS_PRIMITIVE = 32
228 /* Event Enable/Disable */
235 /* Extension Function/Event Parameter Types */
238 JVMTI_TYPE_JBYTE = 101,
239 JVMTI_TYPE_JCHAR = 102,
240 JVMTI_TYPE_JSHORT = 103,
241 JVMTI_TYPE_JINT = 104,
242 JVMTI_TYPE_JLONG = 105,
243 JVMTI_TYPE_JFLOAT = 106,
244 JVMTI_TYPE_JDOUBLE = 107,
245 JVMTI_TYPE_JBOOLEAN = 108,
246 JVMTI_TYPE_JOBJECT = 109,
247 JVMTI_TYPE_JTHREAD = 110,
248 JVMTI_TYPE_JCLASS = 111,
249 JVMTI_TYPE_JVALUE = 112,
250 JVMTI_TYPE_JFIELDID = 113,
251 JVMTI_TYPE_JMETHODID = 114,
252 JVMTI_TYPE_CCHAR = 115,
253 JVMTI_TYPE_CVOID = 116,
254 JVMTI_TYPE_JNIENV = 117
257 /* Extension Function/Event Parameter Kinds */
261 JVMTI_KIND_IN_PTR = 92,
262 JVMTI_KIND_IN_BUF = 93,
263 JVMTI_KIND_ALLOC_BUF = 94,
264 JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
266 JVMTI_KIND_OUT_BUF = 97
272 JVMTI_TIMER_USER_CPU = 30,
273 JVMTI_TIMER_TOTAL_CPU = 31,
274 JVMTI_TIMER_ELAPSED = 32
277 /* Phases of execution */
280 JVMTI_PHASE_ONLOAD = 1,
281 JVMTI_PHASE_PRIMORDIAL = 2,
282 JVMTI_PHASE_START = 6,
283 JVMTI_PHASE_LIVE = 4,
287 /* Version Interface Types */
290 JVMTI_VERSION_INTERFACE_JNI = 0x00000000,
291 JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000
297 JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000,
298 JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000,
299 JVMTI_VERSION_MASK_MINOR = 0x0000FF00,
300 JVMTI_VERSION_MASK_MICRO = 0x000000FF
306 JVMTI_VERSION_SHIFT_MAJOR = 16,
307 JVMTI_VERSION_SHIFT_MINOR = 8,
308 JVMTI_VERSION_SHIFT_MICRO = 0
311 /* Verbose Flag Enumeration */
314 JVMTI_VERBOSE_OTHER = 0,
315 JVMTI_VERBOSE_GC = 1,
316 JVMTI_VERBOSE_CLASS = 2,
317 JVMTI_VERBOSE_JNI = 4
320 /* JLocation Format Enumeration */
323 JVMTI_JLOCATION_JVMBCI = 1,
324 JVMTI_JLOCATION_MACHINEPC = 2,
325 JVMTI_JLOCATION_OTHER = 0
326 } jvmtiJlocationFormat;
328 /* Resource Exhaustion Flags */
331 JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001,
332 JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002,
333 JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004
339 JVMTI_ERROR_NONE = 0,
340 JVMTI_ERROR_INVALID_THREAD = 10,
341 JVMTI_ERROR_INVALID_THREAD_GROUP = 11,
342 JVMTI_ERROR_INVALID_PRIORITY = 12,
343 JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13,
344 JVMTI_ERROR_THREAD_SUSPENDED = 14,
345 JVMTI_ERROR_THREAD_NOT_ALIVE = 15,
346 JVMTI_ERROR_INVALID_OBJECT = 20,
347 JVMTI_ERROR_INVALID_CLASS = 21,
348 JVMTI_ERROR_CLASS_NOT_PREPARED = 22,
349 JVMTI_ERROR_INVALID_METHODID = 23,
350 JVMTI_ERROR_INVALID_LOCATION = 24,
351 JVMTI_ERROR_INVALID_FIELDID = 25,
352 JVMTI_ERROR_INVALID_MODULE = 26,
353 JVMTI_ERROR_NO_MORE_FRAMES = 31,
354 JVMTI_ERROR_OPAQUE_FRAME = 32,
355 JVMTI_ERROR_TYPE_MISMATCH = 34,
356 JVMTI_ERROR_INVALID_SLOT = 35,
357 JVMTI_ERROR_DUPLICATE = 40,
358 JVMTI_ERROR_NOT_FOUND = 41,
359 JVMTI_ERROR_INVALID_MONITOR = 50,
360 JVMTI_ERROR_NOT_MONITOR_OWNER = 51,
361 JVMTI_ERROR_INTERRUPT = 52,
362 JVMTI_ERROR_INVALID_CLASS_FORMAT = 60,
363 JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61,
364 JVMTI_ERROR_FAILS_VERIFICATION = 62,
365 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63,
366 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64,
367 JVMTI_ERROR_INVALID_TYPESTATE = 65,
368 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66,
369 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67,
370 JVMTI_ERROR_UNSUPPORTED_VERSION = 68,
371 JVMTI_ERROR_NAMES_DONT_MATCH = 69,
372 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
373 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71,
374 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED = 72,
375 JVMTI_ERROR_UNMODIFIABLE_CLASS = 79,
376 JVMTI_ERROR_UNMODIFIABLE_MODULE = 80,
377 JVMTI_ERROR_NOT_AVAILABLE = 98,
378 JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
379 JVMTI_ERROR_NULL_POINTER = 100,
380 JVMTI_ERROR_ABSENT_INFORMATION = 101,
381 JVMTI_ERROR_INVALID_EVENT_TYPE = 102,
382 JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
383 JVMTI_ERROR_NATIVE_METHOD = 104,
384 JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106,
385 JVMTI_ERROR_OUT_OF_MEMORY = 110,
386 JVMTI_ERROR_ACCESS_DENIED = 111,
387 JVMTI_ERROR_WRONG_PHASE = 112,
388 JVMTI_ERROR_INTERNAL = 113,
389 JVMTI_ERROR_UNATTACHED_THREAD = 115,
390 JVMTI_ERROR_INVALID_ENVIRONMENT = 116,
391 JVMTI_ERROR_MAX = 116
397 JVMTI_MIN_EVENT_TYPE_VAL = 50,
398 JVMTI_EVENT_VM_INIT = 50,
399 JVMTI_EVENT_VM_DEATH = 51,
400 JVMTI_EVENT_THREAD_START = 52,
401 JVMTI_EVENT_THREAD_END = 53,
402 JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
403 JVMTI_EVENT_CLASS_LOAD = 55,
404 JVMTI_EVENT_CLASS_PREPARE = 56,
405 JVMTI_EVENT_VM_START = 57,
406 JVMTI_EVENT_EXCEPTION = 58,
407 JVMTI_EVENT_EXCEPTION_CATCH = 59,
408 JVMTI_EVENT_SINGLE_STEP = 60,
409 JVMTI_EVENT_FRAME_POP = 61,
410 JVMTI_EVENT_BREAKPOINT = 62,
411 JVMTI_EVENT_FIELD_ACCESS = 63,
412 JVMTI_EVENT_FIELD_MODIFICATION = 64,
413 JVMTI_EVENT_METHOD_ENTRY = 65,
414 JVMTI_EVENT_METHOD_EXIT = 66,
415 JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
416 JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
417 JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
418 JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
419 JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
420 JVMTI_EVENT_MONITOR_WAIT = 73,
421 JVMTI_EVENT_MONITOR_WAITED = 74,
422 JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
423 JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
424 JVMTI_EVENT_RESOURCE_EXHAUSTED = 80,
425 JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
426 JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
427 JVMTI_EVENT_OBJECT_FREE = 83,
428 JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
429 JVMTI_EVENT_SAMPLED_OBJECT_ALLOC = 86,
430 JVMTI_MAX_EVENT_TYPE_VAL = 86
434 /* Pre-Declarations */
435 struct _jvmtiThreadInfo;
436 typedef struct _jvmtiThreadInfo jvmtiThreadInfo;
437 struct _jvmtiMonitorStackDepthInfo;
438 typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo;
439 struct _jvmtiThreadGroupInfo;
440 typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo;
441 struct _jvmtiFrameInfo;
442 typedef struct _jvmtiFrameInfo jvmtiFrameInfo;
443 struct _jvmtiStackInfo;
444 typedef struct _jvmtiStackInfo jvmtiStackInfo;
445 struct _jvmtiHeapReferenceInfoField;
446 typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField;
447 struct _jvmtiHeapReferenceInfoArray;
448 typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray;
449 struct _jvmtiHeapReferenceInfoConstantPool;
450 typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool;
451 struct _jvmtiHeapReferenceInfoStackLocal;
452 typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal;
453 struct _jvmtiHeapReferenceInfoJniLocal;
454 typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal;
455 struct _jvmtiHeapReferenceInfoReserved;
456 typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved;
457 union _jvmtiHeapReferenceInfo;
458 typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo;
459 struct _jvmtiHeapCallbacks;
460 typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks;
461 struct _jvmtiClassDefinition;
462 typedef struct _jvmtiClassDefinition jvmtiClassDefinition;
463 struct _jvmtiMonitorUsage;
464 typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage;
465 struct _jvmtiLineNumberEntry;
466 typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry;
467 struct _jvmtiLocalVariableEntry;
468 typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry;
469 struct _jvmtiParamInfo;
470 typedef struct _jvmtiParamInfo jvmtiParamInfo;
471 struct _jvmtiExtensionFunctionInfo;
472 typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo;
473 struct _jvmtiExtensionEventInfo;
474 typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo;
475 struct _jvmtiTimerInfo;
476 typedef struct _jvmtiTimerInfo jvmtiTimerInfo;
477 struct _jvmtiAddrLocationMap;
478 typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap;
482 typedef void (JNICALL *jvmtiStartFunction)
483 (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg);
485 typedef jint (JNICALL *jvmtiHeapIterationCallback)
486 (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data);
488 typedef jint (JNICALL *jvmtiHeapReferenceCallback)
489 (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data);
491 typedef jint (JNICALL *jvmtiPrimitiveFieldCallback)
492 (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data);
494 typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback)
495 (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data);
497 typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback)
498 (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data);
500 typedef jint (JNICALL *jvmtiReservedCallback)
503 typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
504 (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
506 typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
507 (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);
509 typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
510 (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data);
512 typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
513 (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data);
515 typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
516 (jvmtiEnv* jvmti_env, ...);
518 typedef void (JNICALL *jvmtiExtensionEvent)
519 (jvmtiEnv* jvmti_env, ...);
522 /* Structure Types */
523 struct _jvmtiThreadInfo {
527 jthreadGroup thread_group;
528 jobject context_class_loader;
530 struct _jvmtiMonitorStackDepthInfo {
534 struct _jvmtiThreadGroupInfo {
540 struct _jvmtiFrameInfo {
544 struct _jvmtiStackInfo {
547 jvmtiFrameInfo* frame_buffer;
550 struct _jvmtiHeapReferenceInfoField {
553 struct _jvmtiHeapReferenceInfoArray {
556 struct _jvmtiHeapReferenceInfoConstantPool {
559 struct _jvmtiHeapReferenceInfoStackLocal {
567 struct _jvmtiHeapReferenceInfoJniLocal {
573 struct _jvmtiHeapReferenceInfoReserved {
583 union _jvmtiHeapReferenceInfo {
584 jvmtiHeapReferenceInfoField field;
585 jvmtiHeapReferenceInfoArray array;
586 jvmtiHeapReferenceInfoConstantPool constant_pool;
587 jvmtiHeapReferenceInfoStackLocal stack_local;
588 jvmtiHeapReferenceInfoJniLocal jni_local;
589 jvmtiHeapReferenceInfoReserved other;
591 struct _jvmtiHeapCallbacks {
592 jvmtiHeapIterationCallback heap_iteration_callback;
593 jvmtiHeapReferenceCallback heap_reference_callback;
594 jvmtiPrimitiveFieldCallback primitive_field_callback;
595 jvmtiArrayPrimitiveValueCallback array_primitive_value_callback;
596 jvmtiStringPrimitiveValueCallback string_primitive_value_callback;
597 jvmtiReservedCallback reserved5;
598 jvmtiReservedCallback reserved6;
599 jvmtiReservedCallback reserved7;
600 jvmtiReservedCallback reserved8;
601 jvmtiReservedCallback reserved9;
602 jvmtiReservedCallback reserved10;
603 jvmtiReservedCallback reserved11;
604 jvmtiReservedCallback reserved12;
605 jvmtiReservedCallback reserved13;
606 jvmtiReservedCallback reserved14;
607 jvmtiReservedCallback reserved15;
609 struct _jvmtiClassDefinition {
611 jint class_byte_count;
612 const unsigned char* class_bytes;
614 struct _jvmtiMonitorUsage {
619 jint notify_waiter_count;
620 jthread* notify_waiters;
622 struct _jvmtiLineNumberEntry {
623 jlocation start_location;
626 struct _jvmtiLocalVariableEntry {
627 jlocation start_location;
631 char* generic_signature;
634 struct _jvmtiParamInfo {
637 jvmtiParamTypes base_type;
640 struct _jvmtiExtensionFunctionInfo {
641 jvmtiExtensionFunction func;
643 char* short_description;
645 jvmtiParamInfo* params;
649 struct _jvmtiExtensionEventInfo {
650 jint extension_event_index;
652 char* short_description;
654 jvmtiParamInfo* params;
656 struct _jvmtiTimerInfo {
658 jboolean may_skip_forward;
659 jboolean may_skip_backward;
664 struct _jvmtiAddrLocationMap {
665 const void* start_address;
670 unsigned int can_tag_objects : 1;
671 unsigned int can_generate_field_modification_events : 1;
672 unsigned int can_generate_field_access_events : 1;
673 unsigned int can_get_bytecodes : 1;
674 unsigned int can_get_synthetic_attribute : 1;
675 unsigned int can_get_owned_monitor_info : 1;
676 unsigned int can_get_current_contended_monitor : 1;
677 unsigned int can_get_monitor_info : 1;
678 unsigned int can_pop_frame : 1;
679 unsigned int can_redefine_classes : 1;
680 unsigned int can_signal_thread : 1;
681 unsigned int can_get_source_file_name : 1;
682 unsigned int can_get_line_numbers : 1;
683 unsigned int can_get_source_debug_extension : 1;
684 unsigned int can_access_local_variables : 1;
685 unsigned int can_maintain_original_method_order : 1;
686 unsigned int can_generate_single_step_events : 1;
687 unsigned int can_generate_exception_events : 1;
688 unsigned int can_generate_frame_pop_events : 1;
689 unsigned int can_generate_breakpoint_events : 1;
690 unsigned int can_suspend : 1;
691 unsigned int can_redefine_any_class : 1;
692 unsigned int can_get_current_thread_cpu_time : 1;
693 unsigned int can_get_thread_cpu_time : 1;
694 unsigned int can_generate_method_entry_events : 1;
695 unsigned int can_generate_method_exit_events : 1;
696 unsigned int can_generate_all_class_hook_events : 1;
697 unsigned int can_generate_compiled_method_load_events : 1;
698 unsigned int can_generate_monitor_events : 1;
699 unsigned int can_generate_vm_object_alloc_events : 1;
700 unsigned int can_generate_native_method_bind_events : 1;
701 unsigned int can_generate_garbage_collection_events : 1;
702 unsigned int can_generate_object_free_events : 1;
703 unsigned int can_force_early_return : 1;
704 unsigned int can_get_owned_monitor_stack_depth_info : 1;
705 unsigned int can_get_constant_pool : 1;
706 unsigned int can_set_native_method_prefix : 1;
707 unsigned int can_retransform_classes : 1;
708 unsigned int can_retransform_any_class : 1;
709 unsigned int can_generate_resource_exhaustion_heap_events : 1;
710 unsigned int can_generate_resource_exhaustion_threads_events : 1;
711 unsigned int can_generate_early_vmstart : 1;
712 unsigned int can_generate_early_class_hook_events : 1;
713 unsigned int can_generate_sampled_object_alloc_events : 1;
723 /* Event Definitions */
725 typedef void (JNICALL *jvmtiEventReserved)(void);
728 typedef void (JNICALL *jvmtiEventBreakpoint)
729 (jvmtiEnv *jvmti_env,
735 typedef void (JNICALL *jvmtiEventClassFileLoadHook)
736 (jvmtiEnv *jvmti_env,
738 jclass class_being_redefined,
741 jobject protection_domain,
743 const unsigned char* class_data,
744 jint* new_class_data_len,
745 unsigned char** new_class_data);
747 typedef void (JNICALL *jvmtiEventClassLoad)
748 (jvmtiEnv *jvmti_env,
753 typedef void (JNICALL *jvmtiEventClassPrepare)
754 (jvmtiEnv *jvmti_env,
759 typedef void (JNICALL *jvmtiEventCompiledMethodLoad)
760 (jvmtiEnv *jvmti_env,
763 const void* code_addr,
765 const jvmtiAddrLocationMap* map,
766 const void* compile_info);
768 typedef void (JNICALL *jvmtiEventCompiledMethodUnload)
769 (jvmtiEnv *jvmti_env,
771 const void* code_addr);
773 typedef void (JNICALL *jvmtiEventDataDumpRequest)
774 (jvmtiEnv *jvmti_env);
776 typedef void (JNICALL *jvmtiEventDynamicCodeGenerated)
777 (jvmtiEnv *jvmti_env,
782 typedef void (JNICALL *jvmtiEventException)
783 (jvmtiEnv *jvmti_env,
789 jmethodID catch_method,
790 jlocation catch_location);
792 typedef void (JNICALL *jvmtiEventExceptionCatch)
793 (jvmtiEnv *jvmti_env,
800 typedef void (JNICALL *jvmtiEventFieldAccess)
801 (jvmtiEnv *jvmti_env,
810 typedef void (JNICALL *jvmtiEventFieldModification)
811 (jvmtiEnv *jvmti_env,
822 typedef void (JNICALL *jvmtiEventFramePop)
823 (jvmtiEnv *jvmti_env,
827 jboolean was_popped_by_exception);
829 typedef void (JNICALL *jvmtiEventGarbageCollectionFinish)
830 (jvmtiEnv *jvmti_env);
832 typedef void (JNICALL *jvmtiEventGarbageCollectionStart)
833 (jvmtiEnv *jvmti_env);
835 typedef void (JNICALL *jvmtiEventMethodEntry)
836 (jvmtiEnv *jvmti_env,
841 typedef void (JNICALL *jvmtiEventMethodExit)
842 (jvmtiEnv *jvmti_env,
846 jboolean was_popped_by_exception,
847 jvalue return_value);
849 typedef void (JNICALL *jvmtiEventMonitorContendedEnter)
850 (jvmtiEnv *jvmti_env,
855 typedef void (JNICALL *jvmtiEventMonitorContendedEntered)
856 (jvmtiEnv *jvmti_env,
861 typedef void (JNICALL *jvmtiEventMonitorWait)
862 (jvmtiEnv *jvmti_env,
868 typedef void (JNICALL *jvmtiEventMonitorWaited)
869 (jvmtiEnv *jvmti_env,
875 typedef void (JNICALL *jvmtiEventNativeMethodBind)
876 (jvmtiEnv *jvmti_env,
881 void** new_address_ptr);
883 typedef void (JNICALL *jvmtiEventObjectFree)
884 (jvmtiEnv *jvmti_env,
887 typedef void (JNICALL *jvmtiEventResourceExhausted)
888 (jvmtiEnv *jvmti_env,
891 const void* reserved,
892 const char* description);
894 typedef void (JNICALL *jvmtiEventSampledObjectAlloc)
895 (jvmtiEnv *jvmti_env,
902 typedef void (JNICALL *jvmtiEventSingleStep)
903 (jvmtiEnv *jvmti_env,
909 typedef void (JNICALL *jvmtiEventThreadEnd)
910 (jvmtiEnv *jvmti_env,
914 typedef void (JNICALL *jvmtiEventThreadStart)
915 (jvmtiEnv *jvmti_env,
919 typedef void (JNICALL *jvmtiEventVMDeath)
920 (jvmtiEnv *jvmti_env,
923 typedef void (JNICALL *jvmtiEventVMInit)
924 (jvmtiEnv *jvmti_env,
928 typedef void (JNICALL *jvmtiEventVMObjectAlloc)
929 (jvmtiEnv *jvmti_env,
936 typedef void (JNICALL *jvmtiEventVMStart)
937 (jvmtiEnv *jvmti_env,
940 /* Event Callback Structure */
943 /* 50 : VM Initialization Event */
944 jvmtiEventVMInit VMInit;
945 /* 51 : VM Death Event */
946 jvmtiEventVMDeath VMDeath;
947 /* 52 : Thread Start */
948 jvmtiEventThreadStart ThreadStart;
949 /* 53 : Thread End */
950 jvmtiEventThreadEnd ThreadEnd;
951 /* 54 : Class File Load Hook */
952 jvmtiEventClassFileLoadHook ClassFileLoadHook;
953 /* 55 : Class Load */
954 jvmtiEventClassLoad ClassLoad;
955 /* 56 : Class Prepare */
956 jvmtiEventClassPrepare ClassPrepare;
957 /* 57 : VM Start Event */
958 jvmtiEventVMStart VMStart;
960 jvmtiEventException Exception;
961 /* 59 : Exception Catch */
962 jvmtiEventExceptionCatch ExceptionCatch;
963 /* 60 : Single Step */
964 jvmtiEventSingleStep SingleStep;
966 jvmtiEventFramePop FramePop;
967 /* 62 : Breakpoint */
968 jvmtiEventBreakpoint Breakpoint;
969 /* 63 : Field Access */
970 jvmtiEventFieldAccess FieldAccess;
971 /* 64 : Field Modification */
972 jvmtiEventFieldModification FieldModification;
973 /* 65 : Method Entry */
974 jvmtiEventMethodEntry MethodEntry;
975 /* 66 : Method Exit */
976 jvmtiEventMethodExit MethodExit;
977 /* 67 : Native Method Bind */
978 jvmtiEventNativeMethodBind NativeMethodBind;
979 /* 68 : Compiled Method Load */
980 jvmtiEventCompiledMethodLoad CompiledMethodLoad;
981 /* 69 : Compiled Method Unload */
982 jvmtiEventCompiledMethodUnload CompiledMethodUnload;
983 /* 70 : Dynamic Code Generated */
984 jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
985 /* 71 : Data Dump Request */
986 jvmtiEventDataDumpRequest DataDumpRequest;
988 jvmtiEventReserved reserved72;
989 /* 73 : Monitor Wait */
990 jvmtiEventMonitorWait MonitorWait;
991 /* 74 : Monitor Waited */
992 jvmtiEventMonitorWaited MonitorWaited;
993 /* 75 : Monitor Contended Enter */
994 jvmtiEventMonitorContendedEnter MonitorContendedEnter;
995 /* 76 : Monitor Contended Entered */
996 jvmtiEventMonitorContendedEntered MonitorContendedEntered;
998 jvmtiEventReserved reserved77;
1000 jvmtiEventReserved reserved78;
1002 jvmtiEventReserved reserved79;
1003 /* 80 : Resource Exhausted */
1004 jvmtiEventResourceExhausted ResourceExhausted;
1005 /* 81 : Garbage Collection Start */
1006 jvmtiEventGarbageCollectionStart GarbageCollectionStart;
1007 /* 82 : Garbage Collection Finish */
1008 jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
1009 /* 83 : Object Free */
1010 jvmtiEventObjectFree ObjectFree;
1011 /* 84 : VM Object Allocation */
1012 jvmtiEventVMObjectAlloc VMObjectAlloc;
1014 jvmtiEventReserved reserved85;
1015 /* 86 : Sampled Object Allocation */
1016 jvmtiEventSampledObjectAlloc SampledObjectAlloc;
1017 } jvmtiEventCallbacks;
1020 /* Function Interface */
1022 typedef struct jvmtiInterface_1_ {
1027 /* 2 : Set Event Notification Mode */
1028 jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env,
1029 jvmtiEventMode mode,
1030 jvmtiEvent event_type,
1031 jthread event_thread,
1034 /* 3 : Get All Modules */
1035 jvmtiError (JNICALL *GetAllModules) (jvmtiEnv* env,
1036 jint* module_count_ptr,
1037 jobject** modules_ptr);
1039 /* 4 : Get All Threads */
1040 jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env,
1041 jint* threads_count_ptr,
1042 jthread** threads_ptr);
1044 /* 5 : Suspend Thread */
1045 jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env,
1048 /* 6 : Resume Thread */
1049 jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env,
1052 /* 7 : Stop Thread */
1053 jvmtiError (JNICALL *StopThread) (jvmtiEnv* env,
1057 /* 8 : Interrupt Thread */
1058 jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env,
1061 /* 9 : Get Thread Info */
1062 jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env,
1064 jvmtiThreadInfo* info_ptr);
1066 /* 10 : Get Owned Monitor Info */
1067 jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env,
1069 jint* owned_monitor_count_ptr,
1070 jobject** owned_monitors_ptr);
1072 /* 11 : Get Current Contended Monitor */
1073 jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env,
1075 jobject* monitor_ptr);
1077 /* 12 : Run Agent Thread */
1078 jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env,
1080 jvmtiStartFunction proc,
1084 /* 13 : Get Top Thread Groups */
1085 jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env,
1086 jint* group_count_ptr,
1087 jthreadGroup** groups_ptr);
1089 /* 14 : Get Thread Group Info */
1090 jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env,
1092 jvmtiThreadGroupInfo* info_ptr);
1094 /* 15 : Get Thread Group Children */
1095 jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env,
1097 jint* thread_count_ptr,
1098 jthread** threads_ptr,
1099 jint* group_count_ptr,
1100 jthreadGroup** groups_ptr);
1102 /* 16 : Get Frame Count */
1103 jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env,
1107 /* 17 : Get Thread State */
1108 jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env,
1110 jint* thread_state_ptr);
1112 /* 18 : Get Current Thread */
1113 jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env,
1114 jthread* thread_ptr);
1116 /* 19 : Get Frame Location */
1117 jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env,
1120 jmethodID* method_ptr,
1121 jlocation* location_ptr);
1123 /* 20 : Notify Frame Pop */
1124 jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env,
1128 /* 21 : Get Local Variable - Object */
1129 jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env,
1133 jobject* value_ptr);
1135 /* 22 : Get Local Variable - Int */
1136 jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env,
1142 /* 23 : Get Local Variable - Long */
1143 jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env,
1149 /* 24 : Get Local Variable - Float */
1150 jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env,
1156 /* 25 : Get Local Variable - Double */
1157 jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env,
1161 jdouble* value_ptr);
1163 /* 26 : Set Local Variable - Object */
1164 jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env,
1170 /* 27 : Set Local Variable - Int */
1171 jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env,
1177 /* 28 : Set Local Variable - Long */
1178 jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env,
1184 /* 29 : Set Local Variable - Float */
1185 jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env,
1191 /* 30 : Set Local Variable - Double */
1192 jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env,
1198 /* 31 : Create Raw Monitor */
1199 jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env,
1201 jrawMonitorID* monitor_ptr);
1203 /* 32 : Destroy Raw Monitor */
1204 jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env,
1205 jrawMonitorID monitor);
1207 /* 33 : Raw Monitor Enter */
1208 jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env,
1209 jrawMonitorID monitor);
1211 /* 34 : Raw Monitor Exit */
1212 jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env,
1213 jrawMonitorID monitor);
1215 /* 35 : Raw Monitor Wait */
1216 jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env,
1217 jrawMonitorID monitor,
1220 /* 36 : Raw Monitor Notify */
1221 jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env,
1222 jrawMonitorID monitor);
1224 /* 37 : Raw Monitor Notify All */
1225 jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env,
1226 jrawMonitorID monitor);
1228 /* 38 : Set Breakpoint */
1229 jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env,
1231 jlocation location);
1233 /* 39 : Clear Breakpoint */
1234 jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env,
1236 jlocation location);
1238 /* 40 : Get Named Module */
1239 jvmtiError (JNICALL *GetNamedModule) (jvmtiEnv* env,
1240 jobject class_loader,
1241 const char* package_name,
1242 jobject* module_ptr);
1244 /* 41 : Set Field Access Watch */
1245 jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env,
1249 /* 42 : Clear Field Access Watch */
1250 jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env,
1254 /* 43 : Set Field Modification Watch */
1255 jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env,
1259 /* 44 : Clear Field Modification Watch */
1260 jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env,
1264 /* 45 : Is Modifiable Class */
1265 jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env,
1267 jboolean* is_modifiable_class_ptr);
1270 jvmtiError (JNICALL *Allocate) (jvmtiEnv* env,
1272 unsigned char** mem_ptr);
1274 /* 47 : Deallocate */
1275 jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env,
1276 unsigned char* mem);
1278 /* 48 : Get Class Signature */
1279 jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env,
1281 char** signature_ptr,
1282 char** generic_ptr);
1284 /* 49 : Get Class Status */
1285 jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env,
1289 /* 50 : Get Source File Name */
1290 jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env,
1292 char** source_name_ptr);
1294 /* 51 : Get Class Modifiers */
1295 jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env,
1297 jint* modifiers_ptr);
1299 /* 52 : Get Class Methods */
1300 jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env,
1302 jint* method_count_ptr,
1303 jmethodID** methods_ptr);
1305 /* 53 : Get Class Fields */
1306 jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env,
1308 jint* field_count_ptr,
1309 jfieldID** fields_ptr);
1311 /* 54 : Get Implemented Interfaces */
1312 jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env,
1314 jint* interface_count_ptr,
1315 jclass** interfaces_ptr);
1317 /* 55 : Is Interface */
1318 jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env,
1320 jboolean* is_interface_ptr);
1322 /* 56 : Is Array Class */
1323 jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env,
1325 jboolean* is_array_class_ptr);
1327 /* 57 : Get Class Loader */
1328 jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env,
1330 jobject* classloader_ptr);
1332 /* 58 : Get Object Hash Code */
1333 jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env,
1335 jint* hash_code_ptr);
1337 /* 59 : Get Object Monitor Usage */
1338 jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env,
1340 jvmtiMonitorUsage* info_ptr);
1342 /* 60 : Get Field Name (and Signature) */
1343 jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env,
1347 char** signature_ptr,
1348 char** generic_ptr);
1350 /* 61 : Get Field Declaring Class */
1351 jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env,
1354 jclass* declaring_class_ptr);
1356 /* 62 : Get Field Modifiers */
1357 jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env,
1360 jint* modifiers_ptr);
1362 /* 63 : Is Field Synthetic */
1363 jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env,
1366 jboolean* is_synthetic_ptr);
1368 /* 64 : Get Method Name (and Signature) */
1369 jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env,
1372 char** signature_ptr,
1373 char** generic_ptr);
1375 /* 65 : Get Method Declaring Class */
1376 jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env,
1378 jclass* declaring_class_ptr);
1380 /* 66 : Get Method Modifiers */
1381 jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env,
1383 jint* modifiers_ptr);
1388 /* 68 : Get Max Locals */
1389 jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env,
1393 /* 69 : Get Arguments Size */
1394 jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env,
1398 /* 70 : Get Line Number Table */
1399 jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env,
1401 jint* entry_count_ptr,
1402 jvmtiLineNumberEntry** table_ptr);
1404 /* 71 : Get Method Location */
1405 jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env,
1407 jlocation* start_location_ptr,
1408 jlocation* end_location_ptr);
1410 /* 72 : Get Local Variable Table */
1411 jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env,
1413 jint* entry_count_ptr,
1414 jvmtiLocalVariableEntry** table_ptr);
1416 /* 73 : Set Native Method Prefix */
1417 jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env,
1418 const char* prefix);
1420 /* 74 : Set Native Method Prefixes */
1421 jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env,
1425 /* 75 : Get Bytecodes */
1426 jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env,
1428 jint* bytecode_count_ptr,
1429 unsigned char** bytecodes_ptr);
1431 /* 76 : Is Method Native */
1432 jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env,
1434 jboolean* is_native_ptr);
1436 /* 77 : Is Method Synthetic */
1437 jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env,
1439 jboolean* is_synthetic_ptr);
1441 /* 78 : Get Loaded Classes */
1442 jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env,
1443 jint* class_count_ptr,
1444 jclass** classes_ptr);
1446 /* 79 : Get Classloader Classes */
1447 jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env,
1448 jobject initiating_loader,
1449 jint* class_count_ptr,
1450 jclass** classes_ptr);
1452 /* 80 : Pop Frame */
1453 jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env,
1456 /* 81 : Force Early Return - Object */
1457 jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env,
1461 /* 82 : Force Early Return - Int */
1462 jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env,
1466 /* 83 : Force Early Return - Long */
1467 jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env,
1471 /* 84 : Force Early Return - Float */
1472 jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env,
1476 /* 85 : Force Early Return - Double */
1477 jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env,
1481 /* 86 : Force Early Return - Void */
1482 jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env,
1485 /* 87 : Redefine Classes */
1486 jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env,
1488 const jvmtiClassDefinition* class_definitions);
1490 /* 88 : Get Version Number */
1491 jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env,
1494 /* 89 : Get Capabilities */
1495 jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env,
1496 jvmtiCapabilities* capabilities_ptr);
1498 /* 90 : Get Source Debug Extension */
1499 jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env,
1501 char** source_debug_extension_ptr);
1503 /* 91 : Is Method Obsolete */
1504 jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env,
1506 jboolean* is_obsolete_ptr);
1508 /* 92 : Suspend Thread List */
1509 jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env,
1511 const jthread* request_list,
1512 jvmtiError* results);
1514 /* 93 : Resume Thread List */
1515 jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env,
1517 const jthread* request_list,
1518 jvmtiError* results);
1520 /* 94 : Add Module Reads */
1521 jvmtiError (JNICALL *AddModuleReads) (jvmtiEnv* env,
1525 /* 95 : Add Module Exports */
1526 jvmtiError (JNICALL *AddModuleExports) (jvmtiEnv* env,
1528 const char* pkg_name,
1531 /* 96 : Add Module Opens */
1532 jvmtiError (JNICALL *AddModuleOpens) (jvmtiEnv* env,
1534 const char* pkg_name,
1537 /* 97 : Add Module Uses */
1538 jvmtiError (JNICALL *AddModuleUses) (jvmtiEnv* env,
1542 /* 98 : Add Module Provides */
1543 jvmtiError (JNICALL *AddModuleProvides) (jvmtiEnv* env,
1548 /* 99 : Is Modifiable Module */
1549 jvmtiError (JNICALL *IsModifiableModule) (jvmtiEnv* env,
1551 jboolean* is_modifiable_module_ptr);
1553 /* 100 : Get All Stack Traces */
1554 jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env,
1555 jint max_frame_count,
1556 jvmtiStackInfo** stack_info_ptr,
1557 jint* thread_count_ptr);
1559 /* 101 : Get Thread List Stack Traces */
1560 jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env,
1562 const jthread* thread_list,
1563 jint max_frame_count,
1564 jvmtiStackInfo** stack_info_ptr);
1566 /* 102 : Get Thread Local Storage */
1567 jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env,
1571 /* 103 : Set Thread Local Storage */
1572 jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env,
1576 /* 104 : Get Stack Trace */
1577 jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env,
1580 jint max_frame_count,
1581 jvmtiFrameInfo* frame_buffer,
1584 /* 105 : RESERVED */
1588 jvmtiError (JNICALL *GetTag) (jvmtiEnv* env,
1593 jvmtiError (JNICALL *SetTag) (jvmtiEnv* env,
1597 /* 108 : Force Garbage Collection */
1598 jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
1600 /* 109 : Iterate Over Objects Reachable From Object */
1601 jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env,
1603 jvmtiObjectReferenceCallback object_reference_callback,
1604 const void* user_data);
1606 /* 110 : Iterate Over Reachable Objects */
1607 jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env,
1608 jvmtiHeapRootCallback heap_root_callback,
1609 jvmtiStackReferenceCallback stack_ref_callback,
1610 jvmtiObjectReferenceCallback object_ref_callback,
1611 const void* user_data);
1613 /* 111 : Iterate Over Heap */
1614 jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env,
1615 jvmtiHeapObjectFilter object_filter,
1616 jvmtiHeapObjectCallback heap_object_callback,
1617 const void* user_data);
1619 /* 112 : Iterate Over Instances Of Class */
1620 jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env,
1622 jvmtiHeapObjectFilter object_filter,
1623 jvmtiHeapObjectCallback heap_object_callback,
1624 const void* user_data);
1626 /* 113 : RESERVED */
1629 /* 114 : Get Objects With Tags */
1630 jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env,
1634 jobject** object_result_ptr,
1635 jlong** tag_result_ptr);
1637 /* 115 : Follow References */
1638 jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env,
1641 jobject initial_object,
1642 const jvmtiHeapCallbacks* callbacks,
1643 const void* user_data);
1645 /* 116 : Iterate Through Heap */
1646 jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env,
1649 const jvmtiHeapCallbacks* callbacks,
1650 const void* user_data);
1652 /* 117 : RESERVED */
1655 /* 118 : RESERVED */
1658 /* 119 : RESERVED */
1661 /* 120 : Set JNI Function Table */
1662 jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env,
1663 const jniNativeInterface* function_table);
1665 /* 121 : Get JNI Function Table */
1666 jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env,
1667 jniNativeInterface** function_table);
1669 /* 122 : Set Event Callbacks */
1670 jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env,
1671 const jvmtiEventCallbacks* callbacks,
1672 jint size_of_callbacks);
1674 /* 123 : Generate Events */
1675 jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env,
1676 jvmtiEvent event_type);
1678 /* 124 : Get Extension Functions */
1679 jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env,
1680 jint* extension_count_ptr,
1681 jvmtiExtensionFunctionInfo** extensions);
1683 /* 125 : Get Extension Events */
1684 jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env,
1685 jint* extension_count_ptr,
1686 jvmtiExtensionEventInfo** extensions);
1688 /* 126 : Set Extension Event Callback */
1689 jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env,
1690 jint extension_event_index,
1691 jvmtiExtensionEvent callback);
1693 /* 127 : Dispose Environment */
1694 jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
1696 /* 128 : Get Error Name */
1697 jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env,
1701 /* 129 : Get JLocation Format */
1702 jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env,
1703 jvmtiJlocationFormat* format_ptr);
1705 /* 130 : Get System Properties */
1706 jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env,
1708 char*** property_ptr);
1710 /* 131 : Get System Property */
1711 jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env,
1712 const char* property,
1715 /* 132 : Set System Property */
1716 jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env,
1717 const char* property,
1718 const char* value_ptr);
1720 /* 133 : Get Phase */
1721 jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env,
1722 jvmtiPhase* phase_ptr);
1724 /* 134 : Get Current Thread CPU Timer Information */
1725 jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env,
1726 jvmtiTimerInfo* info_ptr);
1728 /* 135 : Get Current Thread CPU Time */
1729 jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env,
1732 /* 136 : Get Thread CPU Timer Information */
1733 jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env,
1734 jvmtiTimerInfo* info_ptr);
1736 /* 137 : Get Thread CPU Time */
1737 jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env,
1741 /* 138 : Get Timer Information */
1742 jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env,
1743 jvmtiTimerInfo* info_ptr);
1745 /* 139 : Get Time */
1746 jvmtiError (JNICALL *GetTime) (jvmtiEnv* env,
1749 /* 140 : Get Potential Capabilities */
1750 jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env,
1751 jvmtiCapabilities* capabilities_ptr);
1753 /* 141 : RESERVED */
1756 /* 142 : Add Capabilities */
1757 jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env,
1758 const jvmtiCapabilities* capabilities_ptr);
1760 /* 143 : Relinquish Capabilities */
1761 jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env,
1762 const jvmtiCapabilities* capabilities_ptr);
1764 /* 144 : Get Available Processors */
1765 jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env,
1766 jint* processor_count_ptr);
1768 /* 145 : Get Class Version Numbers */
1769 jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env,
1771 jint* minor_version_ptr,
1772 jint* major_version_ptr);
1774 /* 146 : Get Constant Pool */
1775 jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env,
1777 jint* constant_pool_count_ptr,
1778 jint* constant_pool_byte_count_ptr,
1779 unsigned char** constant_pool_bytes_ptr);
1781 /* 147 : Get Environment Local Storage */
1782 jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env,
1785 /* 148 : Set Environment Local Storage */
1786 jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env,
1789 /* 149 : Add To Bootstrap Class Loader Search */
1790 jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env,
1791 const char* segment);
1793 /* 150 : Set Verbose Flag */
1794 jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env,
1795 jvmtiVerboseFlag flag,
1798 /* 151 : Add To System Class Loader Search */
1799 jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env,
1800 const char* segment);
1802 /* 152 : Retransform Classes */
1803 jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env,
1805 const jclass* classes);
1807 /* 153 : Get Owned Monitor Stack Depth Info */
1808 jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env,
1810 jint* monitor_info_count_ptr,
1811 jvmtiMonitorStackDepthInfo** monitor_info_ptr);
1813 /* 154 : Get Object Size */
1814 jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env,
1818 /* 155 : Get Local Instance */
1819 jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env,
1822 jobject* value_ptr);
1824 /* 156 : Set Heap Sampling Interval */
1825 jvmtiError (JNICALL *SetHeapSamplingInterval) (jvmtiEnv* env,
1826 jint sampling_interval);
1831 const struct jvmtiInterface_1_ *functions;
1835 jvmtiError Allocate(jlong size,
1836 unsigned char** mem_ptr) {
1837 return functions->Allocate(this, size, mem_ptr);
1840 jvmtiError Deallocate(unsigned char* mem) {
1841 return functions->Deallocate(this, mem);
1844 jvmtiError GetThreadState(jthread thread,
1845 jint* thread_state_ptr) {
1846 return functions->GetThreadState(this, thread, thread_state_ptr);
1849 jvmtiError GetCurrentThread(jthread* thread_ptr) {
1850 return functions->GetCurrentThread(this, thread_ptr);
1853 jvmtiError GetAllThreads(jint* threads_count_ptr,
1854 jthread** threads_ptr) {
1855 return functions->GetAllThreads(this, threads_count_ptr, threads_ptr);
1858 jvmtiError SuspendThread(jthread thread) {
1859 return functions->SuspendThread(this, thread);
1862 jvmtiError SuspendThreadList(jint request_count,
1863 const jthread* request_list,
1864 jvmtiError* results) {
1865 return functions->SuspendThreadList(this, request_count, request_list, results);
1868 jvmtiError ResumeThread(jthread thread) {
1869 return functions->ResumeThread(this, thread);
1872 jvmtiError ResumeThreadList(jint request_count,
1873 const jthread* request_list,
1874 jvmtiError* results) {
1875 return functions->ResumeThreadList(this, request_count, request_list, results);
1878 jvmtiError StopThread(jthread thread,
1879 jobject exception) {
1880 return functions->StopThread(this, thread, exception);
1883 jvmtiError InterruptThread(jthread thread) {
1884 return functions->InterruptThread(this, thread);
1887 jvmtiError GetThreadInfo(jthread thread,
1888 jvmtiThreadInfo* info_ptr) {
1889 return functions->GetThreadInfo(this, thread, info_ptr);
1892 jvmtiError GetOwnedMonitorInfo(jthread thread,
1893 jint* owned_monitor_count_ptr,
1894 jobject** owned_monitors_ptr) {
1895 return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr);
1898 jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread,
1899 jint* monitor_info_count_ptr,
1900 jvmtiMonitorStackDepthInfo** monitor_info_ptr) {
1901 return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr);
1904 jvmtiError GetCurrentContendedMonitor(jthread thread,
1905 jobject* monitor_ptr) {
1906 return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr);
1909 jvmtiError RunAgentThread(jthread thread,
1910 jvmtiStartFunction proc,
1913 return functions->RunAgentThread(this, thread, proc, arg, priority);
1916 jvmtiError SetThreadLocalStorage(jthread thread,
1918 return functions->SetThreadLocalStorage(this, thread, data);
1921 jvmtiError GetThreadLocalStorage(jthread thread,
1923 return functions->GetThreadLocalStorage(this, thread, data_ptr);
1926 jvmtiError GetTopThreadGroups(jint* group_count_ptr,
1927 jthreadGroup** groups_ptr) {
1928 return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr);
1931 jvmtiError GetThreadGroupInfo(jthreadGroup group,
1932 jvmtiThreadGroupInfo* info_ptr) {
1933 return functions->GetThreadGroupInfo(this, group, info_ptr);
1936 jvmtiError GetThreadGroupChildren(jthreadGroup group,
1937 jint* thread_count_ptr,
1938 jthread** threads_ptr,
1939 jint* group_count_ptr,
1940 jthreadGroup** groups_ptr) {
1941 return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr);
1944 jvmtiError GetStackTrace(jthread thread,
1946 jint max_frame_count,
1947 jvmtiFrameInfo* frame_buffer,
1949 return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr);
1952 jvmtiError GetAllStackTraces(jint max_frame_count,
1953 jvmtiStackInfo** stack_info_ptr,
1954 jint* thread_count_ptr) {
1955 return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr);
1958 jvmtiError GetThreadListStackTraces(jint thread_count,
1959 const jthread* thread_list,
1960 jint max_frame_count,
1961 jvmtiStackInfo** stack_info_ptr) {
1962 return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr);
1965 jvmtiError GetFrameCount(jthread thread,
1967 return functions->GetFrameCount(this, thread, count_ptr);
1970 jvmtiError PopFrame(jthread thread) {
1971 return functions->PopFrame(this, thread);
1974 jvmtiError GetFrameLocation(jthread thread,
1976 jmethodID* method_ptr,
1977 jlocation* location_ptr) {
1978 return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr);
1981 jvmtiError NotifyFramePop(jthread thread,
1983 return functions->NotifyFramePop(this, thread, depth);
1986 jvmtiError ForceEarlyReturnObject(jthread thread,
1988 return functions->ForceEarlyReturnObject(this, thread, value);
1991 jvmtiError ForceEarlyReturnInt(jthread thread,
1993 return functions->ForceEarlyReturnInt(this, thread, value);
1996 jvmtiError ForceEarlyReturnLong(jthread thread,
1998 return functions->ForceEarlyReturnLong(this, thread, value);
2001 jvmtiError ForceEarlyReturnFloat(jthread thread,
2003 return functions->ForceEarlyReturnFloat(this, thread, value);
2006 jvmtiError ForceEarlyReturnDouble(jthread thread,
2008 return functions->ForceEarlyReturnDouble(this, thread, value);
2011 jvmtiError ForceEarlyReturnVoid(jthread thread) {
2012 return functions->ForceEarlyReturnVoid(this, thread);
2015 jvmtiError FollowReferences(jint heap_filter,
2017 jobject initial_object,
2018 const jvmtiHeapCallbacks* callbacks,
2019 const void* user_data) {
2020 return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data);
2023 jvmtiError IterateThroughHeap(jint heap_filter,
2025 const jvmtiHeapCallbacks* callbacks,
2026 const void* user_data) {
2027 return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data);
2030 jvmtiError GetTag(jobject object,
2032 return functions->GetTag(this, object, tag_ptr);
2035 jvmtiError SetTag(jobject object,
2037 return functions->SetTag(this, object, tag);
2040 jvmtiError GetObjectsWithTags(jint tag_count,
2043 jobject** object_result_ptr,
2044 jlong** tag_result_ptr) {
2045 return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr);
2048 jvmtiError ForceGarbageCollection() {
2049 return functions->ForceGarbageCollection(this);
2052 jvmtiError IterateOverObjectsReachableFromObject(jobject object,
2053 jvmtiObjectReferenceCallback object_reference_callback,
2054 const void* user_data) {
2055 return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data);
2058 jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback,
2059 jvmtiStackReferenceCallback stack_ref_callback,
2060 jvmtiObjectReferenceCallback object_ref_callback,
2061 const void* user_data) {
2062 return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data);
2065 jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter,
2066 jvmtiHeapObjectCallback heap_object_callback,
2067 const void* user_data) {
2068 return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data);
2071 jvmtiError IterateOverInstancesOfClass(jclass klass,
2072 jvmtiHeapObjectFilter object_filter,
2073 jvmtiHeapObjectCallback heap_object_callback,
2074 const void* user_data) {
2075 return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data);
2078 jvmtiError GetLocalObject(jthread thread,
2081 jobject* value_ptr) {
2082 return functions->GetLocalObject(this, thread, depth, slot, value_ptr);
2085 jvmtiError GetLocalInstance(jthread thread,
2087 jobject* value_ptr) {
2088 return functions->GetLocalInstance(this, thread, depth, value_ptr);
2091 jvmtiError GetLocalInt(jthread thread,
2095 return functions->GetLocalInt(this, thread, depth, slot, value_ptr);
2098 jvmtiError GetLocalLong(jthread thread,
2102 return functions->GetLocalLong(this, thread, depth, slot, value_ptr);
2105 jvmtiError GetLocalFloat(jthread thread,
2108 jfloat* value_ptr) {
2109 return functions->GetLocalFloat(this, thread, depth, slot, value_ptr);
2112 jvmtiError GetLocalDouble(jthread thread,
2115 jdouble* value_ptr) {
2116 return functions->GetLocalDouble(this, thread, depth, slot, value_ptr);
2119 jvmtiError SetLocalObject(jthread thread,
2123 return functions->SetLocalObject(this, thread, depth, slot, value);
2126 jvmtiError SetLocalInt(jthread thread,
2130 return functions->SetLocalInt(this, thread, depth, slot, value);
2133 jvmtiError SetLocalLong(jthread thread,
2137 return functions->SetLocalLong(this, thread, depth, slot, value);
2140 jvmtiError SetLocalFloat(jthread thread,
2144 return functions->SetLocalFloat(this, thread, depth, slot, value);
2147 jvmtiError SetLocalDouble(jthread thread,
2151 return functions->SetLocalDouble(this, thread, depth, slot, value);
2154 jvmtiError SetBreakpoint(jmethodID method,
2155 jlocation location) {
2156 return functions->SetBreakpoint(this, method, location);
2159 jvmtiError ClearBreakpoint(jmethodID method,
2160 jlocation location) {
2161 return functions->ClearBreakpoint(this, method, location);
2164 jvmtiError SetFieldAccessWatch(jclass klass,
2166 return functions->SetFieldAccessWatch(this, klass, field);
2169 jvmtiError ClearFieldAccessWatch(jclass klass,
2171 return functions->ClearFieldAccessWatch(this, klass, field);
2174 jvmtiError SetFieldModificationWatch(jclass klass,
2176 return functions->SetFieldModificationWatch(this, klass, field);
2179 jvmtiError ClearFieldModificationWatch(jclass klass,
2181 return functions->ClearFieldModificationWatch(this, klass, field);
2184 jvmtiError GetAllModules(jint* module_count_ptr,
2185 jobject** modules_ptr) {
2186 return functions->GetAllModules(this, module_count_ptr, modules_ptr);
2189 jvmtiError GetNamedModule(jobject class_loader,
2190 const char* package_name,
2191 jobject* module_ptr) {
2192 return functions->GetNamedModule(this, class_loader, package_name, module_ptr);
2195 jvmtiError AddModuleReads(jobject module,
2196 jobject to_module) {
2197 return functions->AddModuleReads(this, module, to_module);
2200 jvmtiError AddModuleExports(jobject module,
2201 const char* pkg_name,
2202 jobject to_module) {
2203 return functions->AddModuleExports(this, module, pkg_name, to_module);
2206 jvmtiError AddModuleOpens(jobject module,
2207 const char* pkg_name,
2208 jobject to_module) {
2209 return functions->AddModuleOpens(this, module, pkg_name, to_module);
2212 jvmtiError AddModuleUses(jobject module,
2214 return functions->AddModuleUses(this, module, service);
2217 jvmtiError AddModuleProvides(jobject module,
2219 jclass impl_class) {
2220 return functions->AddModuleProvides(this, module, service, impl_class);
2223 jvmtiError IsModifiableModule(jobject module,
2224 jboolean* is_modifiable_module_ptr) {
2225 return functions->IsModifiableModule(this, module, is_modifiable_module_ptr);
2228 jvmtiError GetLoadedClasses(jint* class_count_ptr,
2229 jclass** classes_ptr) {
2230 return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr);
2233 jvmtiError GetClassLoaderClasses(jobject initiating_loader,
2234 jint* class_count_ptr,
2235 jclass** classes_ptr) {
2236 return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr);
2239 jvmtiError GetClassSignature(jclass klass,
2240 char** signature_ptr,
2241 char** generic_ptr) {
2242 return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr);
2245 jvmtiError GetClassStatus(jclass klass,
2247 return functions->GetClassStatus(this, klass, status_ptr);
2250 jvmtiError GetSourceFileName(jclass klass,
2251 char** source_name_ptr) {
2252 return functions->GetSourceFileName(this, klass, source_name_ptr);
2255 jvmtiError GetClassModifiers(jclass klass,
2256 jint* modifiers_ptr) {
2257 return functions->GetClassModifiers(this, klass, modifiers_ptr);
2260 jvmtiError GetClassMethods(jclass klass,
2261 jint* method_count_ptr,
2262 jmethodID** methods_ptr) {
2263 return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr);
2266 jvmtiError GetClassFields(jclass klass,
2267 jint* field_count_ptr,
2268 jfieldID** fields_ptr) {
2269 return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr);
2272 jvmtiError GetImplementedInterfaces(jclass klass,
2273 jint* interface_count_ptr,
2274 jclass** interfaces_ptr) {
2275 return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr);
2278 jvmtiError GetClassVersionNumbers(jclass klass,
2279 jint* minor_version_ptr,
2280 jint* major_version_ptr) {
2281 return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr);
2284 jvmtiError GetConstantPool(jclass klass,
2285 jint* constant_pool_count_ptr,
2286 jint* constant_pool_byte_count_ptr,
2287 unsigned char** constant_pool_bytes_ptr) {
2288 return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr);
2291 jvmtiError IsInterface(jclass klass,
2292 jboolean* is_interface_ptr) {
2293 return functions->IsInterface(this, klass, is_interface_ptr);
2296 jvmtiError IsArrayClass(jclass klass,
2297 jboolean* is_array_class_ptr) {
2298 return functions->IsArrayClass(this, klass, is_array_class_ptr);
2301 jvmtiError IsModifiableClass(jclass klass,
2302 jboolean* is_modifiable_class_ptr) {
2303 return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr);
2306 jvmtiError GetClassLoader(jclass klass,
2307 jobject* classloader_ptr) {
2308 return functions->GetClassLoader(this, klass, classloader_ptr);
2311 jvmtiError GetSourceDebugExtension(jclass klass,
2312 char** source_debug_extension_ptr) {
2313 return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr);
2316 jvmtiError RetransformClasses(jint class_count,
2317 const jclass* classes) {
2318 return functions->RetransformClasses(this, class_count, classes);
2321 jvmtiError RedefineClasses(jint class_count,
2322 const jvmtiClassDefinition* class_definitions) {
2323 return functions->RedefineClasses(this, class_count, class_definitions);
2326 jvmtiError GetObjectSize(jobject object,
2328 return functions->GetObjectSize(this, object, size_ptr);
2331 jvmtiError GetObjectHashCode(jobject object,
2332 jint* hash_code_ptr) {
2333 return functions->GetObjectHashCode(this, object, hash_code_ptr);
2336 jvmtiError GetObjectMonitorUsage(jobject object,
2337 jvmtiMonitorUsage* info_ptr) {
2338 return functions->GetObjectMonitorUsage(this, object, info_ptr);
2341 jvmtiError GetFieldName(jclass klass,
2344 char** signature_ptr,
2345 char** generic_ptr) {
2346 return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr);
2349 jvmtiError GetFieldDeclaringClass(jclass klass,
2351 jclass* declaring_class_ptr) {
2352 return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr);
2355 jvmtiError GetFieldModifiers(jclass klass,
2357 jint* modifiers_ptr) {
2358 return functions->GetFieldModifiers(this, klass, field, modifiers_ptr);
2361 jvmtiError IsFieldSynthetic(jclass klass,
2363 jboolean* is_synthetic_ptr) {
2364 return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr);
2367 jvmtiError GetMethodName(jmethodID method,
2369 char** signature_ptr,
2370 char** generic_ptr) {
2371 return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr);
2374 jvmtiError GetMethodDeclaringClass(jmethodID method,
2375 jclass* declaring_class_ptr) {
2376 return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr);
2379 jvmtiError GetMethodModifiers(jmethodID method,
2380 jint* modifiers_ptr) {
2381 return functions->GetMethodModifiers(this, method, modifiers_ptr);
2384 jvmtiError GetMaxLocals(jmethodID method,
2386 return functions->GetMaxLocals(this, method, max_ptr);
2389 jvmtiError GetArgumentsSize(jmethodID method,
2391 return functions->GetArgumentsSize(this, method, size_ptr);
2394 jvmtiError GetLineNumberTable(jmethodID method,
2395 jint* entry_count_ptr,
2396 jvmtiLineNumberEntry** table_ptr) {
2397 return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr);
2400 jvmtiError GetMethodLocation(jmethodID method,
2401 jlocation* start_location_ptr,
2402 jlocation* end_location_ptr) {
2403 return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr);
2406 jvmtiError GetLocalVariableTable(jmethodID method,
2407 jint* entry_count_ptr,
2408 jvmtiLocalVariableEntry** table_ptr) {
2409 return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr);
2412 jvmtiError GetBytecodes(jmethodID method,
2413 jint* bytecode_count_ptr,
2414 unsigned char** bytecodes_ptr) {
2415 return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr);
2418 jvmtiError IsMethodNative(jmethodID method,
2419 jboolean* is_native_ptr) {
2420 return functions->IsMethodNative(this, method, is_native_ptr);
2423 jvmtiError IsMethodSynthetic(jmethodID method,
2424 jboolean* is_synthetic_ptr) {
2425 return functions->IsMethodSynthetic(this, method, is_synthetic_ptr);
2428 jvmtiError IsMethodObsolete(jmethodID method,
2429 jboolean* is_obsolete_ptr) {
2430 return functions->IsMethodObsolete(this, method, is_obsolete_ptr);
2433 jvmtiError SetNativeMethodPrefix(const char* prefix) {
2434 return functions->SetNativeMethodPrefix(this, prefix);
2437 jvmtiError SetNativeMethodPrefixes(jint prefix_count,
2439 return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes);
2442 jvmtiError CreateRawMonitor(const char* name,
2443 jrawMonitorID* monitor_ptr) {
2444 return functions->CreateRawMonitor(this, name, monitor_ptr);
2447 jvmtiError DestroyRawMonitor(jrawMonitorID monitor) {
2448 return functions->DestroyRawMonitor(this, monitor);
2451 jvmtiError RawMonitorEnter(jrawMonitorID monitor) {
2452 return functions->RawMonitorEnter(this, monitor);
2455 jvmtiError RawMonitorExit(jrawMonitorID monitor) {
2456 return functions->RawMonitorExit(this, monitor);
2459 jvmtiError RawMonitorWait(jrawMonitorID monitor,
2461 return functions->RawMonitorWait(this, monitor, millis);
2464 jvmtiError RawMonitorNotify(jrawMonitorID monitor) {
2465 return functions->RawMonitorNotify(this, monitor);
2468 jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) {
2469 return functions->RawMonitorNotifyAll(this, monitor);
2472 jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) {
2473 return functions->SetJNIFunctionTable(this, function_table);
2476 jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) {
2477 return functions->GetJNIFunctionTable(this, function_table);
2480 jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks,
2481 jint size_of_callbacks) {
2482 return functions->SetEventCallbacks(this, callbacks, size_of_callbacks);
2485 jvmtiError SetEventNotificationMode(jvmtiEventMode mode,
2486 jvmtiEvent event_type,
2487 jthread event_thread,
2489 return functions->SetEventNotificationMode(this, mode, event_type, event_thread);
2492 jvmtiError GenerateEvents(jvmtiEvent event_type) {
2493 return functions->GenerateEvents(this, event_type);
2496 jvmtiError GetExtensionFunctions(jint* extension_count_ptr,
2497 jvmtiExtensionFunctionInfo** extensions) {
2498 return functions->GetExtensionFunctions(this, extension_count_ptr, extensions);
2501 jvmtiError GetExtensionEvents(jint* extension_count_ptr,
2502 jvmtiExtensionEventInfo** extensions) {
2503 return functions->GetExtensionEvents(this, extension_count_ptr, extensions);
2506 jvmtiError SetExtensionEventCallback(jint extension_event_index,
2507 jvmtiExtensionEvent callback) {
2508 return functions->SetExtensionEventCallback(this, extension_event_index, callback);
2511 jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) {
2512 return functions->GetPotentialCapabilities(this, capabilities_ptr);
2515 jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) {
2516 return functions->AddCapabilities(this, capabilities_ptr);
2519 jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) {
2520 return functions->RelinquishCapabilities(this, capabilities_ptr);
2523 jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) {
2524 return functions->GetCapabilities(this, capabilities_ptr);
2527 jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
2528 return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr);
2531 jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) {
2532 return functions->GetCurrentThreadCpuTime(this, nanos_ptr);
2535 jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) {
2536 return functions->GetThreadCpuTimerInfo(this, info_ptr);
2539 jvmtiError GetThreadCpuTime(jthread thread,
2541 return functions->GetThreadCpuTime(this, thread, nanos_ptr);
2544 jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) {
2545 return functions->GetTimerInfo(this, info_ptr);
2548 jvmtiError GetTime(jlong* nanos_ptr) {
2549 return functions->GetTime(this, nanos_ptr);
2552 jvmtiError GetAvailableProcessors(jint* processor_count_ptr) {
2553 return functions->GetAvailableProcessors(this, processor_count_ptr);
2556 jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) {
2557 return functions->AddToBootstrapClassLoaderSearch(this, segment);
2560 jvmtiError AddToSystemClassLoaderSearch(const char* segment) {
2561 return functions->AddToSystemClassLoaderSearch(this, segment);
2564 jvmtiError GetSystemProperties(jint* count_ptr,
2565 char*** property_ptr) {
2566 return functions->GetSystemProperties(this, count_ptr, property_ptr);
2569 jvmtiError GetSystemProperty(const char* property,
2571 return functions->GetSystemProperty(this, property, value_ptr);
2574 jvmtiError SetSystemProperty(const char* property,
2575 const char* value_ptr) {
2576 return functions->SetSystemProperty(this, property, value_ptr);
2579 jvmtiError GetPhase(jvmtiPhase* phase_ptr) {
2580 return functions->GetPhase(this, phase_ptr);
2583 jvmtiError DisposeEnvironment() {
2584 return functions->DisposeEnvironment(this);
2587 jvmtiError SetEnvironmentLocalStorage(const void* data) {
2588 return functions->SetEnvironmentLocalStorage(this, data);
2591 jvmtiError GetEnvironmentLocalStorage(void** data_ptr) {
2592 return functions->GetEnvironmentLocalStorage(this, data_ptr);
2595 jvmtiError GetVersionNumber(jint* version_ptr) {
2596 return functions->GetVersionNumber(this, version_ptr);
2599 jvmtiError GetErrorName(jvmtiError error,
2601 return functions->GetErrorName(this, error, name_ptr);
2604 jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag,
2606 return functions->SetVerboseFlag(this, flag, value);
2609 jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) {
2610 return functions->GetJLocationFormat(this, format_ptr);
2613 jvmtiError SetHeapSamplingInterval(jint sampling_interval) {
2614 return functions->SetHeapSamplingInterval(this, sampling_interval);
2617 #endif /* __cplusplus */
2623 #endif /* __cplusplus */
2625 #endif /* !_JAVA_JVMTI_H_ */