1 /* jvmti.h - Java Virtual Machine Tool Interface
2 Copyright (C) 2006 Free Software Foundation
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 /* Note: this file must be compilable by the C compiler (for now,
40 assuming GNU C is ok). This means you must never use `//'
41 comments, and all C++-specific code must be conditional on
44 #ifndef _CLASSPATH_JVMTI_H
45 #define _CLASSPATH_JVMTI_H
50 /* The VM might define JVMTI base types */
51 #ifndef _CLASSPATH_VM_JVMTI_TYPES_DEFINED
53 typedef jobject jthread
;
54 typedef jobject jthreadGroup
;
55 typedef jlong jlocation
;
56 typedef struct _Jv_rawMonitorID
*jrawMonitorID
;
58 #endif /* !_CLASSPATH_VM_JVMTI_TYPES_DEFINED */
61 #define JVMTI_VERSION_1_0 0x30010000
62 #define JVMTI_VERSION (JVMTI_VERSION_1_0 + 38) /* Spec version is 1.0.38 */
69 /* These functions might be defined in libraries which we load; the
70 JVMTI implementation calls them at the appropriate times. */
71 extern JNIEXPORT jint JNICALL
Agent_OnLoad (JavaVM
*vm
, char *options
,
73 extern JNIEXPORT
void JNICALL
Agent_OnUnload (JavaVM
*vm
);
79 /* Forward declarations */
80 typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap
;
82 typedef struct _Jv_JVMTIEnv jvmtiEnv
;
84 typedef const struct _Jv_jvmtiEnv
*jvmtiEnv
;
93 /* Universal Errors */
95 JVMTI_ERROR_NULL_POINTER
= 100,
96 JVMTI_ERROR_OUT_OF_MEMORY
= 110,
97 JVMTI_ERROR_ACCESS_DENIED
= 111,
98 JVMTI_ERROR_WRONG_PHASE
= 112,
99 JVMTI_ERROR_INTERNAL
= 113,
100 JVMTI_ERROR_UNATTACHED_THREAD
= 115,
101 JVMTI_ERROR_INVALID_ENVIRONMENT
= 116,
103 /* Function-specific Required Errors */
104 JVMTI_ERROR_INVALID_PRIORITY
= 12,
105 JVMTI_ERROR_THREAD_NOT_SUSPENDED
= 13,
106 JVMTI_ERROR_THREAD_SUSPENDED
= 14,
107 JVMTI_ERROR_THREAD_NOT_ALIVE
= 15,
108 JVMTI_ERROR_CLASS_NOT_PREPARED
= 22,
109 JVMTI_ERROR_NO_MORE_FRAMES
= 31,
110 JVMTI_ERROR_OPAQUE_FRAME
= 32,
111 JVMTI_ERROR_DUPLICATE
= 40,
112 JVMTI_ERROR_NOT_FOUND
= 41,
113 JVMTI_ERROR_NOT_MONITOR_OWNER
= 51,
114 JVMTI_ERROR_INTERRUPT
= 52,
115 JVMTI_ERROR_UNMODIFIABLE_CLASS
= 79,
116 JVMTI_ERROR_NOT_AVAILABLE
= 98,
117 JVMTI_ERROR_ABSENT_INFORMATION
= 101,
118 JVMTI_ERROR_INVALID_EVENT_TYPE
= 102,
119 JVMTI_ERROR_NATIVE_METHOD
= 104,
121 /* Function-specific Agent Errors */
122 JVMTI_ERROR_INVALID_THREAD
= 10,
123 JVMTI_ERROR_INVALID_THREAD_GROUP
= 11,
124 JVMTI_ERROR_INVALID_OBJECT
= 20,
125 JVMTI_ERROR_INVALID_CLASS
= 21,
126 JVMTI_ERROR_INVALID_METHODID
= 23,
127 JVMTI_ERROR_INVALID_LOCATION
= 24,
128 JVMTI_ERROR_INVALID_FIELDID
= 25,
129 JVMTI_ERROR_TYPE_MISMATCH
= 34,
130 JVMTI_ERROR_INVALID_SLOT
= 35,
131 JVMTI_ERROR_INVALID_MONITOR
= 50,
132 JVMTI_ERROR_INVALID_CLASS_FORMAT
= 60,
133 JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION
= 61,
134 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED
= 63,
135 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED
= 64,
136 JVMTI_ERROR_INVALID_TYPESTATE
= 65,
137 JVMTI_ERROR_FAILS_VERIFICATION
= 62,
138 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED
= 66,
139 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED
= 67,
140 JVMTI_ERROR_UNSUPPORTED_VERSION
= 68,
141 JVMTI_ERROR_NAMES_DONT_MATCH
= 69,
142 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED
= 70,
143 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED
= 71,
144 JVMTI_ERROR_MUST_POSSESS_CAPABILITY
= 99,
145 JVMTI_ERROR_ILLEGAL_ARGUMENT
= 103
149 * Enumeration Definitions
160 JVMTI_HEAP_OBJECT_TAGGED
= 1,
161 JVMTI_HEAP_OBJECT_UNTAGGED
= 2,
162 JVMTI_HEAP_OBJECT_EITHER
= 3
163 } jvmtiHeapObjectFilter
;
167 JVMTI_HEAP_ROOT_JNI_GLOBAL
= 1,
168 JVMTI_HEAP_ROOT_SYSTEM_CLASS
= 2,
169 JVMTI_HEAP_ROOT_MONITOR
= 3,
170 JVMTI_HEAP_ROOT_STACK_LOCAL
= 4,
171 JVMTI_HEAP_ROOT_JNI_LOCAL
= 5,
172 JVMTI_HEAP_ROOT_THREAD
= 6,
173 JVMTI_HEAP_ROOT_OTHER
= 7
178 JVMTI_ITERATION_ABORT
= 0,
179 JVMTI_ITERATION_CONTINUE
= 1,
180 JVMTI_ITERATION_IGNORE
= 2
181 } jvmtiIterationControl
;
185 JVMTI_JLOCATION_OTHER
= 0,
186 JVMTI_JLOCATION_JVMBCI
= 1,
187 JVMTI_JLOCATION_MACHINEPC
= 2
188 } jvmtiJlocationFormat
;
192 JVMTI_REFERENCE_CLASS
= 1,
193 JVMTI_REFERENCE_FIELD
= 2,
194 JVMTI_REFERENCE_ARRAY_ELEMENT
= 3,
195 JVMTI_REFERENCE_CLASS_LOADER
= 4,
196 JVMTI_REFERENCE_SIGNERS
= 5,
197 JVMTI_REFERENCE_PROTECTION_DOMAIN
= 6,
198 JVMTI_REFERENCE_INTERFACE
= 7,
199 JVMTI_REFERENCE_STATIC_FIELD
= 8,
200 JVMTI_REFERENCE_CONSTANT_POOL
= 9
201 } jvmtiObjectReferenceKind
;
206 JVMTI_KIND_IN_PTR
= 92,
207 JVMTI_KIND_IN_BUF
= 93,
208 JVMTI_KIND_ALLOC_BUF
= 94,
209 JVMTI_KIND_ALLOC_ALLOC_BUF
= 95,
211 JVMTI_KIND_OUT_BUF
= 97
216 JVMTI_TYPE_JBYTE
= 101,
217 JVMTI_TYPE_JCHAR
= 102,
218 JVMTI_TYPE_JSHORT
= 103,
219 JVMTI_TYPE_JINT
= 104,
220 JVMTI_TYPE_JLONG
= 105,
221 JVMTI_TYPE_JFLOAT
= 106,
222 JVMTI_TYPE_JDOUBLE
= 107,
223 JVMTI_TYPE_JBOOLEAN
= 108,
224 JVMTI_TYPE_JOBJECT
= 109,
225 JVMTI_TYPE_JTHREAD
= 110,
226 JVMTI_TYPE_JCLASS
= 111,
227 JVMTI_TYPE_JVALUE
= 112,
228 JVMTI_TYPE_JFIELDID
= 113,
229 JVMTI_TYPE_JMETHODID
= 114,
230 JVMTI_TYPE_CCHAR
= 115,
231 JVMTI_TYPE_CVOID
= 116,
232 JVMTI_TYPE_JNIENV
= 117
237 JVMTI_PHASE_ONLOAD
= 1,
238 JVMTI_PHASE_PRIMORDIAL
= 2,
239 JVMTI_PHASE_LIVE
= 4,
240 JVMTI_PHASE_START
= 6,
246 JVMTI_TIMER_USER_CPU
= 30,
247 JVMTI_TIMER_TOTAL_CPU
= 31,
248 JVMTI_TIMER_ELAPSED
= 32
253 JVMTI_VERBOSE_OTHER
= 0,
254 JVMTI_VERBOSE_GC
= 1,
255 JVMTI_VERBOSE_CLASS
= 2,
256 JVMTI_VERBOSE_JNI
= 4
259 /* Version information */
260 #define JVMTI_VERSION_INTERFACE_JNI 0x00000000
261 #define JVMTI_VERSION_INTERFACE_JVMTI 0x30000000
262 #define JVMTI_VERSION_MASK_INTERFACE_TYPE 0x70000000
263 #define JVMTI_VERSION_MASK_MAJOR 0x0FFF0000
264 #define JVMTI_VERSION_MASK_MINOR 0x0000FF00
265 #define JVMTI_VERSION_MASK_MICRO 0x000000FF
266 #define JVMTI_VERSION_SHIFT_MAJOR 16
267 #define JVMTI_VERSION_SHIFT_MINOR 8
268 #define JVMTI_VERSION_SHIFT_MICRO 0
271 * Events and event callbacks
276 JVMTI_EVENT_VM_INIT
= 50,
277 JVMTI_EVENT_VM_DEATH
= 51,
278 JVMTI_EVENT_THREAD_START
= 52,
279 JVMTI_EVENT_THREAD_END
= 53,
280 JVMTI_EVENT_CLASS_FILE_LOAD_HOOK
= 54,
281 JVMTI_EVENT_CLASS_LOAD
= 55,
282 JVMTI_EVENT_CLASS_PREPARE
= 56,
283 JVMTI_EVENT_VM_START
= 57,
284 JVMTI_EVENT_EXCEPTION
= 58,
285 JVMTI_EVENT_EXCEPTION_CATCH
= 59,
286 JVMTI_EVENT_SINGLE_STEP
= 60,
287 JVMTI_EVENT_FRAME_POP
= 61,
288 JVMTI_EVENT_BREAKPOINT
= 62,
289 JVMTI_EVENT_FIELD_ACCESS
= 63,
290 JVMTI_EVENT_FIELD_MODIFICATION
= 64,
291 JVMTI_EVENT_METHOD_ENTRY
= 65,
292 JVMTI_EVENT_METHOD_EXIT
= 66,
293 JVMTI_EVENT_NATIVE_METHOD_BIND
= 67,
294 JVMTI_EVENT_COMPILED_METHOD_LOAD
= 68,
295 JVMTI_EVENT_COMPILED_METHOD_UNLOAD
= 69,
296 JVMTI_EVENT_DYNAMIC_CODE_GENERATED
= 70,
297 JVMTI_EVENT_DATA_DUMP_REQUEST
= 71,
298 JVMTI_EVENT_MONITOR_WAIT
= 73,
299 JVMTI_EVENT_MONITOR_WAITED
= 74,
300 JVMTI_EVENT_MONITOR_CONTENDED_ENTER
= 75,
301 JVMTI_EVENT_MONITOR_CONTENDED_ENTERED
= 76,
302 JVMTI_EVENT_GARBAGE_COLLECTION_START
= 81,
303 JVMTI_EVENT_GARBAGE_COLLECTION_FINISH
= 82,
304 JVMTI_EVENT_OBJECT_FREE
= 83,
305 JVMTI_EVENT_VM_OBJECT_ALLOC
= 84
308 typedef void *jvmtiEventReserved
;
310 typedef void (JNICALL
*jvmtiEventSingleStep
)
311 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
314 typedef void (JNICALL
*jvmtiEventBreakpoint
)
315 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
318 typedef void (JNICALL
*jvmtiEventFieldAccess
)
319 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
320 jlocation location
, jclass field_klass
, jobject object
, jfieldID field
);
322 typedef void (JNICALL
*jvmtiEventFieldModification
)
323 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
324 jlocation location
, jclass field_klass
, jobject object
, jfieldID field
,
325 char signature_type
, jvalue new_value
);
327 typedef void (JNICALL
*jvmtiEventFramePop
)
328 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
329 jboolean was_popped_by_exception
);
331 typedef void (JNICALL
*jvmtiEventMethodEntry
)
332 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
);
334 typedef void (JNICALL
*jvmtiEventMethodExit
)
335 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
336 jboolean was_popped_by_exception
, jvalue return_value
);
338 typedef void (JNICALL
*jvmtiEventNativeMethodBind
)
339 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
340 void *address
, void **new_address_ptr
);
342 typedef void (JNICALL
*jvmtiEventException
)
343 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
344 jlocation location
, jobject exception
, jmethodID catch_method
,
345 jlocation catch_location
);
347 typedef void (JNICALL
*jvmtiEventExceptionCatch
)
348 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jmethodID method
,
349 jlocation location
, jobject exception
);
351 typedef void (JNICALL
*jvmtiEventThreadStart
)
352 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
);
354 typedef void (JNICALL
*jvmtiEventThreadEnd
)
355 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
);
357 typedef void (JNICALL
*jvmtiEventClassLoad
)
358 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jclass klass
);
360 typedef void (JNICALL
*jvmtiEventClassPrepare
)
361 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thraed
, jclass klass
);
363 typedef void (JNICALL
*jvmtiEventClassFileLoadHook
)
364 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jclass class_being_redefined
,
365 jobject loader
, const char *name
, jobject protection_domain
,
366 jint class_data_len
, const unsigned char *class_data
,
367 jint
*new_class_data_len
, unsigned char **new_class_data
);
369 typedef void (JNICALL
*jvmtiEventVMStart
)
370 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
);
372 typedef void (JNICALL
*jvmtiEventVMInit
)
373 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
);
375 typedef void (JNICALL
*jvmtiEventVMDeath
)
376 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
);
378 typedef void (JNICALL
*jvmtiEventCompiledMethodLoad
)
379 (jvmtiEnv
*jvmti_env
, jmethodID method
, jint code_size
,
380 const void *code_addr
, jint map_length
, const jvmtiAddrLocationMap
*map
,
381 const void *compile_info
);
383 typedef void (JNICALL
*jvmtiEventCompiledMethodUnload
)
384 (jvmtiEnv
*jvmti_env
, jmethodID method
, const void *code_addr
);
386 typedef void (JNICALL
*jvmtiEventDynamicCodeGenerated
)
387 (jvmtiEnv
*jvmti_env
, const char *name
, const void *address
, jint length
);
389 typedef void (JNICALL
*jvmtiEventDataDumpRequest
)
390 (jvmtiEnv
*jvmti_env
);
392 typedef void (JNICALL
*jvmtiEventMonitorContendedEnter
)
393 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jobject object
);
395 typedef void (JNICALL
*jvmtiEventMonitorContendedEntered
)
396 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jobject object
);
398 typedef void (JNICALL
*jvmtiEventMonitorWait
)
399 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jobject object
,
402 typedef void (JNICALL
*jvmtiEventMonitorWaited
)
403 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jobject object
,
406 typedef void (JNICALL
*jvmtiEventVMObjectAlloc
)
407 (jvmtiEnv
*jvmti_env
, JNIEnv
*jni_env
, jthread thread
, jobject object
,
408 jclass object_klass
, jlong size
);
410 typedef void (JNICALL
*jvmtiEventObjectFree
)
411 (jvmtiEnv
*jvmti_env
, jlong tag
);
413 typedef void (JNICALL
*jvmtiEventGarbageCollectionStart
)
414 (jvmtiEnv
*jvmti_env
);
416 typedef void (JNICALL
*jvmtiEventGarbageCollectionFinish
)
417 (jvmtiEnv
*jvmti_env
);
421 jvmtiEventVMInit VMInit
;
422 jvmtiEventVMDeath VMDeath
;
423 jvmtiEventThreadStart ThreadStart
;
424 jvmtiEventThreadEnd ThreadEnd
;
425 jvmtiEventClassFileLoadHook ClassFileLoadHook
;
426 jvmtiEventClassLoad ClassLoad
;
427 jvmtiEventClassPrepare ClassPrepare
;
428 jvmtiEventVMStart VMStart
;
429 jvmtiEventException Exception
;
430 jvmtiEventExceptionCatch ExceptionCatch
;
431 jvmtiEventSingleStep SingleStep
;
432 jvmtiEventFramePop FramePop
;
433 jvmtiEventBreakpoint Breakpoint
;
434 jvmtiEventFieldAccess FieldAccess
;
435 jvmtiEventFieldModification FieldModification
;
436 jvmtiEventMethodEntry MethodEntry
;
437 jvmtiEventMethodExit MethodExit
;
438 jvmtiEventNativeMethodBind NativeMethodBind
;
439 jvmtiEventCompiledMethodLoad CompiledMethodLoad
;
440 jvmtiEventCompiledMethodUnload CompiledMethodUnload
;
441 jvmtiEventDynamicCodeGenerated DynamicCodeGenerated
;
442 jvmtiEventDataDumpRequest DataDumpRequest
;
443 jvmtiEventReserved reserved72
;
444 jvmtiEventMonitorWait MonitorWait
;
445 jvmtiEventMonitorWaited MonitorWaited
;
446 jvmtiEventMonitorContendedEnter MonitorContendedEnter
;
447 jvmtiEventMonitorContendedEntered MonitorContendedEntered
;
448 jvmtiEventReserved reserved77
;
449 jvmtiEventReserved reserved78
;
450 jvmtiEventReserved reserved79
;
451 jvmtiEventReserved reserved80
;
452 jvmtiEventGarbageCollectionStart GarbageCollectionStart
;
453 jvmtiEventGarbageCollectionFinish GarbageCollectionFinish
;
454 jvmtiEventObjectFree ObjectFree
;
455 jvmtiEventVMObjectAlloc VMObjectAlloc
;
456 } jvmtiEventCallbacks
;
459 * Function and Structure Type Definitions
462 struct _jvmtiAddrLocationMap
464 const void *start_address
;
470 unsigned int can_tag_objects
: 1;
471 unsigned int can_generate_field_modification_events
: 1;
472 unsigned int can_generate_field_access_events
: 1;
473 unsigned int can_get_bytecodes
: 1;
474 unsigned int can_get_synthetic_attribute
: 1;
475 unsigned int can_get_owned_monitor_info
: 1;
476 unsigned int can_get_current_contended_monitor
: 1;
477 unsigned int can_get_monitor_info
: 1;
478 unsigned int can_pop_frame
: 1;
479 unsigned int can_redefine_classes
: 1;
480 unsigned int can_signal_thread
: 1;
481 unsigned int can_get_source_file_name
: 1;
482 unsigned int can_get_line_numbers
: 1;
483 unsigned int can_get_source_debug_extension
: 1;
484 unsigned int can_access_local_variables
: 1;
485 unsigned int can_maintain_original_method_order
: 1;
486 unsigned int can_generate_single_step_events
: 1;
487 unsigned int can_generate_exception_events
: 1;
488 unsigned int can_generate_frame_pop_events
: 1;
489 unsigned int can_generate_breakpoint_events
: 1;
490 unsigned int can_suspend
: 1;
491 unsigned int can_redefine_any_class
: 1;
492 unsigned int can_get_current_thread_cpu_time
: 1;
493 unsigned int can_get_thread_cpu_time
: 1;
494 unsigned int can_generate_method_entry_events
: 1;
495 unsigned int can_generate_method_exit_events
: 1;
496 unsigned int can_generate_all_class_hook_events
: 1;
497 unsigned int can_generate_compiled_method_load_events
: 1;
498 unsigned int can_generate_monitor_events
: 1;
499 unsigned int can_generate_vm_object_alloc_events
: 1;
500 unsigned int can_generate_native_method_bind_events
: 1;
501 unsigned int can_generate_garbage_collection_events
: 1;
502 unsigned int can_generate_object_free_events
: 1;
514 jint class_byte_count
;
515 const unsigned char *class_bytes
;
516 } jvmtiClassDefinition
;
522 jvmtiParamTypes base_type
;
528 jint extension_event_index
;
530 char *short_description
;
532 jvmtiParamInfo
* params
;
533 } jvmtiExtensionEventInfo
;
535 typedef jvmtiError (JNICALL
*jvmtiExtensionFunction
)
536 (jvmtiEnv
*jvmti_enf
, ...);
540 jvmtiExtensionFunction func
;
542 char *short_description
;
544 jvmtiParamInfo
*params
;
547 } jvmtiExtensionFunctionInfo
;
557 jlocation start_location
;
559 } jvmtiLineNumberEntry
;
563 jlocation start_location
;
567 char *generic_signature
;
569 } jvmtiLocalVariableEntry
;
577 jint notify_waiter_count
;
578 jthread
*notify_waiters
;
585 jvmtiFrameInfo
*frame_buffer
;
595 } jvmtiThreadGroupInfo
;
602 jthreadGroup thread_group
;
603 jobject context_class_loader
;
609 jboolean may_skip_forward
;
610 jboolean may_skip_backward
;
616 typedef void (JNICALL
*jvmtiExtensionEvent
)
617 (jvmtiEnv
*jvmti_env
, ...);
619 typedef jvmtiIterationControl (JNICALL
*jvmtiHeapObjectCallback
)
620 (jlong class_tag
, jlong size
, jlong
*tag_ptr
, void *user_data
);
622 typedef jvmtiIterationControl (JNICALL
*jvmtiHeapRootCallback
)
623 (jvmtiHeapRootKind root_kind
, jlong class_tag
, jlong size
, jlong
*tag_ptr
,
626 typedef jvmtiIterationControl (JNICALL
*jvmtiObjectReferenceCallback
)
627 (jvmtiObjectReferenceKind reference_kind
, jlong class_tag
, jlong size
,
628 jlong
*tag_ptr
, jlong referrer_tag
, jint referrer_index
, void *user_data
);
630 typedef jvmtiIterationControl (JNICALL
*jvmtiStackReferenceCallback
)
631 (jvmtiHeapRootKind root_kind
, jlong class_tag
, jlong size
, jlong
*tag_ptr
,
632 jlong thread_tag
, jint depth
, jmethodID method
, jint slot
, void *user_data
);
634 typedef void (JNICALL
*jvmtiStartFunction
)
635 (jvmtiEnv
*env
, JNIEnv
*jni_env
, void *arg
);
638 * JVM Tool Interface Base Types
640 typedef struct JNINativeInterface jniNativeInterface
;
646 jvmtiError (JNICALL
*SetEventNotificationMode
) (jvmtiEnv
*env
,
648 jvmtiEvent event_type
,
649 jthread event_thread
, ...);
652 jvmtiError (JNICALL
*GetAllThreads
) (jvmtiEnv
*env
,
653 jint
*threads_count_ptr
,
654 jthread
**threads_ptr
);
656 jvmtiError (JNICALL
*SuspendThread
) (jvmtiEnv
*env
,
659 jvmtiError (JNICALL
*ResumeThread
) (jvmtiEnv
*env
,
662 jvmtiError (JNICALL
*StopThread
) (jvmtiEnv
*env
,
666 jvmtiError (JNICALL
*InterruptThread
) (jvmtiEnv
*env
,
669 jvmtiError (JNICALL
*GetThreadInfo
) (jvmtiEnv
*env
,
671 jvmtiThreadInfo
*info_ptr
);
673 jvmtiError (JNICALL
*GetOwnedMonitorInfo
) (jvmtiEnv
*env
,
675 jint
*owned_monitor_count_ptr
,
676 jobject
**owned_monitors_ptr
);
678 jvmtiError (JNICALL
*GetCurrentContendedMonitor
) (jvmtiEnv
*env
,
680 jobject
*monitor_ptr
);
682 jvmtiError (JNICALL
*RunAgentThread
) (jvmtiEnv
*env
,
684 jvmtiStartFunction proc
,
688 jvmtiError (JNICALL
*GetTopThreadGroups
) (jvmtiEnv
*env
,
689 jint
*group_count_ptr
,
690 jthreadGroup
**groups_ptr
);
692 jvmtiError (JNICALL
*GetThreadGroupInfo
) (jvmtiEnv
*env
,
694 jvmtiThreadGroupInfo
*info_ptr
);
696 jvmtiError (JNICALL
*GetThreadGroupChildren
) (jvmtiEnv
*env
,
698 jint
*thread_count_ptr
,
699 jthread
**threads_ptr
,
700 jint
*group_count_ptr
,
701 jthreadGroup
**groups_ptr
);
702 jvmtiError (JNICALL
*GetFrameCount
) (jvmtiEnv
*env
,
706 jvmtiError (JNICALL
*GetThreadState
) (jvmtiEnv
*env
,
708 jint
*thread_state_ptr
);
712 jvmtiError (JNICALL
*GetFrameLocation
) (jvmtiEnv
*env
,
715 jmethodID
*method_ptr
,
716 jlocation
*location_ptr
);
718 jvmtiError (JNICALL
*NotifyPopFrame
) (jvmtiEnv
*env
,
722 jvmtiError (JNICALL
*GetLocalObject
) (jvmtiEnv
*env
,
728 jvmtiError (JNICALL
*GetLocalInt
) (jvmtiEnv
*env
,
734 jvmtiError (JNICALL
*GetLocalLong
) (jvmtiEnv
*env
,
740 jvmtiError (JNICALL
*GetLocalFloat
) (jvmtiEnv
*env
,
746 jvmtiError (JNICALL
*GetLocalDouble
) (jvmtiEnv
*env
,
752 jvmtiError (JNICALL
*SetLocalObject
) (jvmtiEnv
*env
,
758 jvmtiError (JNICALL
*SetLocalInt
) (jvmtiEnv
*env
,
764 jvmtiError (JNICALL
*SetLocalLong
) (jvmtiEnv
*env
,
770 jvmtiError (JNICALL
*SetLocalFloat
) (jvmtiEnv
*env
,
776 jvmtiError (JNICALL
*SetLocalDouble
) (jvmtiEnv
*env
,
782 jvmtiError (JNICALL
*CreateRawMonitor
) (jvmtiEnv
*env
,
784 jrawMonitorID
*monitor_ptr
);
786 jvmtiError (JNICALL
*DestroyRawMonitor
) (jvmtiEnv
*env
,
787 jrawMonitorID monitor
);
789 jvmtiError (JNICALL
*RawMonitorEnter
) (jvmtiEnv
*env
,
790 jrawMonitorID monitor
);
792 jvmtiError (JNICALL
*RawMonitorExit
) (jvmtiEnv
*env
,
793 jrawMonitorID monitor
);
795 jvmtiError (JNICALL
*RawMonitorWait
) (jvmtiEnv
*env
,
796 jrawMonitorID monitor
,
799 jvmtiError (JNICALL
*RawMonitorNotify
) (jvmtiEnv
*env
,
800 jrawMonitorID monitor
);
802 jvmtiError (JNICALL
*RawMonitorNotifyAll
) (jvmtiEnv
*env
,
803 jrawMonitorID monitor
);
805 jvmtiError (JNICALL
*SetBreakpoint
) (jvmtiEnv
*env
,
809 jvmtiError (JNICALL
*ClearBreakpoint
) (jvmtiEnv
*env
,
815 jvmtiError (JNICALL
*SetFieldAccessWatch
) (jvmtiEnv
*env
,
819 jvmtiError (JNICALL
*ClearFieldAccessWatch
) (jvmtiEnv
*env
,
823 jvmtiError (JNICALL
*SetFieldModificationWatch
) (jvmtiEnv
*env
,
827 jvmtiError (JNICALL
*ClearFieldModificationWatch
) (jvmtiEnv
*env
,
833 jvmtiError (JNICALL
*Allocate
) (jvmtiEnv
*env
,
835 unsigned char **mem_ptr
);
837 jvmtiError (JNICALL
*Deallocate
) (jvmtiEnv
*env
,
840 jvmtiError (JNICALL
*GetClassSignature
) (jvmtiEnv
*env
,
842 char **signature_ptr
,
845 jvmtiError (JNICALL
*GetClassStatus
) (jvmtiEnv
*env
,
849 jvmtiError (JNICALL
*GetSourceFileName
) (jvmtiEnv
*env
,
851 char **source_name_ptr
);
853 jvmtiError (JNICALL
*GetClassModifiers
) (jvmtiEnv
*env
,
855 jint
*modifiers_ptr
);
857 jvmtiError (JNICALL
*GetClassMethods
) (jvmtiEnv
*env
,
859 jint
*method_count_ptr
,
860 jmethodID
**methods_ptr
);
862 jvmtiError (JNICALL
*GetClassFields
) (jvmtiEnv
*env
,
864 jint
*field_count_ptr
,
865 jfieldID
**fields_ptr
);
867 jvmtiError (JNICALL
*GetImplementedInterfaces
) (jvmtiEnv
*env
,
869 jint
*interface_count_ptr
,
870 jclass
**interfaces_ptr
);
872 jvmtiError (JNICALL
*IsInterface
) (jvmtiEnv
*env
,
874 jboolean
*is_interface_ptr
);
876 jvmtiError (JNICALL
*IsArrayClass
) (jvmtiEnv
*env
,
878 jboolean
*is_array_class_ptr
);
880 jvmtiError (JNICALL
*GetClassLoader
) (jvmtiEnv
*env
,
882 jobject
*classloader_ptr
);
884 jvmtiError (JNICALL
*GetObjectHashCode
) (jvmtiEnv
*env
,
886 jint
*hash_code_ptr
);
888 jvmtiError (JNICALL
*GetObjectMonitorUsage
) (jvmtiEnv
*env
,
890 jvmtiMonitorUsage
*info_ptr
);
892 jvmtiError (JNICALL
*GetFieldName
) (jvmtiEnv
*env
,
896 char **signature_ptr
,
899 jvmtiError (JNICALL
*GetFieldDeclaringClass
) (jvmtiEnv
*env
,
902 jclass
*declaring_class_ptr
);
904 jvmtiError (JNICALL
*GetFieldModifiers
) (jvmtiEnv
*env
,
907 jint
*modifiers_ptr
);
909 jvmtiError (JNICALL
*IsFieldSynthetic
) (jvmtiEnv
*env
,
912 jboolean
*is_synthetic_ptr
);
914 jvmtiError (JNICALL
*GetMethodName
) (jvmtiEnv
*env
,
917 char **signature_ptr
,
920 jvmtiError (JNICALL
*GetMethodDeclaringClass
) (jvmtiEnv
*env
,
922 jclass
*declaring_class_ptr
);
925 jvmtiError (JNICALL
*GetMethodModifiers
) (jvmtiEnv
*env
,
927 jint
*modifiers_ptr
);
931 jvmtiError (JNICALL
*GetMaxLocals
) (jvmtiEnv
*env
,
935 jvmtiError (JNICALL
*GetArgumentsSize
) (jvmtiEnv
*env
,
939 jvmtiError (JNICALL
*GetLineNumberTable
) (jvmtiEnv
*env
,
941 jint
*entry_count_ptr
,
942 jvmtiLineNumberEntry
**table_ptr
);
944 jvmtiError (JNICALL
*GetMethodLocation
) (jvmtiEnv
*env
,
946 jlocation
*start_location_ptr
,
947 jlocation
*end_location_ptr
);
949 jvmtiError (JNICALL
*GetLocalVariableTable
) (jvmtiEnv
*env
,
951 jint
*entry_count_ptr
,
952 jvmtiLocalVariableEntry
**table_ptr
);
958 jvmtiError (JNICALL
*GetBytecodes
) (jvmtiEnv
*env
,
960 jint
*bytecode_count_ptr
,
961 unsigned char **bytecodes_ptr
);
963 jvmtiError (JNICALL
*IsMethodNative
) (jvmtiEnv
*env
,
965 jboolean
*is_native_ptr
);
967 jvmtiError (JNICALL
*IsMethodSynthetic
) (jvmtiEnv
*env
,
969 jboolean
*is_synthetic_ptr
);
971 jvmtiError (JNICALL
*GetLoadedClasses
) (jvmtiEnv
*env
,
972 jint
*class_count_ptr
,
973 jclass
**classes_ptr
);
975 jvmtiError (JNICALL
*GetClassLoaderClasses
) (jvmtiEnv
*env
,
976 jobject initiating_loader
,
977 jint
*class_count_ptr
,
978 jclass
**classes_ptr
);
980 jvmtiError (JNICALL
*PopFrame
) (jvmtiEnv
*env
,
995 jvmtiError (JNICALL
*RedefineClasses
) (jvmtiEnv
*env
,
997 const jvmtiClassDefinition
* class_definitions
);
999 jvmtiError (JNICALL
*GetVersionNumber
) (jvmtiEnv
*env
,
1002 jvmtiError (JNICALL
*GetCapabilities
) (jvmtiEnv
*env
,
1003 jvmtiCapabilities
*capabilities_ptr
);
1005 jvmtiError (JNICALL
*GetSourceDebugExtension
) (jvmtiEnv
*env
,
1007 char **source_debug_extension_ptr
);
1009 jvmtiError (JNICALL
*IsMethodObsolete
) (jvmtiEnv
*env
,
1011 jboolean
*is_obsolete_ptr
);
1013 jvmtiError (JNICALL
*SuspendThreadList
) (jvmtiEnv
*env
,
1015 const jthread
*request_list
,
1016 jvmtiError
*results
);
1018 jvmtiError (JNICALL
*ResumeThreadList
) (jvmtiEnv
*env
,
1020 const jthread
*request_list
,
1021 jvmtiError
*results
);
1035 jvmtiError (JNICALL
*GetAllStackTraces
) (jvmtiEnv
*env
,
1036 jint max_frame_count
,
1037 jvmtiStackInfo
**stack_info_ptr
,
1038 jint
*thread_count_ptr
);
1040 jvmtiError (JNICALL
*GetThreadListStackTraces
) (jvmtiEnv
*env
,
1042 const jthread
*thread_list
,
1043 jint max_frame_count
,
1044 jvmtiStackInfo
**stack_info_ptr
);
1046 jvmtiError (JNICALL
*GetThreadLocalStorage
) (jvmtiEnv
*env
,
1050 jvmtiError (JNICALL
*SetThreadLocalStorage
) (jvmtiEnv
*env
,
1054 jvmtiError (JNICALL
*GetStackTrace
) (jvmtiEnv
*env
,
1057 jint max_frame_count
,
1058 jvmtiFrameInfo
*frame_buffer
,
1063 jvmtiError (JNICALL
*GetTag
) (jvmtiEnv
*env
,
1067 jvmtiError (JNICALL
*SetTag
) (jvmtiEnv
*env
,
1071 jvmtiError (JNICALL
*ForceGarbageCollection
) (jvmtiEnv
*env
);
1073 jvmtiError (JNICALL
*IterateOverObjectsReachableFromObject
) (jvmtiEnv
*env
,
1075 jvmtiObjectReferenceCallback object_reference_callback
,
1078 jvmtiError (JNICALL
*IterateOverReachableObjects
) (jvmtiEnv
*env
,
1079 jvmtiHeapRootCallback heap_root_callback
,
1080 jvmtiStackReferenceCallback stack_ref_callback
,
1081 jvmtiObjectReferenceCallback object_ref_callback
,
1084 jvmtiError (JNICALL
*IterateOverHeap
) (jvmtiEnv
*env
,
1085 jvmtiHeapObjectFilter object_filter
,
1086 jvmtiHeapObjectCallback heap_object_callback
,
1089 jvmtiError (JNICALL
*IterateOverInstanceOfClass
) (jvmtiEnv
*env
,
1091 jvmtiHeapObjectFilter object_filter
,
1092 jvmtiHeapObjectCallback heap_object_callback
,
1097 jvmtiError (JNICALL
*GetObjectsWithTags
) (jvmtiEnv
*env
,
1101 jobject
**object_result_ptr
,
1102 jlong
**tag_result_ptr
);
1114 jvmtiError (JNICALL
*SetJNIFunctionTable
) (jvmtiEnv
*env
,
1115 const jniNativeInterface
*function_table
);
1117 jvmtiError (JNICALL
*GetJNIFunctionTable
) (jvmtiEnv
*env
,
1118 jniNativeInterface
**function_table_ptr
);
1120 jvmtiError (JNICALL
*SetEventCallbacks
) (jvmtiEnv
*env
,
1121 const jvmtiEventCallbacks
*callbacks
,
1122 jint size_of_callbacks
);
1124 jvmtiError (JNICALL
*GenerateEvents
) (jvmtiEnv
*env
,
1125 jvmtiEvent event_type
);
1127 jvmtiError (JNICALL
*GetExtensionFunctions
) (jvmtiEnv
*env
,
1128 jint
*extension_count_ptr
,
1129 jvmtiExtensionFunctionInfo
**extensions
);
1131 jvmtiError (JNICALL
*GetExtensionEvents
) (jvmtiEnv
*env
,
1132 jint
*extension_count_ptr
,
1133 jvmtiExtensionEventInfo
**extensions
);
1135 jvmtiError (JNICALL
*SetExtensionEventCallback
) (jvmtiEnv
*env
,
1136 jint extension_event_index
,
1137 jvmtiExtensionEvent callback
);
1139 jvmtiError (JNICALL
*DisposeEnvironment
) (jvmtiEnv
*env
);
1141 jvmtiError (JNICALL
*GetErrorName
) (jvmtiEnv
*env
,
1145 jvmtiError (JNICALL
*GetJLocationFormat
) (jvmtiEnv
*env
,
1146 jvmtiJlocationFormat
*format_ptr
);
1148 jvmtiError (JNICALL
*GetSystemProperties
) (jvmtiEnv
*env
,
1150 char ***property_ptr
);
1152 jvmtiError (JNICALL
*GetSystemProperty
) (jvmtiEnv
*env
,
1153 const char *property
,
1156 jvmtiError (JNICALL
*SetSystemProperty
) (jvmtiEnv
*env
,
1157 const char *property
,
1160 jvmtiError (JNICALL
*GetPhase
) (jvmtiEnv
*env
,
1161 jvmtiPhase
*phase_ptr
);
1163 jvmtiError (JNICALL
*GetCurrentThreadCpuTimerInfo
) (jvmtiEnv
*env
,
1164 jvmtiTimerInfo
*info_ptr
);
1166 jvmtiError (JNICALL
*GetCurrentThreadCpuTime
) (jvmtiEnv
*env
,
1169 jvmtiError (JNICALL
*GetThreadCpuTimerInfo
) (jvmtiEnv
*env
,
1170 jvmtiTimerInfo
*info_ptr
);
1172 jvmtiError (JNICALL
*GetThreadCpuTime
) (jvmtiEnv
*env
,
1176 jvmtiError (JNICALL
*GetTimerInfo
) (jvmtiEnv
*env
,
1177 jvmtiTimerInfo
*info_ptr
);
1179 jvmtiError (JNICALL
*GetTime
) (jvmtiEnv
*env
,
1182 jvmtiError (JNICALL
*GetPotentialCapabilities
) (jvmtiEnv
*env
,
1183 jvmtiCapabilities
*capabilities_ptr
);
1187 jvmtiError (JNICALL
*AddCapabilities
) (jvmtiEnv
*env
,
1188 const jvmtiCapabilities
*capabilities_ptr
);
1190 jvmtiError (JNICALL
*RelinquishCapabilities
) (jvmtiEnv
*env
,
1191 const jvmtiCapabilities
*capabilities_ptr
);
1193 jvmtiError (JNICALL
*GetAvailableProcessors
) (jvmtiEnv
*env
,
1194 jint
*processor_count_ptr
);
1200 jvmtiError (JNICALL
*GetEnvironmentLocalStorage
) (jvmtiEnv
*env
,
1203 jvmtiError (JNICALL
*SetEnvironmentLocalStorage
) (jvmtiEnv
*env
,
1206 jvmtiError (JNICALL
*AddToBootstrapClassLoaderSearch
) (jvmtiEnv
*env
,
1207 const char *segment
);
1209 jvmtiError (JNICALL
*SetVerboseFlag
) (jvmtiEnv
*env
,
1210 jvmtiVerboseFlag flag
,
1219 jvmtiError (JNICALL
*GetObjectSize
) (jvmtiEnv
*env
,
1229 struct _Jv_jvmtiEnv
*p
;
1231 #ifdef _CLASSPATH_JVMTIENV_CONTENTS
1232 _CLASSPATH_JVMTIENV_CONTENTS
1235 jvmtiError
SetEventNotificationMode (jvmtiEventMode mode
,
1236 jvmtiEvent event_type
,
1237 jthread event_thread
, ...)
1240 va_start (args
, event_thread
);
1241 jvmtiError result
= p
->SetEventNotificationMode (this, mode
, event_type
,
1242 event_thread
, args
);
1247 jvmtiError
GetAllThreads (jint
*threads_count_ptr
, jthread
**threads_ptr
)
1248 { return p
->GetAllThreads (this, threads_count_ptr
, threads_ptr
); }
1250 jvmtiError
SuspendThread (jthread thread
)
1251 { return p
->SuspendThread (this, thread
); }
1253 jvmtiError
ResumeThread (jthread thread
)
1254 { return p
->ResumeThread (this, thread
); }
1256 jvmtiError
StopThread (jthread thread
, jobject exception
)
1257 { return p
->StopThread (this, thread
, exception
); }
1259 jvmtiError
InterruptThread (jthread thread
)
1260 { return p
->InterruptThread (this, thread
); }
1262 jvmtiError
GetThreadInfo (jthread thread
, jvmtiThreadInfo
*info_ptr
)
1263 { return p
->GetThreadInfo (this, thread
, info_ptr
); }
1265 jvmtiError
GetOwnedMonitorInfo (jthread thread
,
1266 jint
*owned_monitor_count_ptr
,
1267 jobject
**owned_monitors_ptr
)
1269 return p
->GetOwnedMonitorInfo (this, thread
, owned_monitor_count_ptr
,
1270 owned_monitors_ptr
);
1273 jvmtiError
GetCurrentContendedMonitor (jthread thread
, jobject
*monitor_ptr
)
1274 { return p
->GetCurrentContendedMonitor (this, thread
, monitor_ptr
); }
1276 jvmtiError
RunAgentThread (jthread thread
, jvmtiStartFunction proc
,
1277 const void *arg
, jint priority
)
1278 { return p
->RunAgentThread (this, thread
, proc
, arg
, priority
); }
1280 jvmtiError
GetTopThreadGroups (jint
*group_count_ptr
,
1281 jthreadGroup
**groups_ptr
)
1282 { return p
->GetTopThreadGroups (this, group_count_ptr
, groups_ptr
); }
1284 jvmtiError
GetThreadGroupInfo (jthreadGroup group
,
1285 jvmtiThreadGroupInfo
*info_ptr
)
1286 { return p
->GetThreadGroupInfo (this, group
, info_ptr
); }
1288 jvmtiError
GetThreadGroupChildren (jthreadGroup group
,
1289 jint
*thread_count_ptr
,
1290 jthread
**threads_ptr
,
1291 jint
*group_count_ptr
,
1292 jthreadGroup
**groups_ptr
)
1294 return p
->GetThreadGroupChildren (this, group
, thread_count_ptr
,
1295 threads_ptr
, group_count_ptr
,
1299 jvmtiError
GetFrameCount (jthread thread
, jint
*count_ptr
)
1300 { return p
->GetFrameCount (this, thread
, count_ptr
); }
1302 jvmtiError
GetThreadState (jthread thread
, jint
*thread_state_ptr
)
1303 { return p
->GetThreadState (this, thread
, thread_state_ptr
); }
1305 jvmtiError
GetFrameLocation (jthread thread
, jint depth
,
1306 jmethodID
*method_ptr
, jlocation
*location_ptr
)
1308 return p
->GetFrameLocation (this, thread
, depth
, method_ptr
,
1312 jvmtiError
NotifyPopFrame (jthread thread
, jint depth
)
1313 { return p
->NotifyPopFrame (this, thread
, depth
); }
1315 jvmtiError
GetLocalObject (jthread thread
, jint depth
, jint slot
,
1317 { return p
->GetLocalObject (this, thread
, depth
, slot
, value_ptr
); }
1319 jvmtiError
GetLocalInt (jthread thread
, jint depth
, jint slot
,
1321 { return p
->GetLocalInt (this, thread
, depth
, slot
, value_ptr
); }
1323 jvmtiError
GetLocalLong (jthread thread
, jint depth
, jint slot
,
1325 { return p
->GetLocalLong (this, thread
, depth
, slot
, value_ptr
); }
1327 jvmtiError
GetLocalFloat (jthread thread
, jint depth
, jint slot
,
1329 { return p
->GetLocalFloat (this, thread
, depth
, slot
, value_ptr
); }
1331 jvmtiError
GetLocalDouble (jthread thread
, jint depth
, jint slot
,
1333 { return p
->GetLocalDouble (this, thread
, depth
, slot
, value_ptr
); }
1335 jvmtiError
SetLocalObject (jthread thread
, jint depth
, jint slot
,
1337 { return p
->SetLocalObject (this, thread
, depth
, slot
, value
); }
1339 jvmtiError
SetLocalInt (jthread thread
, jint depth
, jint slot
,
1341 { return p
->SetLocalInt (this, thread
, depth
, slot
, value
); }
1343 jvmtiError
SetLocalLong (jthread thread
, jint depth
, jint slot
,
1345 { return p
->SetLocalLong (this, thread
, depth
, slot
, value
); }
1347 jvmtiError
SetLocalFloat (jthread thread
, jint depth
, jint slot
,
1349 { return p
->SetLocalFloat (this, thread
, depth
, slot
, value
); }
1351 jvmtiError
SetLocalDouble (jthread thread
, jint depth
, jint slot
,
1353 { return p
->SetLocalDouble (this, thread
, depth
, slot
, value
); }
1355 jvmtiError
CreateRawMonitor (const char *name
, jrawMonitorID
*monitor_ptr
)
1356 { return p
->CreateRawMonitor (this, name
, monitor_ptr
); }
1358 jvmtiError
DestroyRawMonitor (jrawMonitorID monitor
)
1359 { return p
->DestroyRawMonitor (this, monitor
); }
1361 jvmtiError
RawMonitorEnter (jrawMonitorID monitor
)
1362 { return p
->RawMonitorEnter (this, monitor
); }
1364 jvmtiError
RawMonitorExit (jrawMonitorID monitor
)
1365 { return p
->RawMonitorExit (this, monitor
); }
1367 jvmtiError
RawMonitorWait (jrawMonitorID monitor
, jlong millis
)
1368 { return p
->RawMonitorWait (this, monitor
, millis
); }
1370 jvmtiError
RawMonitorNotify (jrawMonitorID monitor
)
1371 { return p
->RawMonitorNotify (this, monitor
); }
1373 jvmtiError
RawMonitorNotifyAll (jrawMonitorID monitor
)
1374 { return p
->RawMonitorNotifyAll (this, monitor
); }
1376 jvmtiError
SetBreakpoint (jmethodID method
, jlocation location
)
1377 { return p
->SetBreakpoint (this, method
, location
); }
1379 jvmtiError
ClearBreakpoint (jmethodID method
, jlocation location
)
1380 { return p
->ClearBreakpoint (this, method
, location
); }
1382 jvmtiError
SetFieldAccessWatch (jclass klass
, jfieldID field
)
1383 { return p
->SetFieldAccessWatch (this, klass
, field
); }
1385 jvmtiError
ClearFieldAccessWatch (jclass klass
, jfieldID field
)
1386 { return p
->ClearFieldAccessWatch (this, klass
, field
); }
1388 jvmtiError
SetFieldModificationWatch (jclass klass
, jfieldID field
)
1389 { return p
->SetFieldModificationWatch (this, klass
, field
); }
1391 jvmtiError
ClearFieldModificationWatch (jclass klass
, jfieldID field
)
1392 { return p
->ClearFieldModificationWatch (this, klass
, field
); }
1394 jvmtiError
Allocate (jlong size
, unsigned char **mem_ptr
)
1395 { return p
->Allocate (this, size
, mem_ptr
); }
1397 jvmtiError
Deallocate (unsigned char *mem
)
1398 { return p
->Deallocate (this, mem
); }
1400 jvmtiError
GetClassSignature (jclass klass
, char **signature_ptr
,
1402 { return p
->GetClassSignature (this, klass
, signature_ptr
, generic_ptr
); }
1404 jvmtiError
GetClassStatus (jclass klass
, jint
*status_ptr
)
1405 { return p
->GetClassStatus (this, klass
, status_ptr
); }
1407 jvmtiError
GetSourceFileName (jclass klass
, char **source_name_ptr
)
1408 { return p
->GetSourceFileName (this, klass
, source_name_ptr
); }
1410 jvmtiError
GetClassModifiers (jclass klass
, jint
*modifiers_ptr
)
1411 { return p
->GetClassModifiers (this, klass
, modifiers_ptr
); }
1413 jvmtiError
GetClassMethods (jclass klass
, jint
*method_count_ptr
,
1414 jmethodID
**methods_ptr
)
1415 { return p
->GetClassMethods (this, klass
, method_count_ptr
, methods_ptr
); }
1417 jvmtiError
GetClassFields (jclass klass
, jint
*field_count_ptr
,
1418 jfieldID
**fields_ptr
)
1419 { return p
->GetClassFields (this, klass
, field_count_ptr
, fields_ptr
); }
1421 jvmtiError
GetImplementedInterfaces (jclass klass
,
1422 jint
*interface_count_ptr
,
1423 jclass
**interfaces_ptr
)
1425 return p
->GetImplementedInterfaces (this, klass
, interface_count_ptr
,
1429 jvmtiError
IsInterface (jclass klass
, jboolean
*is_interface_ptr
)
1430 { return p
->IsInterface (this, klass
, is_interface_ptr
); }
1432 jvmtiError
IsArrayClass (jclass klass
, jboolean
*is_array_class_ptr
)
1433 { return p
->IsArrayClass (this, klass
, is_array_class_ptr
); }
1435 jvmtiError
GetClassLoader (jclass klass
, jobject
*classloader_ptr
)
1436 { return p
->GetClassLoader (this, klass
, classloader_ptr
); }
1438 jvmtiError
GetObjectHashCode (jobject object
, jint
*hash_code_ptr
)
1439 { return p
->GetObjectHashCode (this, object
, hash_code_ptr
); }
1441 jvmtiError
GetObjectMonitorUsage (jobject object
,
1442 jvmtiMonitorUsage
*info_ptr
)
1443 { return p
->GetObjectMonitorUsage (this, object
, info_ptr
); }
1445 jvmtiError
GetFieldName (jclass klass
, jfieldID field
, char **name_ptr
,
1446 char **signature_ptr
, char **generic_ptr
)
1448 return p
->GetFieldName (this, klass
, field
, name_ptr
,
1449 signature_ptr
, generic_ptr
);
1452 jvmtiError
GetFieldDeclaringClass (jclass klass
, jfieldID field
,
1453 jclass
*declaring_class_ptr
)
1455 return p
->GetFieldDeclaringClass (this, klass
, field
,
1456 declaring_class_ptr
);
1459 jvmtiError
GetFieldModifiers (jclass klass
, jfieldID field
,
1460 jint
*modifiers_ptr
)
1461 { return p
->GetFieldModifiers (this, klass
, field
, modifiers_ptr
); }
1463 jvmtiError
IsFieldSynthetic (jclass klass
, jfieldID field
,
1464 jboolean
*is_synthetic_ptr
)
1465 { return p
->IsFieldSynthetic (this, klass
, field
, is_synthetic_ptr
); }
1467 jvmtiError
GetMethodName (jmethodID method
, char **name_ptr
,
1468 char **signature_ptr
, char **generic_ptr
)
1470 return p
->GetMethodName (this, method
, name_ptr
, signature_ptr
,
1474 jvmtiError
GetMethodDeclaringClass (jmethodID method
,
1475 jclass
*declaring_class_ptr
)
1476 { return p
->GetMethodDeclaringClass (this, method
, declaring_class_ptr
); }
1479 jvmtiError
GetMethodModifiers (jmethodID method
, jint
*modifiers_ptr
)
1480 { return p
->GetMethodModifiers (this, method
, modifiers_ptr
); }
1482 jvmtiError
GetMaxLocals (jmethodID method
, jint
*max_ptr
)
1483 { return p
->GetMaxLocals (this, method
, max_ptr
); }
1485 jvmtiError
GetArgumentsSize (jmethodID method
, jint
*size_ptr
)
1486 { return p
->GetArgumentsSize (this, method
, size_ptr
); }
1488 jvmtiError
GetLineNumberTable (jmethodID method
, jint
*entry_count_ptr
,
1489 jvmtiLineNumberEntry
**table_ptr
)
1490 { return p
->GetLineNumberTable (this, method
, entry_count_ptr
, table_ptr
); }
1492 jvmtiError
GetMethodLocation (jmethodID method
,
1493 jlocation
*start_location_ptr
,
1494 jlocation
*end_location_ptr
)
1496 return p
->GetMethodLocation (this, method
, start_location_ptr
,
1500 jvmtiError
GetLocalVariableTable (jmethodID method
, jint
*entry_count_ptr
,
1501 jvmtiLocalVariableEntry
**table_ptr
)
1503 return p
->GetLocalVariableTable (this, method
, entry_count_ptr
,
1507 jvmtiError
GetBytecodes (jmethodID method
, jint
*bytecode_count_ptr
,
1508 unsigned char **bytecodes_ptr
)
1510 return p
->GetBytecodes (this, method
, bytecode_count_ptr
,
1514 jvmtiError
IsMethodNative (jmethodID method
, jboolean
*is_native_ptr
)
1515 { return p
->IsMethodNative (this, method
, is_native_ptr
); }
1517 jvmtiError
IsMethodSynthetic (jmethodID method
, jboolean
*is_synthetic_ptr
)
1518 { return p
->IsMethodSynthetic (this, method
, is_synthetic_ptr
); }
1520 jvmtiError
GetLoadedClasses (jint
*class_count_ptr
, jclass
**classes_ptr
)
1521 { return p
->GetLoadedClasses (this, class_count_ptr
, classes_ptr
); }
1523 jvmtiError
GetClassLoaderClasses (jobject initiating_loader
,
1524 jint
*class_count_ptr
,
1525 jclass
**classes_ptr
)
1527 return p
->GetClassLoaderClasses (this, initiating_loader
,
1528 class_count_ptr
, classes_ptr
);
1531 jvmtiError
PopFrame (jthread thread
)
1532 { return p
->PopFrame (this, thread
); }
1534 jvmtiError
RedefineClasses (jint class_count
,
1535 const jvmtiClassDefinition
* class_definitions
)
1536 { return p
->RedefineClasses (this, class_count
, class_definitions
); }
1538 jvmtiError
GetVersionNumber (jint
*version_ptr
)
1539 { return p
->GetVersionNumber (this, version_ptr
); }
1541 jvmtiError
GetCapabilities (jvmtiCapabilities
*capabilities_ptr
)
1542 { return p
->GetCapabilities (this, capabilities_ptr
); }
1544 jvmtiError
GetSourceDebugExtension (jclass klass
,
1545 char **source_debug_extension_ptr
)
1547 return p
->GetSourceDebugExtension (this, klass
,
1548 source_debug_extension_ptr
);
1551 jvmtiError
IsMethodObsolete (jmethodID method
, jboolean
*is_obsolete_ptr
)
1552 { return p
->IsMethodObsolete (this, method
, is_obsolete_ptr
); }
1555 jvmtiError
SuspendThreadList (jint request_count
,
1556 const jthread
*request_list
,
1557 jvmtiError
*results
)
1558 { return p
->SuspendThreadList (this, request_count
, request_list
, results
); }
1560 jvmtiError
ResumeThreadList (jint request_count
,
1561 const jthread
*request_list
,
1562 jvmtiError
*results
)
1563 { return p
->ResumeThreadList (this, request_count
, request_list
, results
); }
1565 jvmtiError
GetAllStackTraces (jint max_frame_count
,
1566 jvmtiStackInfo
**stack_info_ptr
,
1567 jint
*thread_count_ptr
)
1569 return p
->GetAllStackTraces (this, max_frame_count
, stack_info_ptr
,
1573 jvmtiError
GetThreadListStackTraces (jint thread_count
,
1574 const jthread
*thread_list
,
1575 jint max_frame_count
,
1576 jvmtiStackInfo
**stack_info_ptr
)
1578 return p
->GetThreadListStackTraces (this, thread_count
, thread_list
,
1579 max_frame_count
, stack_info_ptr
);
1582 jvmtiError
GetThreadLocalStorage (jthread thread
, void **data_ptr
)
1583 { return p
->GetThreadLocalStorage (this, thread
, data_ptr
); }
1585 jvmtiError
SetThreadLocalStorage (jthread thread
, const void *data
)
1586 { return p
->SetThreadLocalStorage (this, thread
, data
); }
1588 jvmtiError
GetStackTrace (jthread thread
, jint start_depth
,
1589 jint max_frame_count
,
1590 jvmtiFrameInfo
*frame_buffer
, jint
*count_ptr
)
1592 return p
->GetStackTrace (this, thread
, start_depth
, max_frame_count
,
1593 frame_buffer
, count_ptr
);
1596 jvmtiError
GetTag (jobject object
, jlong
*tag_ptr
)
1597 { return p
->GetTag (this, object
, tag_ptr
); }
1599 jvmtiError
SetTag (jobject object
, jlong tag
)
1600 { return p
->SetTag (this, object
, tag
); }
1602 jvmtiError
ForceGarbageCollection (void)
1603 { return p
->ForceGarbageCollection (this); }
1605 jvmtiError
IterateOverObjectsReachableFromObject (jobject object
,
1606 jvmtiObjectReferenceCallback object_reference_callback
,
1609 return p
->IterateOverObjectsReachableFromObject (this, object
,
1610 object_reference_callback
,
1614 jvmtiError
IterateOverReachableObjects (jvmtiHeapRootCallback heap_root_callback
,
1615 jvmtiStackReferenceCallback stack_ref_callback
,
1616 jvmtiObjectReferenceCallback object_ref_callback
,
1619 return p
->IterateOverReachableObjects (this, heap_root_callback
,
1621 object_ref_callback
,
1625 jvmtiError
IterateOverHeap (jvmtiHeapObjectFilter object_filter
,
1626 jvmtiHeapObjectCallback heap_object_callback
,
1629 return p
->IterateOverHeap (this, object_filter
, heap_object_callback
,
1633 jvmtiError
IterateOverInstanceOfClass (jclass klass
,
1634 jvmtiHeapObjectFilter object_filter
,
1635 jvmtiHeapObjectCallback heap_object_callback
,
1638 return p
->IterateOverInstanceOfClass (this, klass
, object_filter
,
1639 heap_object_callback
, user_data
);
1642 jvmtiError
GetObjectsWithTags (jint tag_count
, const jlong
*tags
,
1643 jint
*count_ptr
, jobject
**object_result_ptr
,
1644 jlong
**tag_result_ptr
)
1646 return p
->GetObjectsWithTags (this, tag_count
, tags
, count_ptr
,
1647 object_result_ptr
, tag_result_ptr
);
1650 jvmtiError
SetJNIFunctionTable (const jniNativeInterface
*function_table
)
1651 { return p
->SetJNIFunctionTable (this, function_table
); }
1653 jvmtiError
GetJNIFunctionTable (jniNativeInterface
**function_table_ptr
)
1654 { return p
->GetJNIFunctionTable (this, function_table_ptr
); }
1656 jvmtiError
SetEventCallbacks (const jvmtiEventCallbacks
*callbacks
,
1657 jint size_of_callbacks
)
1658 { return p
->SetEventCallbacks (this, callbacks
, size_of_callbacks
); }
1660 jvmtiError
GenerateEvents (jvmtiEvent event_type
)
1661 { return p
->GenerateEvents (this, event_type
); }
1663 jvmtiError
GetExtensionFunctions (jint
*extension_count_ptr
,
1664 jvmtiExtensionFunctionInfo
**extensions
)
1665 { return p
->GetExtensionFunctions (this, extension_count_ptr
, extensions
); }
1667 jvmtiError
GetExtensionEvents (jint
*extension_count_ptr
,
1668 jvmtiExtensionEventInfo
**extensions
)
1669 { return p
->GetExtensionEvents (this, extension_count_ptr
, extensions
); }
1671 jvmtiError
SetExtensionEventCallback (jint extension_event_index
,
1672 jvmtiExtensionEvent callback
)
1674 return p
->SetExtensionEventCallback (this, extension_event_index
,
1678 jvmtiError
DisposeEnvironment (void)
1679 { return p
->DisposeEnvironment (this); }
1681 jvmtiError
GetErrorName (jvmtiError error
, char **name_ptr
)
1682 { return p
->GetErrorName (this, error
, name_ptr
); }
1684 jvmtiError
GetJLocationFormat (jvmtiJlocationFormat
*format_ptr
)
1685 { return p
->GetJLocationFormat (this, format_ptr
); }
1687 jvmtiError
GetSystemProperties (jint
*count_ptr
, char ***property_ptr
)
1688 { return p
->GetSystemProperties (this, count_ptr
, property_ptr
); }
1690 jvmtiError
GetSystemProperty (const char *property
, char **value_ptr
)
1691 { return p
->GetSystemProperty (this, property
, value_ptr
); }
1693 jvmtiError
SetSystemProperty (const char *property
, const char *value
)
1694 { return p
->SetSystemProperty (this, property
, value
); }
1696 jvmtiError
GetPhase (jvmtiPhase
*phase_ptr
)
1697 { return p
->GetPhase (this, phase_ptr
); }
1699 jvmtiError
GetCurrentThreadCpuTimerInfo (jvmtiTimerInfo
*info_ptr
)
1700 { return p
->GetCurrentThreadCpuTimerInfo (this, info_ptr
); }
1702 jvmtiError
GetCurrentThreadCpuTime (jlong
*nanos_ptr
)
1703 { return p
->GetCurrentThreadCpuTime (this, nanos_ptr
); }
1705 jvmtiError
GetThreadCpuTimerInfo (jvmtiTimerInfo
*info_ptr
)
1706 { return p
->GetThreadCpuTimerInfo (this, info_ptr
); }
1708 jvmtiError
GetThreadCpuTime (jthread thread
, jlong
*nanos_ptr
)
1709 { return p
->GetThreadCpuTime (this, thread
, nanos_ptr
); }
1711 jvmtiError
GetTimerInfo (jvmtiTimerInfo
*info_ptr
)
1712 { return p
->GetTimerInfo (this, info_ptr
); }
1714 jvmtiError
GetTime (jlong
*nanos_ptr
)
1715 {return p
->GetTime (this, nanos_ptr
); }
1717 jvmtiError
GetPotentialCapabilities (jvmtiCapabilities
*capabilities_ptr
)
1718 { return p
->GetPotentialCapabilities (this, capabilities_ptr
); }
1720 jvmtiError
AddCapabilities (const jvmtiCapabilities
*capabilities_ptr
)
1721 { return p
->AddCapabilities (this, capabilities_ptr
); }
1723 jvmtiError
RelinquishCapabilities (const jvmtiCapabilities
*capabilities_ptr
)
1724 { return p
->RelinquishCapabilities (this, capabilities_ptr
); }
1726 jvmtiError
GetAvailableProcessors (jint
*processor_count_ptr
)
1727 { return p
->GetAvailableProcessors (this, processor_count_ptr
); }
1729 jvmtiError
GetEnvironmentLocalStorage (void **data_ptr
)
1730 { return p
->GetEnvironmentLocalStorage (this, data_ptr
); }
1732 jvmtiError
SetEnvironmentLocalStorage (const void *data
)
1733 { return p
->SetEnvironmentLocalStorage (this, data
); }
1735 jvmtiError
AddToBootstrapClassLoaderSearch (const char *segment
)
1736 { return p
->AddToBootstrapClassLoaderSearch (this, segment
); }
1738 jvmtiError
SetVerboseFlag (jvmtiVerboseFlag flag
, jboolean value
)
1739 { return p
->SetVerboseFlag (this, flag
, value
); }
1741 jvmtiError
GetObjectSize (jobject object
, jlong
*size_ptr
)
1742 { return p
->GetObjectSize (this, object
, size_ptr
); }
1744 #endif /* __cplusplus */
1747 * Miscellaneous flags, constants, etc
1750 /* Class status flags */
1751 #define JVMTI_CLASS_STATUS_VERIFIED 1
1752 #define JVMTI_CLASS_STATUS_PREPARED 2
1753 #define JVMTI_CLASS_STATUS_INITIALIZED 4
1754 #define JVMTI_CLASS_STATUS_ERROR 8
1755 #define JVMTI_CLASS_STATUS_ARRAY 16
1756 #define JVMTI_CLASS_STATUS_PRIMITIVE 32
1758 /* Thread state flags */
1759 #define JVMTI_THREAD_STATE_ALIVE 0x0001
1760 #define JVMTI_THREAD_STATE_TERMINATED 0x0002
1761 #define JVMTI_THREAD_STATE_RUNNABLE 0x0004
1762 #define JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER 0x0400
1763 #define JVMTI_THREAD_STATE_WAITING 0x0080
1764 #define JVMTI_THREAD_STATE_WAITING_INDEFINITELY 0x0010
1765 #define JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT 0x0020
1766 #define JVMTI_THREAD_STATE_SLEEPING 0x0040
1767 #define JVMTI_THREAD_STATE_IN_OBJECT_WAIT 0x0100
1768 #define JVMTI_THREAD_STATE_PARKED 0x0200
1769 #define JVMTI_THREAD_STATE_SUSPENDED 0x100000
1770 #define JVMTI_THREAD_STATE_INTERRUPTED 0x200000
1771 #define JVMTI_THREAD_STATE_IN_NATIVE 0x400000
1772 #define JVMTI_THREAD_STATE_VENDOR_1 0x10000000
1773 #define JVMTI_THREAD_STATE_VENDOR_2 0x20000000
1774 #define JVMTI_THREAD_STATE_VENDOR_3 0x40000000
1776 /* java.lang.Thread.State conversion masks */
1777 #define JVMTI_JAVA_LANG_THREAD_STATE_MASK \
1778 (JVMTI_THREAD_STATE_TERMINATED \
1779 | JVMTI_THREAD_STATE_ALIVE \
1780 | JVMTI_THREAD_STATE_RUNNABLE \
1781 | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER \
1782 | JVMTI_THREAD_STATE_WAITING \
1783 | JVMTI_THREAD_STATE_WAITING_INDEFINITELY \
1784 | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT)
1785 #define JVMTI_JAVA_LANG_THREAD_STATE_NEW 0
1786 #define JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED JVMTI_THREAD_STATE_TERMINATED
1787 #define JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE \
1788 (JVMTI_THREAD_STATE_ALIVE \
1789 | JVMTI_THREAD_STATE_RUNNABLE)
1790 #define JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED \
1791 (JVMTI_THREAD_STATE_ALIVE \
1792 | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER)
1793 #define JVMTI_JAVA_LANG_THREAD_STATE_WAITING \
1794 (JVMTI_THREAD_STATE_ALIVE \
1795 | JVMTI_THREAD_STATE_WAITING \
1796 | JVMTI_THREAD_STATE_WAITING_INDEFINITELY)
1797 #define JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING \
1798 (JVMTI_THREAD_STATE_ALIVE \
1799 | JVMTI_THREAD_STATE_WAITING \
1800 | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT)
1802 /* Thread priorities */
1803 #define JVMTI_THREAD_MIN_PRIORITY 1
1804 #define JVMTI_THREAD_NORM_PRIORITY 5
1805 #define JVMTI_THREAD_MAX_PRIORITY 10
1807 /* Keep c-font-lock-extra-types in order: JNI followed by JVMTI,
1808 all in alphabetical order */
1809 /* Local Variables: */
1810 /* c-font-lock-extra-types: ("\\sw+_t"
1811 "JNIEnv" "JNINativeMethod" "JavaVM" "JavaVMOption" "jarray"
1812 "jboolean" "jbooleanArray" "jbyte" "jbyteArray" "jchar" "jcharArray"
1813 "jclass" "jdouble" "jdoubleArray" "jfieldID" "jfloat" "jfloatArray"
1814 "jint" "jintArray" "jlong" "jlongArray" "jmethodID" "jobject" "jstring" "jthrowable"
1816 "jvmtiEnv" "jvmtiError"
1817 "jthread" "jthreadGroup" "jlocation" "jrawMonitorID") */
1819 #endif /* !_CLASSPATH_JVMTI_H */