ea24ac0346400afb933f345f70bdd177b5df81b6
[cacao.git] / src / native / jvmti / jvmti.h
1 /* src/native/jvmti.c - implementation of the Java Virtual Machine Tool 
2                         Interface functions
3
4    Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
5    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
6    E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
7    J. Wenninger, Institut f. Computersprachen - TU Wien
8
9    This file is part of CACAO.
10
11    This program is free software; you can redistribute it and/or
12    modify it under the terms of the GNU General Public License as
13    published by the Free Software Foundation; either version 2, or (at
14    your option) any later version.
15
16    This program is distributed in the hope that it will be useful, but
17    WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19    General Public License for more details.
20
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24    02110-1301, USA.
25
26    Contact: cacao@cacaojvm.org
27
28    Author: Martin Platter
29
30    Changes:             
31
32    
33    $Id: jvmti.h 5019 2006-06-06 21:13:41Z motse $
34
35 */
36 #ifndef _JVMTI_H
37 #define _JVMTI_H
38
39 #include "native/jni.h"
40
41
42 #define JVMTI_VERSION_INTERFACE_JNI   0x00000000
43 #define JVMTI_VERSION_INTERFACE_JVMTI 0x30000000
44 #define JVMTI_VERSION_MASK_INTERFACE_TYPE 0x70000000
45 #define JVMTI_VERSION_1_0 0x30010000
46 #define JVMTI_VERSION     JVMTI_VERSION_1_0 
47
48
49 typedef jobject jthread;
50 typedef jobject jthreadGroup;
51 typedef jlong jlocation;
52 struct _jrawMonitorID;
53 typedef struct _jrawMonitorID *jrawMonitorID;
54 typedef struct jvmtiEnv_struct *jvmtiEnv;
55
56 typedef enum {
57     JVMTI_ERROR_NONE = 0, /* No error has occurred. This is the error code that is 
58                              returned on successful completion of the function. */
59     JVMTI_ERROR_NULL_POINTER = 100, /*  Pointer is unexpectedly NULL. */
60     JVMTI_ERROR_OUT_OF_MEMORY = 110, /*  The function attempted to allocate memory 
61                                          and no more memory was available for 
62                                          allocation. */
63     JVMTI_ERROR_ACCESS_DENIED = 111, /*  The desired functionality has not been 
64                                          enabled in this virtual machine. */
65     JVMTI_ERROR_UNATTACHED_THREAD = 115, /* The thread being used to call this 
66                                             function is not attached to the virtual 
67                                             machine. Calls must be made from attached threads. 
68                                             See AttachCurrentThread in the JNI invocation API. */
69     JVMTI_ERROR_INVALID_ENVIRONMENT = 116, /*  
70                                                The JVM TI environment provided is no longer connected or is not an environment. */
71     JVMTI_ERROR_WRONG_PHASE = 112, /*  
72                                        The desired functionality is not available in the current phase. Always returned if the virtual machine has completed running. */
73     JVMTI_ERROR_INTERNAL = 113, /*  
74                                     An unexpected internal error has occurred. */
75
76 /* ****** Function Specific Required Errors ********** */
77     JVMTI_ERROR_INVALID_PRIORITY = 12, /*  
78                                            Invalid priority. */
79     JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13, /*  
80                                                Thread was not suspended. */
81     JVMTI_ERROR_THREAD_SUSPENDED = 14, /*  
82                                            Thread already suspended. */
83     JVMTI_ERROR_THREAD_NOT_ALIVE = 15, /*  
84                                            This operation requires the thread to be alive--that is, it must be started and not yet have died. */
85     JVMTI_ERROR_CLASS_NOT_PREPARED = 22, /*  
86                                              The class has been loaded but not yet prepared. */
87     JVMTI_ERROR_NO_MORE_FRAMES = 31, /*  
88                                          There are no Java programming language or JNI stack frames at the specified depth. */
89     JVMTI_ERROR_OPAQUE_FRAME = 32, /*  
90                                        Information about the frame is not available = e.g. for native frames, */
91     JVMTI_ERROR_DUPLICATE = 40, /*  
92                                     Item already set. */
93     JVMTI_ERROR_NOT_FOUND = 41, /*  
94                                     Desired element = e.g. field or breakpoint, not found */
95     JVMTI_ERROR_NOT_MONITOR_OWNER = 51, /*  
96                                             This thread doesn't own the raw monitor. */
97     JVMTI_ERROR_INTERRUPT = 52, /*  
98                                     The call has been interrupted before completion. */
99     JVMTI_ERROR_UNMODIFIABLE_CLASS = 79, /*  
100                                              The class cannot be modified. */
101     JVMTI_ERROR_NOT_AVAILABLE = 98, /*  
102                                         The functionality is not available in this virtual machine. */
103     JVMTI_ERROR_ABSENT_INFORMATION = 101, /*  
104                                               The requested information is not available. */
105     JVMTI_ERROR_INVALID_EVENT_TYPE = 102, /*  
106                                               The specified event type ID is not recognized. */
107     JVMTI_ERROR_NATIVE_METHOD = 104, /*  
108                                          The requested information is not available for native method. 
109                                          Function Specific Agent Errors
110                                          The following errors are returned by some JVM TI functions. They are returned in the event of invalid parameters passed by the agent or usage in an invalid context. An implementation is not required to detect these errors. */
111     JVMTI_ERROR_INVALID_THREAD = 10, /*  
112                                          The passed thread is not a valid thread.*/ 
113     JVMTI_ERROR_INVALID_FIELDID = 25, /*  
114                                           Invalid field. */
115     JVMTI_ERROR_INVALID_METHODID = 23, /*  
116                                            Invalid method. */
117     JVMTI_ERROR_INVALID_LOCATION = 24, /*  
118                                            Invalid location. */
119     JVMTI_ERROR_INVALID_OBJECT = 20, /*  
120                                          Invalid object. */
121     JVMTI_ERROR_INVALID_CLASS = 21, /*  
122                                         Invalid class. */
123     JVMTI_ERROR_TYPE_MISMATCH = 34, /*  
124                                         The variable is not an appropriate type for the function used. */
125     JVMTI_ERROR_INVALID_SLOT = 35, /*  
126                                        Invalid slot. */
127     JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99, /*  
128                                                   The capability being used is false in this environment. */
129     JVMTI_ERROR_INVALID_THREAD_GROUP = 11, /*  
130                                                Thread group invalid. */
131     JVMTI_ERROR_INVALID_MONITOR = 50, /*  
132                                           Invalid raw monitor. */
133     JVMTI_ERROR_ILLEGAL_ARGUMENT = 103, /*  
134                                             Illegal argument. */
135     JVMTI_ERROR_INVALID_TYPESTATE = 65, /*  
136                                             The state of the thread has been modified, and is now inconsistent. */
137     JVMTI_ERROR_UNSUPPORTED_VERSION = 68, /*  
138                                               A new class file has a version number not supported by this VM. */
139     JVMTI_ERROR_INVALID_CLASS_FORMAT = 60, /*  
140                                                A new class file is malformed = the VM would return a ClassFormatError, */
141     JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61, /*  
142                                                     The new class file definitions would lead to a circular definition = the VM would return a ClassCircularityError, */ 
143     JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63, /*  
144                                                                 A new class file would require adding a method. */
145     JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64, /*  
146                                                                   A new class version changes a field. */
147     JVMTI_ERROR_FAILS_VERIFICATION = 62, /*  
148                                              The class bytes fail verification. */
149     JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66, /*  
150                                                                      A direct superclass is different for the new class version, or the set of directly implemented interfaces is different. */
151     JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67, /*  
152                                                                   A new class version does not declare a method declared in the old class version. */
153     JVMTI_ERROR_NAMES_DONT_MATCH = 69, /*  
154                                            The class name defined in the new class file is different from the name in the old class object. */
155     JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70, /*  
156                                                                            A new class version has different modifiers. */
157     JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71 /*  
158                                                                            A method in the new class version has different modifiers than its counterpart in the old class version.*/
159
160 } jvmtiError;
161
162
163 typedef enum {
164     JVMTI_PHASE_ONLOAD = 1,
165     JVMTI_PHASE_PRIMORDIAL = 2,
166     JVMTI_PHASE_START = 6,
167     JVMTI_PHASE_LIVE = 4,
168     JVMTI_PHASE_DEAD = 8
169 } jvmtiPhase;
170
171
172 typedef enum {
173     JVMTI_JLOCATION_JVMBCI = 1,
174     JVMTI_JLOCATION_MACHINEPC = 2,
175     JVMTI_JLOCATION_OTHER = 0
176 } jvmtiJlocationFormat;
177
178 typedef struct {
179     jlocation start_location;
180     jint line_number;
181 } jvmtiLineNumberEntry;
182
183 typedef struct {
184     char* name;
185     jint priority;
186     jboolean is_daemon;
187     jthreadGroup thread_group;
188     jobject context_class_loader;
189 } jvmtiThreadInfo;
190
191 typedef enum {
192     JVMTI_VERBOSE_OTHER = 0,
193     JVMTI_VERBOSE_GC = 1,
194     JVMTI_VERBOSE_CLASS = 2,
195     JVMTI_VERBOSE_JNI = 4
196 } jvmtiVerboseFlag;
197
198 typedef struct {
199     jclass klass;
200     jint class_byte_count;
201     const unsigned char* class_bytes;
202 } jvmtiClassDefinition;
203
204 typedef struct JNINativeInterface jniNativeInterface;
205
206 typedef struct {
207     const void* start_address;
208     jlocation location;
209 } jvmtiAddrLocationMap;
210
211
212 typedef void (JNICALL *jvmtiEventSingleStep) 
213     (jvmtiEnv *jvmti_env,
214      JNIEnv* jni_env,
215      jthread thread,
216      jmethodID method,
217      jlocation location);
218
219 typedef void (JNICALL *jvmtiEventBreakpoint)
220     (jvmtiEnv *jvmti_env,
221      JNIEnv* jni_env,
222      jthread thread,
223      jmethodID method,
224      jlocation location);
225
226 typedef void (JNICALL *jvmtiEventFieldAccess)
227     (jvmtiEnv *jvmti_env,
228      JNIEnv* jni_env,
229      jthread thread,
230      jmethodID method,
231      jlocation location,
232      jclass field_klass,
233      jobject object,
234      jfieldID field);
235
236 typedef void (JNICALL *jvmtiEventFieldModification)
237     (jvmtiEnv *jvmti_env,
238      JNIEnv* jni_env,
239      jthread thread,
240      jmethodID method,
241      jlocation location,
242      jclass field_klass,
243      jobject object,
244      jfieldID field,
245      char signature_type,
246      jvalue new_value);
247
248 typedef void (JNICALL *jvmtiEventFramePop)
249     (jvmtiEnv *jvmti_env,
250      JNIEnv* jni_env,
251      jthread thread,
252      jmethodID method,
253      jboolean was_popped_by_exception);
254
255 typedef void (JNICALL *jvmtiEventMethodEntry)
256     (jvmtiEnv *jvmti_env,
257      JNIEnv* jni_env,
258      jthread thread,
259      jmethodID method);
260
261 typedef void (JNICALL *jvmtiEventMethodExit)
262     (jvmtiEnv *jvmti_env,
263      JNIEnv* jni_env,
264      jthread thread,
265      jmethodID method,
266      jboolean was_popped_by_exception,
267      jvalue return_value);
268
269 typedef void (JNICALL *jvmtiEventNativeMethodBind)
270     (jvmtiEnv *jvmti_env,
271      JNIEnv* jni_env,
272      jthread thread,
273      jmethodID method,
274      void* address,
275      void** new_address_ptr);
276
277 typedef void (JNICALL *jvmtiEventException)
278     (jvmtiEnv *jvmti_env,
279      JNIEnv* jni_env,
280      jthread thread,
281      jmethodID method,
282      jlocation location,
283      jobject exception,
284      jmethodID catch_method,
285      jlocation catch_location);
286
287 typedef void (JNICALL *jvmtiEventExceptionCatch)
288     (jvmtiEnv *jvmti_env,
289      JNIEnv* jni_env,
290      jthread thread,
291      jmethodID method,
292      jlocation location,
293      jobject exception);
294
295 typedef void (JNICALL *jvmtiEventThreadStart)
296     (jvmtiEnv *jvmti_env,
297      JNIEnv* jni_env,
298      jthread thread);
299
300 typedef void (JNICALL *jvmtiEventThreadEnd)
301     (jvmtiEnv *jvmti_env,
302      JNIEnv* jni_env,
303      jthread thread);
304
305 typedef void (JNICALL *jvmtiEventClassLoad)
306     (jvmtiEnv *jvmti_env,
307      JNIEnv* jni_env,
308      jthread thread,
309      jclass klass);
310
311 typedef void (JNICALL *jvmtiEventClassPrepare)
312     (jvmtiEnv *jvmti_env,
313      JNIEnv* jni_env,
314      jthread thread,
315      jclass klass);
316
317 typedef void (JNICALL *jvmtiEventClassFileLoadHook)
318     (jvmtiEnv *jvmti_env,
319      JNIEnv* jni_env,
320      jclass class_being_redefined,
321      jobject loader,
322      const char* name,
323      jobject protection_domain,
324      jint class_data_len,
325      const unsigned char* class_data,
326      jint* new_class_data_len,
327      unsigned char** new_class_data);
328
329 typedef void (JNICALL *jvmtiEventVMStart)
330     (jvmtiEnv *jvmti_env,
331      JNIEnv* jni_env);
332
333 typedef void (JNICALL *jvmtiEventVMInit)
334     (jvmtiEnv *jvmti_env, 
335      JNIEnv* jni_env,
336      jthread thread);
337
338 typedef void (JNICALL *jvmtiEventVMDeath)
339     (jvmtiEnv *jvmti_env,
340      JNIEnv* jni_env);
341
342
343 typedef void (JNICALL *jvmtiEventCompiledMethodLoad)
344     (jvmtiEnv *jvmti_env,
345      jmethodID method,
346      jint code_size,
347      const void* code_addr,
348      jint map_length,
349      const jvmtiAddrLocationMap* map,
350      const void* compile_info);
351
352 typedef void (JNICALL *jvmtiEventCompiledMethodUnload)
353     (jvmtiEnv *jvmti_env,
354      jmethodID method,
355      const void* code_addr);
356
357 typedef void (JNICALL *jvmtiEventDynamicCodeGenerated)
358     (jvmtiEnv *jvmti_env,
359      const char* name,
360      const void* address,
361      jint length);
362
363 typedef void (JNICALL *jvmtiEventDataDumpRequest)
364     (jvmtiEnv *jvmti_env);
365
366 typedef void (JNICALL *jvmtiEventMonitorContendedEnter)
367     (jvmtiEnv *jvmti_env,
368      JNIEnv* jni_env,
369      jthread thread,
370      jobject object);
371
372 typedef void (JNICALL *jvmtiEventMonitorContendedEntered)
373     (jvmtiEnv *jvmti_env,
374      JNIEnv* jni_env,
375      jthread thread,
376      jobject object);
377
378 typedef void (JNICALL *jvmtiEventMonitorWait)
379     (jvmtiEnv *jvmti_env,
380      JNIEnv* jni_env,
381      jthread thread,
382      jobject object,
383      jlong timeout);
384
385 typedef void (JNICALL *jvmtiEventMonitorWaited)
386     (jvmtiEnv *jvmti_env,
387      JNIEnv* jni_env,
388      jthread thread,
389      jobject object,
390      jboolean timed_out);
391
392 typedef void (JNICALL *jvmtiEventVMObjectAlloc)
393     (jvmtiEnv *jvmti_env,
394      JNIEnv* jni_env,
395      jthread thread,
396      jobject object,
397      jclass object_klass,
398      jlong size);
399
400 typedef void (JNICALL *jvmtiEventObjectFree)
401     (jvmtiEnv *jvmti_env,
402      jlong tag);
403
404 typedef void (JNICALL *jvmtiEventGarbageCollectionStart)
405     (jvmtiEnv *jvmti_env);
406
407 typedef void (JNICALL *jvmtiEventGarbageCollectionFinish)
408     (jvmtiEnv *jvmti_env);
409
410 typedef void (JNICALL *jvmtiStartFunction)
411     (jvmtiEnv* jvmti_env, 
412      JNIEnv* jni_env, 
413      void* arg);
414
415 typedef struct {
416     jthreadGroup parent;
417     char* name;
418     jint max_priority;
419     jboolean is_daemon;
420 } jvmtiThreadGroupInfo;
421
422 typedef struct {
423     jthread owner;
424     jint entry_count;
425     jint waiter_count;
426     jthread* waiters;
427     jint notify_waiter_count;
428     jthread* notify_waiters;
429 } jvmtiMonitorUsage;
430
431 typedef struct {
432     jlocation start_location;
433     jint length;
434     char* name;
435     char* signature;
436     char* generic_signature;
437     jint slot;
438 } jvmtiLocalVariableEntry;
439
440 typedef struct {
441     jmethodID method;
442     jlocation location;
443 } jvmtiFrameInfo;
444
445 typedef struct {
446     jthread thread;
447     jint state;
448     jvmtiFrameInfo* frame_buffer;
449     jint frame_count;
450 } jvmtiStackInfo;
451
452 typedef enum {
453     JVMTI_HEAP_OBJECT_TAGGED = 1,
454     JVMTI_HEAP_OBJECT_UNTAGGED = 2,
455     JVMTI_HEAP_OBJECT_EITHER = 3
456 } jvmtiHeapObjectFilter;
457
458 typedef enum {
459     JVMTI_REFERENCE_CLASS = 1,
460     JVMTI_REFERENCE_FIELD = 2,
461     JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
462     JVMTI_REFERENCE_CLASS_LOADER = 4,
463     JVMTI_REFERENCE_SIGNERS = 5,
464     JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
465     JVMTI_REFERENCE_INTERFACE = 7,
466     JVMTI_REFERENCE_STATIC_FIELD = 8,
467     JVMTI_REFERENCE_CONSTANT_POOL = 9
468 } jvmtiObjectReferenceKind;
469
470 typedef enum {
471     JVMTI_ITERATION_CONTINUE = 1,
472     JVMTI_ITERATION_IGNORE = 2,
473     JVMTI_ITERATION_ABORT = 0
474 } jvmtiIterationControl;
475
476 typedef enum {
477     JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
478     JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
479     JVMTI_HEAP_ROOT_MONITOR = 3,
480     JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
481     JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
482     JVMTI_HEAP_ROOT_THREAD = 6,
483     JVMTI_HEAP_ROOT_OTHER = 7
484 } jvmtiHeapRootKind;
485
486 typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
487     (jvmtiObjectReferenceKind reference_kind, 
488      jlong class_tag, 
489      jlong size, 
490      jlong* tag_ptr, 
491      jlong referrer_tag, 
492      jint referrer_index, 
493      void* user_data);
494
495 typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
496     (jvmtiHeapRootKind root_kind, 
497      jlong class_tag, 
498      jlong size, 
499      jlong* tag_ptr, 
500      void* user_data);
501
502 typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
503     (jvmtiHeapRootKind root_kind, 
504      jlong class_tag, 
505      jlong size, 
506      jlong* tag_ptr, 
507      jlong thread_tag, 
508      jint depth, 
509      jmethodID method, 
510      jint slot, 
511      void* user_data);
512
513 typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
514     (jlong class_tag, 
515      jlong size, 
516      jlong* tag_ptr, 
517      void* user_data);
518
519 typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
520     (jvmtiEnv* jvmti_env, 
521       ...);
522
523 typedef enum {
524     JVMTI_KIND_IN = 91,
525     JVMTI_KIND_IN_PTR = 92,
526     JVMTI_KIND_IN_BUF = 93,
527     JVMTI_KIND_ALLOC_BUF = 94,
528     JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
529     JVMTI_KIND_OUT = 96,
530     JVMTI_KIND_OUT_BUF = 97
531 } jvmtiParamKind;
532
533 typedef enum {
534     JVMTI_TYPE_JBYTE = 101,
535     JVMTI_TYPE_JCHAR = 102,
536     JVMTI_TYPE_JSHORT = 103,
537     JVMTI_TYPE_JINT = 104,
538     JVMTI_TYPE_JLONG = 105,
539     JVMTI_TYPE_JFLOAT = 106,
540     JVMTI_TYPE_JDOUBLE = 107,
541     JVMTI_TYPE_JBOOLEAN = 108,
542     JVMTI_TYPE_JOBJECT = 109,
543     JVMTI_TYPE_JTHREAD = 110,
544     JVMTI_TYPE_JCLASS = 111,
545     JVMTI_TYPE_JVALUE = 112,
546     JVMTI_TYPE_JFIELDID = 113,
547     JVMTI_TYPE_JMETHODID = 114,
548     JVMTI_TYPE_CCHAR = 115,   
549     JVMTI_TYPE_CVOID = 116,
550     JVMTI_TYPE_JNIENV = 117
551 } jvmtiParamTypes;
552
553 typedef struct {
554     char* name;
555     jvmtiParamKind kind;
556     jvmtiParamTypes base_type;
557     jboolean null_ok;
558 } jvmtiParamInfo;
559
560 typedef struct {
561     jint extension_event_index;
562     char* id;
563     char* short_description;
564     jint param_count;
565     jvmtiParamInfo* params;
566 } jvmtiExtensionEventInfo;
567
568 typedef void (JNICALL *jvmtiExtensionEvent)
569     (jvmtiEnv* jvmti_env, 
570       ...);
571
572 typedef enum {
573     JVMTI_TIMER_USER_CPU = 30,
574     JVMTI_TIMER_TOTAL_CPU = 31,
575     JVMTI_TIMER_ELAPSED = 32
576 } jvmtiTimerKind;
577
578 typedef struct {
579     jlong max_value;
580     jboolean may_skip_forward;
581     jboolean may_skip_backward;
582     jvmtiTimerKind kind;
583     jlong reserved1;
584     jlong reserved2;
585 } jvmtiTimerInfo;
586
587 typedef struct {
588     jvmtiExtensionFunction func;
589     char* id;
590     char* short_description;
591     jint param_count;
592     jvmtiParamInfo* params;
593     jint error_count;
594     jvmtiError* errors;
595 } jvmtiExtensionFunctionInfo;
596
597 typedef void* jvmtiEventReserved;
598
599 typedef struct {
600     jvmtiEventVMInit VMInit;
601     jvmtiEventVMDeath VMDeath;
602     jvmtiEventThreadStart ThreadStart;
603     jvmtiEventThreadEnd ThreadEnd;
604     jvmtiEventClassFileLoadHook ClassFileLoadHook;
605     jvmtiEventClassLoad ClassLoad;
606     jvmtiEventClassPrepare ClassPrepare;
607     jvmtiEventVMStart VMStart;
608     jvmtiEventException Exception;
609     jvmtiEventExceptionCatch ExceptionCatch;
610     jvmtiEventSingleStep SingleStep;
611     jvmtiEventFramePop FramePop;
612     jvmtiEventBreakpoint Breakpoint;
613     jvmtiEventFieldAccess FieldAccess;
614     jvmtiEventFieldModification FieldModification;
615     jvmtiEventMethodEntry MethodEntry;
616     jvmtiEventMethodExit MethodExit;
617     jvmtiEventNativeMethodBind NativeMethodBind;
618     jvmtiEventCompiledMethodLoad CompiledMethodLoad;
619     jvmtiEventCompiledMethodUnload CompiledMethodUnload;
620     jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
621     jvmtiEventDataDumpRequest DataDumpRequest;
622     jvmtiEventReserved reserved72;
623     jvmtiEventMonitorWait MonitorWait;
624     jvmtiEventMonitorWaited MonitorWaited;
625     jvmtiEventMonitorContendedEnter MonitorContendedEnter;
626     jvmtiEventMonitorContendedEntered MonitorContendedEntered;
627     jvmtiEventReserved reserved77;
628     jvmtiEventReserved reserved78;
629     jvmtiEventReserved reserved79;
630     jvmtiEventReserved reserved80;
631     jvmtiEventGarbageCollectionStart GarbageCollectionStart;
632     jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
633     jvmtiEventObjectFree ObjectFree;
634     jvmtiEventVMObjectAlloc VMObjectAlloc;
635 } jvmtiEventCallbacks;
636
637 typedef enum {
638     JVMTI_ENABLE = 1,
639     JVMTI_DISABLE = 0
640 } jvmtiEventMode;
641
642 typedef enum {
643     JVMTI_EVENT_START_ENUM = 50,
644     JVMTI_EVENT_VM_INIT = 50,
645     JVMTI_EVENT_VM_DEATH = 51,
646     JVMTI_EVENT_THREAD_START = 52,
647     JVMTI_EVENT_THREAD_END = 53,
648     JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
649     JVMTI_EVENT_CLASS_LOAD = 55,
650     JVMTI_EVENT_CLASS_PREPARE = 56,
651     JVMTI_EVENT_VM_START = 57,
652     JVMTI_EVENT_EXCEPTION = 58,
653     JVMTI_EVENT_EXCEPTION_CATCH = 59,
654     JVMTI_EVENT_SINGLE_STEP = 60,
655     JVMTI_EVENT_FRAME_POP = 61,
656     JVMTI_EVENT_BREAKPOINT = 62,
657     JVMTI_EVENT_FIELD_ACCESS = 63,
658     JVMTI_EVENT_FIELD_MODIFICATION = 64,
659     JVMTI_EVENT_METHOD_ENTRY = 65,
660     JVMTI_EVENT_METHOD_EXIT = 66,
661     JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
662     JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
663     JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
664     JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
665     JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
666     JVMTI_EVENT_MONITOR_WAIT = 73,
667     JVMTI_EVENT_MONITOR_WAITED = 74,
668     JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
669     JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
670     JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
671     JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
672     JVMTI_EVENT_OBJECT_FREE = 83,
673     JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
674     JVMTI_EVENT_END_ENUM = 84
675 } jvmtiEvent;
676
677
678 typedef struct {
679     unsigned int can_tag_objects : 1;
680     unsigned int can_generate_field_modification_events : 1;
681     unsigned int can_generate_field_access_events : 1;
682     unsigned int can_get_bytecodes : 1;
683     unsigned int can_get_synthetic_attribute : 1;
684     unsigned int can_get_owned_monitor_info : 1;
685     unsigned int can_get_current_contended_monitor : 1;
686     unsigned int can_get_monitor_info : 1;
687     unsigned int can_pop_frame : 1;
688     unsigned int can_redefine_classes : 1;
689     unsigned int can_signal_thread : 1;
690     unsigned int can_get_source_file_name : 1;
691     unsigned int can_get_line_numbers : 1;
692     unsigned int can_get_source_debug_extension : 1;
693     unsigned int can_access_local_variables : 1;
694     unsigned int can_maintain_original_method_order : 1;
695     unsigned int can_generate_single_step_events : 1;
696     unsigned int can_generate_exception_events : 1;
697     unsigned int can_generate_frame_pop_events : 1;
698     unsigned int can_generate_breakpoint_events : 1;
699     unsigned int can_suspend : 1;
700     unsigned int can_redefine_any_class : 1;
701     unsigned int can_get_current_thread_cpu_time : 1;
702     unsigned int can_get_thread_cpu_time : 1;
703     unsigned int can_generate_method_entry_events : 1;
704     unsigned int can_generate_method_exit_events : 1;
705     unsigned int can_generate_all_class_hook_events : 1;
706     unsigned int can_generate_compiled_method_load_events : 1;
707     unsigned int can_generate_monitor_events : 1;
708     unsigned int can_generate_vm_object_alloc_events : 1;
709     unsigned int can_generate_native_method_bind_events : 1;
710     unsigned int can_generate_garbage_collection_events : 1;
711     unsigned int can_generate_object_free_events : 1;
712     unsigned int : 15;
713     unsigned int : 16;
714     unsigned int : 16;
715     unsigned int : 16;
716     unsigned int : 16;
717     unsigned int : 16;
718 } jvmtiCapabilities;
719
720
721
722
723
724 /* Function Interface */
725 struct jvmtiEnv_struct {    
726     void *reserved1;
727     jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, 
728                                                     jvmtiEventMode mode, 
729                                                     jvmtiEvent event_type, 
730                                                     jthread event_thread, 
731                                                     ...);
732     void *reserved3;
733     jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, 
734                                          jint* threads_count_ptr, 
735                                          jthread** threads_ptr);
736     jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, 
737                                          jthread thread);
738     jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, 
739                                         jthread thread);
740     jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, 
741                                       jthread thread, 
742                                       jobject exception);
743     jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, 
744                                            jthread thread);
745     jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, 
746                                          jthread thread, 
747                                          jvmtiThreadInfo* info_ptr);
748     jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, 
749                                                jthread thread, 
750                                                jint* owned_monitor_count_ptr, 
751                                                jobject** owned_monitors_ptr);
752     jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, 
753                                                       jthread thread, 
754                                                       jobject* monitor_ptr);
755     jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, 
756                                           jthread thread, 
757                                           jvmtiStartFunction proc, 
758                                           const void* arg, 
759                                           jint priority);
760     jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, 
761                                               jint* group_count_ptr, 
762                                               jthreadGroup** groups_ptr);
763     jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, 
764                                               jthreadGroup group, 
765                                               jvmtiThreadGroupInfo* info_ptr);
766     jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, 
767                                                   jthreadGroup group, 
768                                                   jint* thread_count_ptr, 
769                                                   jthread** threads_ptr, 
770                                                   jint* group_count_ptr, 
771                                                   jthreadGroup** groups_ptr);
772     jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, 
773                                          jthread thread, 
774                                          jint* count_ptr);
775     jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, 
776                                           jthread thread, 
777                                           jint* thread_state_ptr);
778     void *reserved18;
779     jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, 
780                                             jthread thread, 
781                                             jint depth, 
782                                             jmethodID* method_ptr, 
783                                             jlocation* location_ptr);
784     jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, 
785                                           jthread thread, 
786                                           jint depth);
787     jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, 
788                                           jthread thread, 
789                                           jint depth, 
790                                           jint slot, 
791                                           jobject* value_ptr);
792     jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, 
793                                        jthread thread, 
794                                        jint depth, 
795                                        jint slot, 
796                                        jint* value_ptr);
797     jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, 
798                                         jthread thread, 
799                                         jint depth, 
800                                         jint slot, 
801                                         jlong* value_ptr);
802     jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, 
803                                          jthread thread, 
804                                          jint depth, 
805                                          jint slot, 
806                                          jfloat* value_ptr);
807     jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, 
808                                           jthread thread, 
809                                           jint depth, 
810                                           jint slot, 
811                                           jdouble* value_ptr);
812     jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, 
813                                           jthread thread, 
814                                           jint depth, 
815                                           jint slot, 
816                                           jobject value);
817     jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, 
818                                        jthread thread, 
819                                        jint depth, 
820                                        jint slot, 
821                                        jint value);
822     jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, 
823                                         jthread thread, 
824                                         jint depth, 
825                                         jint slot, 
826                                         jlong value);
827     jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, 
828                                          jthread thread, 
829                                          jint depth, 
830                                          jint slot, 
831                                          jfloat value);
832     jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, 
833                                           jthread thread, 
834                                           jint depth, 
835                                           jint slot, 
836                                           jdouble value);
837     jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, 
838                                             const char* name, 
839                                             jrawMonitorID* monitor_ptr);
840     jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, 
841                                              jrawMonitorID monitor);
842     jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, 
843                                            jrawMonitorID monitor);
844     jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, 
845                                           jrawMonitorID monitor);
846     jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, 
847                                           jrawMonitorID monitor, 
848                                           jlong millis);
849     jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, 
850                                             jrawMonitorID monitor);
851     jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, 
852                                                jrawMonitorID monitor);
853     jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, 
854                                          jmethodID method, 
855                                          jlocation location);
856     jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, 
857                                            jmethodID method, 
858                                            jlocation location);
859     void *reserved40;
860     jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, 
861                                                jclass klass, 
862                                                jfieldID field);
863     jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, 
864                                                  jclass klass, 
865                                                  jfieldID field);
866     jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, 
867                                                      jclass klass, 
868                                                      jfieldID field);
869     jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, 
870                                                        jclass klass, 
871                                                        jfieldID field);
872     void *reserved45;
873     jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, 
874                                     jlong size, 
875                                     unsigned char** mem_ptr);
876     jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, 
877                                       unsigned char* mem);
878     jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, 
879                                              jclass klass, 
880                                              char** signature_ptr, 
881                                              char** generic_ptr);
882     jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, 
883                                           jclass klass, 
884                                           jint* status_ptr);
885     jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, 
886                                              jclass klass, 
887                                              char** source_name_ptr);
888     jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, 
889                                              jclass klass, 
890                                              jint* modifiers_ptr);
891     jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, 
892                                            jclass klass, 
893                                            jint* method_count_ptr, 
894                                            jmethodID** methods_ptr);
895     jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, 
896                                           jclass klass, 
897                                           jint* field_count_ptr, 
898                                           jfieldID** fields_ptr);
899     jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, 
900                                                     jclass klass, 
901                                                     jint* interface_count_ptr, 
902                                                     jclass** interfaces_ptr);
903     jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, 
904                                        jclass klass, 
905                                        jboolean* is_interface_ptr);
906     jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, 
907                                         jclass klass, 
908                                         jboolean* is_array_class_ptr);
909     jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, 
910                                           jclass klass, 
911                                           jobject* classloader_ptr);
912     jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, 
913                                              jobject object, 
914                                              jint* hash_code_ptr);
915     jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, 
916                                                  jobject object, 
917                                                  jvmtiMonitorUsage* info_ptr);
918     jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, 
919                                         jclass klass, 
920                                         jfieldID field, 
921                                         char** name_ptr, 
922                                         char** signature_ptr, 
923                                         char** generic_ptr);
924     jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, 
925                                                   jclass klass, 
926                                                   jfieldID field, 
927                                                   jclass* declaring_class_ptr);
928     jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, 
929                                              jclass klass, 
930                                              jfieldID field, 
931                                              jint* modifiers_ptr);
932     jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, 
933                                             jclass klass, 
934                                             jfieldID field, 
935                                             jboolean* is_synthetic_ptr);
936     jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, 
937                                          jmethodID method, 
938                                          char** name_ptr, 
939                                          char** signature_ptr, 
940                                          char** generic_ptr);
941     jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, 
942                                                    jmethodID method, 
943                                                    jclass* declaring_class_ptr);
944     jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, 
945                                               jmethodID method, 
946                                               jint* modifiers_ptr);
947     void *reserved67;
948     jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, 
949                                         jmethodID method, 
950                                         jint* max_ptr);
951     jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, 
952                                             jmethodID method, 
953                                             jint* size_ptr);
954     jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, 
955                                               jmethodID method, 
956                                               jint* entry_count_ptr, 
957                                               jvmtiLineNumberEntry** table_ptr);
958     jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, 
959                                              jmethodID method, 
960                                              jlocation* start_location_ptr, 
961                                              jlocation* end_location_ptr);
962     jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, 
963                                                  jmethodID method, 
964                                                  jint* entry_count_ptr, 
965                                                  jvmtiLocalVariableEntry** table_ptr);
966     void *reserved73;
967     void *reserved74;
968     jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, 
969                                         jmethodID method, 
970                                         jint* bytecode_count_ptr, 
971                                         unsigned char** bytecodes_ptr);
972     jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, 
973                                           jmethodID method, 
974                                           jboolean* is_native_ptr);
975     jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, 
976                                              jmethodID method, 
977                                              jboolean* is_synthetic_ptr);
978     jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, 
979                                             jint* class_count_ptr, 
980                                             jclass** classes_ptr);
981     jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, 
982                                                  jobject initiating_loader, 
983                                                  jint* class_count_ptr, 
984                                                  jclass** classes_ptr);
985     jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, 
986                                     jthread thread);
987     void *reserved81;
988     void *reserved82;
989     void *reserved83;
990     void *reserved84;
991     void *reserved85;
992     void *reserved86;
993     jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, 
994                                            jint class_count, 
995                                            const jvmtiClassDefinition* class_definitions);
996     jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, 
997                                             jint* version_ptr);
998     jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, 
999                                            jvmtiCapabilities* capabilities_ptr);
1000     jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, 
1001                                                    jclass klass, 
1002                                                    char** source_debug_extension_ptr);
1003     jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, 
1004                                             jmethodID method, 
1005                                             jboolean* is_obsolete_ptr);
1006     jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, 
1007                                              jint request_count, 
1008                                              const jthread* request_list, 
1009                                              jvmtiError* results);
1010     jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, 
1011                                             jint request_count, 
1012                                             const jthread* request_list, 
1013                                             jvmtiError* results);
1014     void *reserved94;
1015     void *reserved95;
1016     void *reserved96;
1017     void *reserved97;
1018     void *reserved98;
1019     void *reserved99;
1020     jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, 
1021                                              jint max_frame_count, 
1022                                              jvmtiStackInfo** stack_info_ptr, 
1023                                              jint* thread_count_ptr);
1024     jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, 
1025                                                     jint thread_count, 
1026                                                     const jthread* thread_list, 
1027                                                     jint max_frame_count, 
1028                                                     jvmtiStackInfo** stack_info_ptr);
1029     jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, 
1030                                                  jthread thread, 
1031                                                  void** data_ptr);
1032     jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, 
1033                                                  jthread thread, 
1034                                                  const void* data);
1035     jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, 
1036                                          jthread thread, 
1037                                          jint start_depth, 
1038                                          jint max_frame_count, 
1039                                          jvmtiFrameInfo* frame_buffer, 
1040                                          jint* count_ptr);
1041     void *reserved105;
1042     jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, 
1043                                   jobject object, 
1044                                   jlong* tag_ptr);
1045     jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, 
1046                                   jobject object, 
1047                                   jlong tag);
1048     jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
1049     jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, 
1050                                                                  jobject object, 
1051                                                                  jvmtiObjectReferenceCallback object_reference_callback, 
1052                                                                  void* user_data);
1053     jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, 
1054                                                        jvmtiHeapRootCallback heap_root_callback, 
1055                                                        jvmtiStackReferenceCallback stack_ref_callback, 
1056                                                        jvmtiObjectReferenceCallback object_ref_callback, 
1057                                                        void* user_data);
1058     jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, 
1059                                            jvmtiHeapObjectFilter object_filter, 
1060                                            jvmtiHeapObjectCallback heap_object_callback, 
1061                                            void* user_data);
1062     jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, 
1063                                                        jclass klass, 
1064                                                        jvmtiHeapObjectFilter object_filter, 
1065                                                        jvmtiHeapObjectCallback heap_object_callback, 
1066                                                        void* user_data);
1067     void *reserved113;
1068     jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, 
1069                                               jint tag_count, 
1070                                               const jlong* tags, 
1071                                               jint* count_ptr, 
1072                                               jobject** object_result_ptr, 
1073                                               jlong** tag_result_ptr);
1074     void *reserved115;
1075     void *reserved116;
1076     void *reserved117;
1077     void *reserved118;
1078     void *reserved119;
1079     jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, 
1080                                                const jniNativeInterface* function_table);
1081     jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, 
1082                                                jniNativeInterface** function_table);
1083     jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, 
1084                                              const jvmtiEventCallbacks* callbacks, 
1085                                              jint size_of_callbacks);
1086     jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, 
1087                                           jvmtiEvent event_type);
1088     jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, 
1089                                                  jint* extension_count_ptr, 
1090                                                  jvmtiExtensionFunctionInfo** extensions);
1091     jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, 
1092                                               jint* extension_count_ptr, 
1093                                               jvmtiExtensionEventInfo** extensions);
1094     jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, 
1095                                                      jint extension_event_index, 
1096                                                      jvmtiExtensionEvent callback);
1097     jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
1098     jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, 
1099                                         jvmtiError error, 
1100                                         char** name_ptr);
1101     jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, 
1102                                               jvmtiJlocationFormat* format_ptr);
1103     jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, 
1104                                                jint* count_ptr, 
1105                                                char*** property_ptr);
1106     jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, 
1107                                              const char* property, 
1108                                              char** value_ptr);
1109     jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, 
1110                                              const char* property, 
1111                                              const char* value);
1112     jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, 
1113                                     jvmtiPhase* phase_ptr);
1114     jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, 
1115                                                         jvmtiTimerInfo* info_ptr);
1116     jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, 
1117                                                    jlong* nanos_ptr);
1118     jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, 
1119                                                  jvmtiTimerInfo* info_ptr);
1120     jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, 
1121                                             jthread thread, 
1122                                             jlong* nanos_ptr);
1123     jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, 
1124                                         jvmtiTimerInfo* info_ptr);
1125     jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, 
1126                                    jlong* nanos_ptr);
1127     jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, 
1128                                                     jvmtiCapabilities* capabilities_ptr);
1129     void *reserved141;
1130     jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, 
1131                                            const jvmtiCapabilities* capabilities_ptr);
1132     jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, 
1133                                                   const jvmtiCapabilities* capabilities_ptr);
1134     jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, 
1135                                                   jint* processor_count_ptr);
1136     void *reserved145;
1137     void *reserved146;
1138     jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, 
1139                                                       void** data_ptr);
1140     jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, 
1141                                                       const void* data);
1142     jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, 
1143                                                            const char* segment);
1144     jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, 
1145                                           jvmtiVerboseFlag flag, 
1146                                           jboolean value);
1147     void *reserved151;
1148     void *reserved152;
1149     void *reserved153;
1150     jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, 
1151                                          jobject object, 
1152                                          jlong* size_ptr);
1153 }; 
1154
1155
1156 #define JVMTI_THREAD_STATE_ALIVE 0x0001
1157 #define JVMTI_THREAD_STATE_TERMINATED  0x0002   
1158 #define JVMTI_THREAD_STATE_RUNNABLE  0x0004   
1159 #define JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER  0x0400
1160 #define JVMTI_THREAD_STATE_WAITING  0x0080
1161 #define JVMTI_THREAD_STATE_WAITING_INDEFINITELY  0x0010
1162 #define JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT  0x0020
1163 #define JVMTI_THREAD_STATE_SLEEPING  0x0040
1164 #define JVMTI_THREAD_STATE_IN_OBJECT_WAIT  0x0100
1165 #define JVMTI_THREAD_STATE_PARKED  0x0200
1166 #define JVMTI_THREAD_STATE_SUSPENDED  0x100000
1167 #define JVMTI_THREAD_STATE_INTERRUPTED  0x200000
1168 #define JVMTI_THREAD_STATE_IN_NATIVE  0x400000
1169 #define JVMTI_THREAD_STATE_VENDOR_1  0x10000000
1170 #define JVMTI_THREAD_STATE_VENDOR_2  0x20000000
1171 #define JVMTI_THREAD_STATE_VENDOR_3  0x40000000
1172
1173 #define JVMTI_THREAD_MIN_PRIORITY  1   
1174 #define JVMTI_THREAD_NORM_PRIORITY  5
1175 #define JVMTI_THREAD_MAX_PRIORITY  10
1176
1177 #define JVMTI_CLASS_STATUS_VERIFIED  1   
1178 #define JVMTI_CLASS_STATUS_PREPARED  2   
1179 #define JVMTI_CLASS_STATUS_INITIALIZED  4
1180 #define JVMTI_CLASS_STATUS_ERROR  8   
1181 #define JVMTI_CLASS_STATUS_ARRAY  16  
1182 #define JVMTI_CLASS_STATUS_PRIMITIVE  32 
1183
1184 #endif
1185
1186
1187
1188
1189 /*
1190  * These are local overrides for various environment variables in Emacs.
1191  * Please do not remove this and leave it at the end of the file, where
1192  * Emacs will automagically detect them.
1193  * ---------------------------------------------------------------------
1194  * Local variables:
1195  * mode: c
1196  * indent-tabs-mode: t
1197  * c-basic-offset: 4
1198  * tab-width: 4
1199  * End:
1200  */