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