[1c9540]: include / jvmti.h Maximize Restore History

Download this file

jvmti.h    594 lines (568 with data), 34.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
#include "jni.h"
/* Version definitions */
#define JVMTI_VERSION_INTERFACE_JNI 0x00000000
#define JVMTI_VERSION_INTERFACE_JVMTI 0x30000000
#define JVMTI_VERSION_MASK_INTERFACE_TYPE 0x70000000
#define JVMTI_VERSION_MASK_MAJOR 0x0FFF0000
#define JVMTI_VERSION_MASK_MINOR 0x0000FF00
#define JVMTI_VERSION_MASK_MICRO 0x000000FF
#define JVMTI_VERSION_SHIFT_MAJOR 16
#define JVMTI_VERSION_SHIFT_MINOR 8
#define JVMTI_VERSION_SHIFT_MICRO 0
#define _JVMTI_MAKE_VERSION(maj,min,mic) JVMTI_VERSION_INTERFACE_JVMTI + \
(maj << JVMTI_VERSION_SHIFT_MAJOR) + (min << JVMTI_VERSION_SHIFT_MINOR) + \
(mic << JVMTI_VERSION_SHIFT_MICRO)
#define JVMTI_VERSION_1_0 _JVMTI_MAKE_VERSION(1,0,0)
// Currently 1.2.1
#define JVMTI_VERSION _JVMTI_MAKE_VERSION(1,2,1)
struct JVMTIFunctions_;
typedef const struct JVMTIFunctions_ *jvmtiEnv;
typedef struct JNINativeInterface_ jniNativeInterface;
typedef jobject jthread;
typedef jobject jthreadGroup;
typedef jlong jlocation;
//struct _jrawMonitorID;
//typedef struct _jrawMonitorID *jrawMonitorID;
typedef int *jrawMonitorID;
typedef struct {
const void* start_address;
jlocation location;
} jvmtiAddrLocationMap;
/**
* Event-related constants
*/
typedef enum {
JVMTI_EVENT_VM_INIT = 50,
JVMTI_EVENT_VM_DEATH = 51,
JVMTI_EVENT_THREAD_START = 52,
JVMTI_EVENT_THREAD_END = 53,
JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
JVMTI_EVENT_CLASS_LOAD = 55,
JVMTI_EVENT_CLASS_PREPARE = 56,
JVMTI_EVENT_VM_START = 57,
JVMTI_EVENT_EXCEPTION = 58,
JVMTI_EVENT_EXCEPTION_CATCH = 59,
JVMTI_EVENT_SINGLE_STEP = 60,
JVMTI_EVENT_FRAME_POP = 61,
JVMTI_EVENT_BREAKPOINT = 62,
JVMTI_EVENT_FIELD_ACCESS = 63,
JVMTI_EVENT_FIELD_MODIFICATION = 64,
JVMTI_EVENT_METHOD_ENTRY = 65,
JVMTI_EVENT_METHOD_EXIT = 66,
JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
JVMTI_EVENT_MONITOR_WAIT = 73,
JVMTI_EVENT_MONITOR_WAITED = 74,
JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
JVMTI_EVENT_RESOURCE_EXHAUSTED = 80,
JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
JVMTI_EVENT_OBJECT_FREE = 83,
JVMTI_EVENT_VM_OBJECT_ALLOC = 84
} jvmtiEvent;
typedef enum {
JVMTI_ENABLE = 1,
JVMTI_DISABLE = 0
} jvmtiEventMode;
/**
* Event Callbacks
*/
typedef void *jvmtiEventReserved;
typedef void (JNICALL *jvmtiEventVMInit)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread);
typedef void (JNICALL *jvmtiEventVMDeath)(jvmtiEnv *jvmti_env, JNIEnv *jni_env);
typedef void (JNICALL *jvmtiEventThreadStart)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread);
typedef void (JNICALL *jvmtiEventThreadEnd)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread);
typedef void (JNICALL *jvmtiEventClassFileLoadHook)(jvmtiEnv *jvmti_env,
JNIEnv *jni_env,
jclass class_being_redefined,
jobject loader,
const char* name,
jobject protection_domain,
jint class_data_len,
const unsigned char* class_data,
jint* new_class_data_len,
unsigned char** new_class_data);
typedef void (JNICALL *jvmtiEventClassLoad)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jclass klass);
typedef void (JNICALL *jvmtiEventClassPrepare)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jclass klass);
typedef void (JNICALL *jvmtiEventVMStart)(jvmtiEnv *jvmti_env, JNIEnv *jni_env);
typedef void (JNICALL *jvmtiEventException)(jvmtiEnv *jvmti_env,
JNIEnv *jni_env,
jthread thread,
jmethodID method,
jlocation location,
jobject exception,
jmethodID catch_method,
jlocation catch_location);
typedef void (JNICALL *jvmtiEventExceptionCatch)(jvmtiEnv *jvmti_env,
JNIEnv *jni_env,
jthread thread,
jmethodID method,
jlocation location,
jobject exception);
typedef void (JNICALL *jvmtiEventSingleStep)(jvmtiEnv *jvmti_env,
JNIEnv *jni_env,
jthread thread,
jmethodID method,
jlocation location);
typedef void (JNICALL *jvmtiEventFramePop)(jvmtiEnv *jvmti_env,
JNIEnv *jni_env,
jthread thread,
jmethodID method,
jboolean was_popped_by_exception);
typedef void (JNICALL *jvmtiEventBreakpoint)(jvmtiEnv *jvmti_env,
JNIEnv *jni_env,
jthread thread,
jmethodID method,
jlocation location);
typedef void (JNICALL *jvmtiEventFieldAccess)(jvmtiEnv *jvmti_env,
JNIEnv* jni_env,
jthread thread,
jmethodID method,
jlocation location,
jclass field_klass,
jobject object,
jfieldID field);
typedef void (JNICALL *jvmtiEventFieldModification)(jvmtiEnv *jvmti_env,
JNIEnv* jni_env,
jthread thread,
jmethodID method,
jlocation location,
jclass field_klass,
jobject object,
jfieldID field,
char signature_type,
jvalue new_value);
typedef void (JNICALL *jvmtiEventMethodEntry)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jmethodID method);
typedef void (JNICALL *jvmtiEventMethodExit)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jmethodID method, jboolean was_popped_by_exception, jvalue return_value);
typedef void (JNICALL *jvmtiEventNativeMethodBind)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jmethodID method, void *address, void **new_address_ptr);
typedef void (JNICALL *jvmtiEventCompiledMethodLoad)(jvmtiEnv *jvmti_env,
jmethodID method,
jint code_size,
const void* code_addr,
jint map_length,
const jvmtiAddrLocationMap* map,
const void* compile_info);
typedef void (JNICALL *jvmtiEventCompiledMethodUnload)(jvmtiEnv *jvmti_env, jmethodID method, const void* code_addr);
typedef void (JNICALL *jvmtiEventDynamicCodeGenerated)(jvmtiEnv *jvmti_env, const char* name, const void* address, jint length);
typedef void (JNICALL *jvmtiEventDataDumpRequest)(jvmtiEnv *jvmti_env);
typedef void (JNICALL *jvmtiEventMonitorWait)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jobject object, jlong timeout);
typedef void (JNICALL *jvmtiEventMonitorWaited)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jobject object, jboolean timed_out);
typedef void (JNICALL *jvmtiEventMonitorContendedEnter)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jobject object);
typedef void (JNICALL *jvmtiEventMonitorContendedEntered)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jthread thread, jobject object);
typedef void (JNICALL *jvmtiEventResourceExhausted)(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jint flags, const void* reserved, const char* description);
typedef void (JNICALL *jvmtiEventGarbageCollectionStart)(jvmtiEnv *jvmti_env);
typedef void (JNICALL *jvmtiEventGarbageCollectionFinish)(jvmtiEnv *jvmti_env);
typedef void (JNICALL *jvmtiEventObjectFree)(jvmtiEnv *jvmti_env, jlong tag);
typedef void (JNICALL *jvmtiEventVMObjectAlloc)(jvmtiEnv *jvmti_env,
JNIEnv* jni_env,
jthread thread,
jobject object,
jclass object_klass,
jlong size);
typedef struct {
jvmtiEventVMInit VMInit;
jvmtiEventVMDeath VMDeath;
jvmtiEventThreadStart ThreadStart;
jvmtiEventThreadEnd ThreadEnd;
jvmtiEventClassFileLoadHook ClassFileLoadHook;
jvmtiEventClassLoad ClassLoad;
jvmtiEventClassPrepare ClassPrepare;
jvmtiEventVMStart VMStart;
jvmtiEventException Exception;
jvmtiEventExceptionCatch ExceptionCatch;
jvmtiEventSingleStep SingleStep;
jvmtiEventFramePop FramePop;
jvmtiEventBreakpoint Breakpoint;
jvmtiEventFieldAccess FieldAccess;
jvmtiEventFieldModification FieldModification;
jvmtiEventMethodEntry MethodEntry;
jvmtiEventMethodExit MethodExit;
jvmtiEventNativeMethodBind NativeMethodBind;
jvmtiEventCompiledMethodLoad CompiledMethodLoad;
jvmtiEventCompiledMethodUnload CompiledMethodUnload;
jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
jvmtiEventDataDumpRequest DataDumpRequest;
jvmtiEventReserved reserved72;
jvmtiEventMonitorWait MonitorWait;
jvmtiEventMonitorWaited MonitorWaited;
jvmtiEventMonitorContendedEnter MonitorContendedEnter;
jvmtiEventMonitorContendedEntered MonitorContendedEntered;
jvmtiEventReserved reserved77;
jvmtiEventReserved reserved78;
jvmtiEventReserved reserved79;
jvmtiEventResourceExhausted ResourceExhausted;
jvmtiEventGarbageCollectionStart GarbageCollectionStart;
jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
jvmtiEventObjectFree ObjectFree;
jvmtiEventVMObjectAlloc VMObjectAlloc;
} jvmtiEventCallbacks;
//typedef struct jvmtiAddrLocationMap_ jvmtiAddrLocationMap;
typedef struct {
unsigned int can_tag_objects : 1;
unsigned int can_generate_field_modification_events : 1;
unsigned int can_generate_field_access_events : 1;
unsigned int can_get_bytecodes : 1;
unsigned int can_get_synthetic_attribute : 1;
unsigned int can_get_owned_monitor_info : 1;
unsigned int can_get_current_contended_monitor : 1;
unsigned int can_get_monitor_info : 1;
unsigned int can_pop_frame : 1;
unsigned int can_redefine_classes : 1;
unsigned int can_signal_thread : 1;
unsigned int can_get_source_file_name : 1;
unsigned int can_get_line_numbers : 1;
unsigned int can_get_source_debug_extension : 1;
unsigned int can_access_local_variables : 1;
unsigned int can_maintain_original_method_order : 1;
unsigned int can_generate_single_step_events : 1;
unsigned int can_generate_exception_events : 1;
unsigned int can_generate_frame_pop_events : 1;
unsigned int can_generate_breakpoint_events : 1;
unsigned int can_suspend : 1;
unsigned int can_redefine_any_class : 1;
unsigned int can_get_current_thread_cpu_time : 1;
unsigned int can_get_thread_cpu_time : 1;
unsigned int can_generate_method_entry_events : 1;
unsigned int can_generate_method_exit_events : 1;
unsigned int can_generate_all_class_hook_events : 1;
unsigned int can_generate_compiled_method_load_events : 1;
unsigned int can_generate_monitor_events : 1;
unsigned int can_generate_vm_object_alloc_events : 1;
unsigned int can_generate_native_method_bind_events : 1;
unsigned int can_generate_garbage_collection_events : 1;
unsigned int can_generate_object_free_events : 1;
unsigned int can_force_early_return : 1;
unsigned int can_get_owned_monitor_stack_depth_info : 1;
unsigned int can_get_constant_pool : 1;
unsigned int can_set_native_method_prefix : 1;
unsigned int can_retransform_classes : 1;
unsigned int can_retransform_any_class : 1;
unsigned int can_generate_resource_exhaustion_heap_events : 1;
unsigned int can_generate_resource_exhaustion_threads_events : 1;
unsigned int : 7;
unsigned int : 16;
unsigned int : 16;
unsigned int : 16;
unsigned int : 16;
unsigned int : 16;
} jvmtiCapabilities;
typedef struct jvmtiClassDefinition_ jvmtiClassDefinition;
typedef struct jvmtiExtensionEventInfo_ jvmtiExtensionEventInfo;
typedef struct jvmtiExtensionFunctionInfo_ jvmtiExtensionFunctionInfo;
typedef struct jvmtiFrameInfo_ jvmtiFrameInfo;
typedef struct jvmtiHeapCallbacks_ jvmtiHeapCallbacks;
typedef struct jvmtiHeapReferenceInfo_ jvmtiHeapReferenceInfo;
typedef struct jvmtiHeapReferenceInfoArray_ jvmtiHeapReferenceInfoArray;
typedef struct jvmtiHeapReferenceInfoConstantPool_ jvmtiHeapReferenceInfoConstantPool;
typedef struct jvmtiHeapReferenceInfoField_ jvmtiHeapReferenceInfoField;
typedef struct jvmtiHeapReferenceInfoJniLocal_ jvmtiHeapReferenceInfoJniLocal;
typedef struct jvmtiHeapReferenceInfoReserved_ jvmtiHeapReferenceInfoReserved;
typedef struct jvmtiHeapReferenceInfoStackLocal_ jvmtiHeapReferenceInfoStackLocal;
typedef struct jvmtiLineNumberEntry_ jvmtiLineNumberEntry;
typedef struct jvmtiLocalVariableEntry_ jvmtiLocalVariableEntry;
typedef struct jvmtiMonitorStackDepthInfo_ jvmtiMonitorStackDepthInfo;
typedef struct jvmtiMonitorUsage_ jvmtiMonitorUsage;
typedef struct jvmtiParamInfo_ jvmtiParamInfo;
typedef struct jvmtiStackInfo_ jvmtiStackInfo;
typedef struct {
jthreadGroup parent;
char* name;
jint max_priority;
jboolean is_daemon;
} jvmtiThreadGroupInfo;
typedef struct {
char* name;
jint priority;
jboolean is_daemon;
jthreadGroup thread_group;
jobject context_class_loader;
} jvmtiThreadInfo;
typedef struct jvmtiTimerInfo_ jvmtiTimerInfo;
typedef void *jvmtiArrayPrimitiveValueCallback;
typedef void *jvmtiExtensionEvent;
typedef void *jvmtiExtensionFunction;
typedef void *jvmtiHeapIterationCallback;
typedef void *jvmtiHeapObjectCallback;
typedef void *jvmtiHeapReferenceCallback;
typedef void *jvmtiHeapRootCallback;
typedef void *jvmtiObjectReferenceCallback;
typedef void *jvmtiPrimitiveFieldCallback;
typedef void *jvmtiReservedCallback;
typedef void *jvmtiStackReferenceCallback;
typedef void *jvmtiStartFunction;
typedef void *jvmtiStringPrimitiveValueCallback;
typedef void *jvmtiHeapObjectFilter;
typedef void *jvmtiHeapReferenceKind;
typedef void *jvmtiHeapRootKind;
typedef void *jvmtiIterationControl;
typedef enum {
JVMTI_JLOCATION_JVMBCI = 1,
JVMTI_JLOCATION_MACHINEPC = 2,
JVMTI_JLOCATION_OTHER = 0
} jvmtiJlocationFormat;
typedef void *jvmtiObjectReferenceKind;
typedef void *jvmtiParamKind;
typedef void *jvmtiParamTypes;
typedef enum {
JVMTI_PHASE_ONLOAD = 1,
JVMTI_PHASE_PRIMORDIAL = 2,
JVMTI_PHASE_START = 6,
JVMTI_PHASE_LIVE = 4,
JVMTI_PHASE_DEAD = 8
} jvmtiPhase;
typedef void *jvmtiPrimitiveType;
typedef void *jvmtiTimerKind;
typedef enum {
JVMTI_VERBOSE_OTHER = 0,
JVMTI_VERBOSE_GC = 1,
JVMTI_VERBOSE_CLASS = 2,
JVMTI_VERBOSE_JNI = 4
} jvmtiVerboseFlag;
// Resource exhaustion
enum {
JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 1,
JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 2,
JVMTI_RESOURCE_EXHAUSTED_THREADS = 4
};
// Class status
enum {
JVMTI_CLASS_STATUS_VERIFIED = 1,
JVMTI_CLASS_STATUS_PREPARED = 2,
JVMTI_CLASS_STATUS_INITIALIZED = 4,
JVMTI_CLASS_STATUS_ERROR = 8,
JVMTI_CLASS_STATUS_ARRAY = 16,
JVMTI_CLASS_STATUS_PRIMITIVE = 32
};
enum {
JVMTI_THREAD_STATE_ALIVE = 0x0001,
JVMTI_THREAD_STATE_TERMINATED = 0x0002,
JVMTI_THREAD_STATE_RUNNABLE = 0x0004,
JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400,
JVMTI_THREAD_STATE_WAITING = 0x0080,
JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010,
JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020,
JVMTI_THREAD_STATE_SLEEPING = 0x0040,
JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100,
JVMTI_THREAD_STATE_PARKED = 0x0200,
JVMTI_THREAD_STATE_SUSPENDED = 0x100000,
JVMTI_THREAD_STATE_INTERRUPTED = 0x200000,
JVMTI_THREAD_STATE_IN_NATIVE = 0x400000,
JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000,
JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000,
JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000
};
typedef enum {
// Universal errors
JVMTI_ERROR_NONE = 0,
JVMTI_ERROR_NULL_POINTER = 100,
JVMTI_ERROR_OUT_OF_MEMORY = 110,
JVMTI_ERROR_ACCESS_DENIED = 111,
JVMTI_ERROR_UNATTACHED_THREAD = 115,
JVMTI_ERROR_INVALID_ENVIRONMENT = 116,
JVMTI_ERROR_WRONG_PHASE = 112,
JVMTI_ERROR_INTERNAL = 113,
// Function specific required errors
JVMTI_ERROR_INVALID_PRIORITY = 12,
JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13,
JVMTI_ERROR_THREAD_SUSPENDED = 14,
JVMTI_ERROR_THREAD_NOT_ALIVE = 15,
JVMTI_ERROR_CLASS_NOT_PREPARED = 22,
JVMTI_ERROR_NO_MORE_FRAMES = 31,
JVMTI_ERROR_OPAQUE_FRAME = 32,
JVMTI_ERROR_DUPLICATE = 40,
JVMTI_ERROR_NOT_FOUND = 41,
JVMTI_ERROR_NOT_MONITOR_OWNER = 51,
JVMTI_ERROR_INTERRUPT = 52,
JVMTI_ERROR_UNMODIFIABLE_CLASS = 79,
JVMTI_ERROR_NOT_AVAILABLE = 98,
JVMTI_ERROR_ABSENT_INFORMATION = 101,
JVMTI_ERROR_INVALID_EVENT_TYPE = 102,
JVMTI_ERROR_NATIVE_METHOD = 104,
JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106,
// Function specific agent errors
JVMTI_ERROR_INVALID_THREAD = 10,
JVMTI_ERROR_INVALID_FIELDID = 25,
JVMTI_ERROR_INVALID_METHODID = 23,
JVMTI_ERROR_INVALID_LOCATION = 24,
JVMTI_ERROR_INVALID_OBJECT = 20,
JVMTI_ERROR_INVALID_CLASS = 21,
JVMTI_ERROR_TYPE_MISMATCH = 34,
JVMTI_ERROR_INVALID_SLOT = 35,
JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
JVMTI_ERROR_INVALID_THREAD_GROUP = 11,
JVMTI_ERROR_INVALID_MONITOR = 50,
JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
JVMTI_ERROR_INVALID_TYPESTATE = 65,
JVMTI_ERROR_UNSUPPORTED_VERSION = 68,
JVMTI_ERROR_INVALID_CLASS_FORMAT = 60,
JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64,
JVMTI_ERROR_FAILS_VERIFICATION = 62,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67,
JVMTI_ERROR_NAMES_DONT_MATCH = 69,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71
} jvmtiError;
struct JVMTIFunctions_ {
void *reserved1;
jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, jvmtiEventMode mode, jvmtiEvent event_type, jthread event_thread, ...);
void *reserved3;
jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, jint* threads_count_ptr, jthread** threads_ptr);
jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, jthread thread, jobject exception);
jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, jthread thread, jvmtiThreadInfo* info_ptr);
jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, jthread thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr);
jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, jthread thread, jobject* monitor_ptr);
jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, jthread thread, jvmtiStartFunction proc, const void* arg, jint priority);
jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, jint* group_count_ptr, jthreadGroup** groups_ptr);
jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, jthreadGroup group, jvmtiThreadGroupInfo* info_ptr);
jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, jthreadGroup group, jint* thread_count_ptr, jthread** threads_ptr, jint* group_count_ptr, jthreadGroup** groups_ptr);
jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, jthread thread, jint* count_ptr);
jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, jthread thread, jint* thread_state_ptr);
jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env, jthread* thread_ptr);
jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, jthread thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr);
jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, jthread thread, jint depth);
jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jobject* value_ptr);
jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jint* value_ptr);
jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jlong* value_ptr);
jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jfloat* value_ptr);
jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jdouble* value_ptr);
jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jobject value);
jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jint value);
jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jlong value);
jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jfloat value);
jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, jthread thread, jint depth, jint slot, jdouble value);
jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, const char* name, jrawMonitorID* monitor_ptr);
jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, jrawMonitorID monitor);
jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, jrawMonitorID monitor);
jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, jrawMonitorID monitor);
jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, jrawMonitorID monitor, jlong millis);
jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, jrawMonitorID monitor);
jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, jrawMonitorID monitor);
jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, jmethodID method, jlocation location);
jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, jmethodID method, jlocation location);
void *reserved40;
jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, jclass klass, jfieldID field);
jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, jclass klass, jfieldID field);
jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, jclass klass, jfieldID field);
jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, jclass klass, jfieldID field);
jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env, jclass klass, jboolean* is_modifiable_class_ptr);
jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, jlong size, unsigned char** mem_ptr);
jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, unsigned char* mem);
jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, jclass klass, char** signature_ptr, char** generic_ptr);
jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, jclass klass, jint* status_ptr);
jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, jclass klass, char** source_name_ptr);
jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, jclass klass, jint* modifiers_ptr);
jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, jclass klass, jint* method_count_ptr, jmethodID** methods_ptr);
jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, jclass klass, jint* field_count_ptr, jfieldID** fields_ptr);
jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, jclass klass, jint* interface_count_ptr, jclass** interfaces_ptr);
jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, jclass klass, jboolean* is_interface_ptr);
jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, jclass klass, jboolean* is_array_class_ptr);
jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, jclass klass, jobject* classloader_ptr);
jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, jobject object, jint* hash_code_ptr);
jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, jobject object, jvmtiMonitorUsage* info_ptr);
jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, jclass klass, jfieldID field, char** name_ptr, char** signature_ptr, char** generic_ptr);
jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, jclass klass, jfieldID field, jclass* declaring_class_ptr);
jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, jclass klass, jfieldID field, jint* modifiers_ptr);
jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, jclass klass, jfieldID field, jboolean* is_synthetic_ptr);
jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, jmethodID method, char** name_ptr, char** signature_ptr, char** generic_ptr);
jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, jmethodID method, jclass* declaring_class_ptr);
jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, jmethodID method, jint* modifiers_ptr);
void *reserved67;
jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, jmethodID method, jint* max_ptr);
jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, jmethodID method, jint* size_ptr);
jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, jmethodID method, jint* entry_count_ptr, jvmtiLineNumberEntry** table_ptr);
jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, jmethodID method, jlocation* start_location_ptr, jlocation* end_location_ptr);
jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, jmethodID method, jint* entry_count_ptr, jvmtiLocalVariableEntry** table_ptr);
jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env, const char* prefix);
jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env, jint prefix_count, char** prefixes);
jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, jmethodID method, jint* bytecode_count_ptr, unsigned char** bytecodes_ptr);
jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, jmethodID method, jboolean* is_native_ptr);
jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, jmethodID method, jboolean* is_synthetic_ptr);
jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, jint* class_count_ptr, jclass** classes_ptr);
jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, jobject initiating_loader, jint* class_count_ptr, jclass** classes_ptr);
jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env, jthread thread, jobject value);
jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env, jthread thread, jint value);
jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env, jthread thread, jlong value);
jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env, jthread thread, jfloat value);
jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env, jthread thread, jdouble value);
jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env, jthread thread);
jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, jint class_count, const jvmtiClassDefinition* class_definitions);
jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, jint* version_ptr);
jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, jvmtiCapabilities* capabilities_ptr);
jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, jclass klass, char** source_debug_extension_ptr);
jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, jmethodID method, jboolean* is_obsolete_ptr);
jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, jint request_count, const jthread* request_list, jvmtiError* results);
jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, jint request_count, const jthread* request_list, jvmtiError* results);
void *reserved94;
void *reserved95;
void *reserved96;
void *reserved97;
void *reserved98;
void *reserved99;
jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, jint max_frame_count, jvmtiStackInfo** stack_info_ptr, jint* thread_count_ptr);
jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, jint thread_count, const jthread* thread_list, jint max_frame_count, jvmtiStackInfo** stack_info_ptr);
jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, jthread thread, void** data_ptr);
jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, jthread thread, const void* data);
jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, jthread thread, jint start_depth, jint max_frame_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr);
void *reserved105;
jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, jobject object, jlong* tag_ptr);
jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, jobject object, jlong tag);
jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env);
jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, jobject object, jvmtiObjectReferenceCallback object_reference_callback, const void* user_data);
jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, jvmtiHeapRootCallback heap_root_callback, jvmtiStackReferenceCallback stack_ref_callback, jvmtiObjectReferenceCallback object_ref_callback, const void* user_data);
jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void* user_data);
jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, jclass klass, jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void* user_data);
void *reserved113;
jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, jint tag_count, const jlong* tags, jint* count_ptr, jobject** object_result_ptr, jlong** tag_result_ptr);
jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env, jint heap_filter, jclass klass, jobject initial_object, const jvmtiHeapCallbacks* callbacks, const void* user_data);
jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env, jint heap_filter, jclass klass, const jvmtiHeapCallbacks* callbacks, const void* user_data);
void *reserved117;
void *reserved118;
void *reserved119;
jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, const jniNativeInterface* function_table);
jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, jniNativeInterface** function_table);
jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, const jvmtiEventCallbacks* callbacks, jint size_of_callbacks);
jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, jvmtiEvent event_type);
jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, jint* extension_count_ptr, jvmtiExtensionFunctionInfo** extensions);
jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, jint* extension_count_ptr, jvmtiExtensionEventInfo** extensions);
jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, jint extension_event_index, jvmtiExtensionEvent callback);
jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env);
jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, jvmtiError error, char** name_ptr);
jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, jvmtiJlocationFormat* format_ptr);
jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, jint* count_ptr, char*** property_ptr);
jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, const char* property, char** value_ptr);
jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, const char* property, const char* value_ptr);
jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, jvmtiPhase* phase_ptr);
jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, jvmtiTimerInfo* info_ptr);
jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, jlong* nanos_ptr);
jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, jvmtiTimerInfo* info_ptr);
jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, jthread thread, jlong* nanos_ptr);
jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, jvmtiTimerInfo* info_ptr);
jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, jlong* nanos_ptr);
jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, jvmtiCapabilities* capabilities_ptr);
void *reserved141;
jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, const jvmtiCapabilities* capabilities_ptr);
jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, const jvmtiCapabilities* capabilities_ptr);
jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, jint* processor_count_ptr);
jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env, jclass klass, jint* minor_version_ptr, jint* major_version_ptr);
jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env, jclass klass, jint* constant_pool_count_ptr, jint* constant_pool_byte_count_ptr, unsigned char** constant_pool_bytes_ptr);
jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, void** data_ptr);
jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, const void* data);
jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, const char* segment);
jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, jvmtiVerboseFlag flag, jboolean value);
jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env, const char* segment);
jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env, jint class_count, const jclass* classes);
jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env, jthread thread, jint* monitor_info_count_ptr, jvmtiMonitorStackDepthInfo** monitor_info_ptr);
jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, jobject object, jlong* size_ptr);
jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env, jthread thread, jint depth, jobject* value_ptr);
};