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