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