1 /* 2 * Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 /* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */ 27 28 /* Include file for the Java(tm) Virtual Machine Tool Interface */ 29 30 #ifndef _JAVA_JVMTI_H_ 31 #define _JAVA_JVMTI_H_ 32 33 #include "jni.h" 34 35 #ifdef __cplusplus 36 extern "C" { 37 #endif 38 39 enum { 40 JVMTI_VERSION_1 = 0x30010000, 41 JVMTI_VERSION_1_0 = 0x30010000, 42 JVMTI_VERSION_1_1 = 0x30010100, 43 JVMTI_VERSION_1_2 = 0x30010200, 44 JVMTI_VERSION_9 = 0x30090000, 45 JVMTI_VERSION_11 = 0x300B0000, 46 JVMTI_VERSION_19 = 0x30130000, 47 JVMTI_VERSION_21 = 0x30150000, 48 49 JVMTI_VERSION = 0x30000000 + (21 * 0x10000) + ( 0 * 0x100) + 0 /* version: 21.0.0 */ 50 }; 51 52 JNIEXPORT jint JNICALL 53 Agent_OnLoad(JavaVM *vm, char *options, void *reserved); 54 55 JNIEXPORT jint JNICALL 56 Agent_OnAttach(JavaVM* vm, char* options, void* reserved); 57 58 JNIEXPORT void JNICALL 59 Agent_OnUnload(JavaVM *vm); 60 61 /* Forward declaration of the environment */ 62 63 struct _jvmtiEnv; 64 65 struct jvmtiInterface_1_; 66 67 #ifdef __cplusplus 68 typedef _jvmtiEnv jvmtiEnv; 69 #else 70 typedef const struct jvmtiInterface_1_ *jvmtiEnv; 71 #endif /* __cplusplus */ 72 73 /* Derived Base Types */ 74 75 typedef jobject jthread; 76 typedef jobject jthreadGroup; 77 typedef jlong jlocation; 78 struct _jrawMonitorID; 79 typedef struct _jrawMonitorID *jrawMonitorID; 80 typedef struct JNINativeInterface_ jniNativeInterface; 81 82 /* Constants */ 83 84 85 /* Thread State Flags */ 86 87 enum { 88 JVMTI_THREAD_STATE_ALIVE = 0x0001, 89 JVMTI_THREAD_STATE_TERMINATED = 0x0002, 90 JVMTI_THREAD_STATE_RUNNABLE = 0x0004, 91 JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400, 92 JVMTI_THREAD_STATE_WAITING = 0x0080, 93 JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010, 94 JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020, 95 JVMTI_THREAD_STATE_SLEEPING = 0x0040, 96 JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100, 97 JVMTI_THREAD_STATE_PARKED = 0x0200, 98 JVMTI_THREAD_STATE_SUSPENDED = 0x100000, 99 JVMTI_THREAD_STATE_INTERRUPTED = 0x200000, 100 JVMTI_THREAD_STATE_IN_NATIVE = 0x400000, 101 JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000, 102 JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000, 103 JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000 104 }; 105 106 /* java.lang.Thread.State Conversion Masks */ 107 108 enum { 109 JVMTI_JAVA_LANG_THREAD_STATE_MASK = JVMTI_THREAD_STATE_TERMINATED | JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT, 110 JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0, 111 JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED, 112 JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE, 113 JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER, 114 JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY, 115 JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT 116 }; 117 118 /* Thread Priority Constants */ 119 120 enum { 121 JVMTI_THREAD_MIN_PRIORITY = 1, 122 JVMTI_THREAD_NORM_PRIORITY = 5, 123 JVMTI_THREAD_MAX_PRIORITY = 10 124 }; 125 126 /* Heap Filter Flags */ 127 128 enum { 129 JVMTI_HEAP_FILTER_TAGGED = 0x4, 130 JVMTI_HEAP_FILTER_UNTAGGED = 0x8, 131 JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10, 132 JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20 133 }; 134 135 /* Heap Visit Control Flags */ 136 137 enum { 138 JVMTI_VISIT_OBJECTS = 0x100, 139 JVMTI_VISIT_ABORT = 0x8000 140 }; 141 142 /* Heap Reference Enumeration */ 143 144 typedef enum { 145 JVMTI_HEAP_REFERENCE_CLASS = 1, 146 JVMTI_HEAP_REFERENCE_FIELD = 2, 147 JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3, 148 JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4, 149 JVMTI_HEAP_REFERENCE_SIGNERS = 5, 150 JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6, 151 JVMTI_HEAP_REFERENCE_INTERFACE = 7, 152 JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8, 153 JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9, 154 JVMTI_HEAP_REFERENCE_SUPERCLASS = 10, 155 JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21, 156 JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22, 157 JVMTI_HEAP_REFERENCE_MONITOR = 23, 158 JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24, 159 JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25, 160 JVMTI_HEAP_REFERENCE_THREAD = 26, 161 JVMTI_HEAP_REFERENCE_OTHER = 27 162 } jvmtiHeapReferenceKind; 163 164 /* Primitive Type Enumeration */ 165 166 typedef enum { 167 JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90, 168 JVMTI_PRIMITIVE_TYPE_BYTE = 66, 169 JVMTI_PRIMITIVE_TYPE_CHAR = 67, 170 JVMTI_PRIMITIVE_TYPE_SHORT = 83, 171 JVMTI_PRIMITIVE_TYPE_INT = 73, 172 JVMTI_PRIMITIVE_TYPE_LONG = 74, 173 JVMTI_PRIMITIVE_TYPE_FLOAT = 70, 174 JVMTI_PRIMITIVE_TYPE_DOUBLE = 68 175 } jvmtiPrimitiveType; 176 177 /* Heap Object Filter Enumeration */ 178 179 typedef enum { 180 JVMTI_HEAP_OBJECT_TAGGED = 1, 181 JVMTI_HEAP_OBJECT_UNTAGGED = 2, 182 JVMTI_HEAP_OBJECT_EITHER = 3 183 } jvmtiHeapObjectFilter; 184 185 /* Heap Root Kind Enumeration */ 186 187 typedef enum { 188 JVMTI_HEAP_ROOT_JNI_GLOBAL = 1, 189 JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2, 190 JVMTI_HEAP_ROOT_MONITOR = 3, 191 JVMTI_HEAP_ROOT_STACK_LOCAL = 4, 192 JVMTI_HEAP_ROOT_JNI_LOCAL = 5, 193 JVMTI_HEAP_ROOT_THREAD = 6, 194 JVMTI_HEAP_ROOT_OTHER = 7 195 } jvmtiHeapRootKind; 196 197 /* Object Reference Enumeration */ 198 199 typedef enum { 200 JVMTI_REFERENCE_CLASS = 1, 201 JVMTI_REFERENCE_FIELD = 2, 202 JVMTI_REFERENCE_ARRAY_ELEMENT = 3, 203 JVMTI_REFERENCE_CLASS_LOADER = 4, 204 JVMTI_REFERENCE_SIGNERS = 5, 205 JVMTI_REFERENCE_PROTECTION_DOMAIN = 6, 206 JVMTI_REFERENCE_INTERFACE = 7, 207 JVMTI_REFERENCE_STATIC_FIELD = 8, 208 JVMTI_REFERENCE_CONSTANT_POOL = 9 209 } jvmtiObjectReferenceKind; 210 211 /* Iteration Control Enumeration */ 212 213 typedef enum { 214 JVMTI_ITERATION_CONTINUE = 1, 215 JVMTI_ITERATION_IGNORE = 2, 216 JVMTI_ITERATION_ABORT = 0 217 } jvmtiIterationControl; 218 219 /* Class Status Flags */ 220 221 enum { 222 JVMTI_CLASS_STATUS_VERIFIED = 1, 223 JVMTI_CLASS_STATUS_PREPARED = 2, 224 JVMTI_CLASS_STATUS_INITIALIZED = 4, 225 JVMTI_CLASS_STATUS_ERROR = 8, 226 JVMTI_CLASS_STATUS_ARRAY = 16, 227 JVMTI_CLASS_STATUS_PRIMITIVE = 32 228 }; 229 230 /* Event Enable/Disable */ 231 232 typedef enum { 233 JVMTI_ENABLE = 1, 234 JVMTI_DISABLE = 0 235 } jvmtiEventMode; 236 237 /* Extension Function/Event Parameter Types */ 238 239 typedef enum { 240 JVMTI_TYPE_JBYTE = 101, 241 JVMTI_TYPE_JCHAR = 102, 242 JVMTI_TYPE_JSHORT = 103, 243 JVMTI_TYPE_JINT = 104, 244 JVMTI_TYPE_JLONG = 105, 245 JVMTI_TYPE_JFLOAT = 106, 246 JVMTI_TYPE_JDOUBLE = 107, 247 JVMTI_TYPE_JBOOLEAN = 108, 248 JVMTI_TYPE_JOBJECT = 109, 249 JVMTI_TYPE_JTHREAD = 110, 250 JVMTI_TYPE_JCLASS = 111, 251 JVMTI_TYPE_JVALUE = 112, 252 JVMTI_TYPE_JFIELDID = 113, 253 JVMTI_TYPE_JMETHODID = 114, 254 JVMTI_TYPE_CCHAR = 115, 255 JVMTI_TYPE_CVOID = 116, 256 JVMTI_TYPE_JNIENV = 117 257 } jvmtiParamTypes; 258 259 /* Extension Function/Event Parameter Kinds */ 260 261 typedef enum { 262 JVMTI_KIND_IN = 91, 263 JVMTI_KIND_IN_PTR = 92, 264 JVMTI_KIND_IN_BUF = 93, 265 JVMTI_KIND_ALLOC_BUF = 94, 266 JVMTI_KIND_ALLOC_ALLOC_BUF = 95, 267 JVMTI_KIND_OUT = 96, 268 JVMTI_KIND_OUT_BUF = 97 269 } jvmtiParamKind; 270 271 /* Timer Kinds */ 272 273 typedef enum { 274 JVMTI_TIMER_USER_CPU = 30, 275 JVMTI_TIMER_TOTAL_CPU = 31, 276 JVMTI_TIMER_ELAPSED = 32 277 } jvmtiTimerKind; 278 279 /* Phases of execution */ 280 281 typedef enum { 282 JVMTI_PHASE_ONLOAD = 1, 283 JVMTI_PHASE_PRIMORDIAL = 2, 284 JVMTI_PHASE_START = 6, 285 JVMTI_PHASE_LIVE = 4, 286 JVMTI_PHASE_DEAD = 8 287 } jvmtiPhase; 288 289 /* Version Interface Types */ 290 291 enum { 292 JVMTI_VERSION_INTERFACE_JNI = 0x00000000, 293 JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000 294 }; 295 296 /* Version Masks */ 297 298 enum { 299 JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000, 300 JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000, 301 JVMTI_VERSION_MASK_MINOR = 0x0000FF00, 302 JVMTI_VERSION_MASK_MICRO = 0x000000FF 303 }; 304 305 /* Version Shifts */ 306 307 enum { 308 JVMTI_VERSION_SHIFT_MAJOR = 16, 309 JVMTI_VERSION_SHIFT_MINOR = 8, 310 JVMTI_VERSION_SHIFT_MICRO = 0 311 }; 312 313 /* Verbose Flag Enumeration */ 314 315 typedef enum { 316 JVMTI_VERBOSE_OTHER = 0, 317 JVMTI_VERBOSE_GC = 1, 318 JVMTI_VERBOSE_CLASS = 2, 319 JVMTI_VERBOSE_JNI = 4 320 } jvmtiVerboseFlag; 321 322 /* JLocation Format Enumeration */ 323 324 typedef enum { 325 JVMTI_JLOCATION_JVMBCI = 1, 326 JVMTI_JLOCATION_MACHINEPC = 2, 327 JVMTI_JLOCATION_OTHER = 0 328 } jvmtiJlocationFormat; 329 330 /* Resource Exhaustion Flags */ 331 332 enum { 333 JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001, 334 JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002, 335 JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004 336 }; 337 338 /* Errors */ 339 340 typedef enum { 341 JVMTI_ERROR_NONE = 0, 342 JVMTI_ERROR_INVALID_THREAD = 10, 343 JVMTI_ERROR_INVALID_THREAD_GROUP = 11, 344 JVMTI_ERROR_INVALID_PRIORITY = 12, 345 JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13, 346 JVMTI_ERROR_THREAD_SUSPENDED = 14, 347 JVMTI_ERROR_THREAD_NOT_ALIVE = 15, 348 JVMTI_ERROR_INVALID_OBJECT = 20, 349 JVMTI_ERROR_INVALID_CLASS = 21, 350 JVMTI_ERROR_CLASS_NOT_PREPARED = 22, 351 JVMTI_ERROR_INVALID_METHODID = 23, 352 JVMTI_ERROR_INVALID_LOCATION = 24, 353 JVMTI_ERROR_INVALID_FIELDID = 25, 354 JVMTI_ERROR_INVALID_MODULE = 26, 355 JVMTI_ERROR_NO_MORE_FRAMES = 31, 356 JVMTI_ERROR_OPAQUE_FRAME = 32, 357 JVMTI_ERROR_TYPE_MISMATCH = 34, 358 JVMTI_ERROR_INVALID_SLOT = 35, 359 JVMTI_ERROR_DUPLICATE = 40, 360 JVMTI_ERROR_NOT_FOUND = 41, 361 JVMTI_ERROR_INVALID_MONITOR = 50, 362 JVMTI_ERROR_NOT_MONITOR_OWNER = 51, 363 JVMTI_ERROR_INTERRUPT = 52, 364 JVMTI_ERROR_INVALID_CLASS_FORMAT = 60, 365 JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61, 366 JVMTI_ERROR_FAILS_VERIFICATION = 62, 367 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63, 368 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64, 369 JVMTI_ERROR_INVALID_TYPESTATE = 65, 370 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66, 371 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67, 372 JVMTI_ERROR_UNSUPPORTED_VERSION = 68, 373 JVMTI_ERROR_NAMES_DONT_MATCH = 69, 374 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70, 375 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71, 376 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED = 72, 377 JVMTI_ERROR_UNSUPPORTED_OPERATION = 73, 378 JVMTI_ERROR_UNMODIFIABLE_CLASS = 79, 379 JVMTI_ERROR_UNMODIFIABLE_MODULE = 80, 380 JVMTI_ERROR_NOT_AVAILABLE = 98, 381 JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99, 382 JVMTI_ERROR_NULL_POINTER = 100, 383 JVMTI_ERROR_ABSENT_INFORMATION = 101, 384 JVMTI_ERROR_INVALID_EVENT_TYPE = 102, 385 JVMTI_ERROR_ILLEGAL_ARGUMENT = 103, 386 JVMTI_ERROR_NATIVE_METHOD = 104, 387 JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106, 388 JVMTI_ERROR_OUT_OF_MEMORY = 110, 389 JVMTI_ERROR_ACCESS_DENIED = 111, 390 JVMTI_ERROR_WRONG_PHASE = 112, 391 JVMTI_ERROR_INTERNAL = 113, 392 JVMTI_ERROR_UNATTACHED_THREAD = 115, 393 JVMTI_ERROR_INVALID_ENVIRONMENT = 116, 394 JVMTI_ERROR_MAX = 116 395 } jvmtiError; 396 397 /* Event IDs */ 398 399 typedef enum { 400 JVMTI_MIN_EVENT_TYPE_VAL = 50, 401 JVMTI_EVENT_VM_INIT = 50, 402 JVMTI_EVENT_VM_DEATH = 51, 403 JVMTI_EVENT_THREAD_START = 52, 404 JVMTI_EVENT_THREAD_END = 53, 405 JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54, 406 JVMTI_EVENT_CLASS_LOAD = 55, 407 JVMTI_EVENT_CLASS_PREPARE = 56, 408 JVMTI_EVENT_VM_START = 57, 409 JVMTI_EVENT_EXCEPTION = 58, 410 JVMTI_EVENT_EXCEPTION_CATCH = 59, 411 JVMTI_EVENT_SINGLE_STEP = 60, 412 JVMTI_EVENT_FRAME_POP = 61, 413 JVMTI_EVENT_BREAKPOINT = 62, 414 JVMTI_EVENT_FIELD_ACCESS = 63, 415 JVMTI_EVENT_FIELD_MODIFICATION = 64, 416 JVMTI_EVENT_METHOD_ENTRY = 65, 417 JVMTI_EVENT_METHOD_EXIT = 66, 418 JVMTI_EVENT_NATIVE_METHOD_BIND = 67, 419 JVMTI_EVENT_COMPILED_METHOD_LOAD = 68, 420 JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69, 421 JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70, 422 JVMTI_EVENT_DATA_DUMP_REQUEST = 71, 423 JVMTI_EVENT_MONITOR_WAIT = 73, 424 JVMTI_EVENT_MONITOR_WAITED = 74, 425 JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75, 426 JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76, 427 JVMTI_EVENT_RESOURCE_EXHAUSTED = 80, 428 JVMTI_EVENT_GARBAGE_COLLECTION_START = 81, 429 JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82, 430 JVMTI_EVENT_OBJECT_FREE = 83, 431 JVMTI_EVENT_VM_OBJECT_ALLOC = 84, 432 JVMTI_EVENT_SAMPLED_OBJECT_ALLOC = 86, 433 JVMTI_EVENT_VIRTUAL_THREAD_START = 87, 434 JVMTI_EVENT_VIRTUAL_THREAD_END = 88, 435 JVMTI_MAX_EVENT_TYPE_VAL = 88 436 } jvmtiEvent; 437 438 439 /* Pre-Declarations */ 440 struct jvmtiThreadInfo; 441 typedef struct jvmtiThreadInfo jvmtiThreadInfo; 442 struct jvmtiMonitorStackDepthInfo; 443 typedef struct jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo; 444 struct jvmtiThreadGroupInfo; 445 typedef struct jvmtiThreadGroupInfo jvmtiThreadGroupInfo; 446 struct jvmtiFrameInfo; 447 typedef struct jvmtiFrameInfo jvmtiFrameInfo; 448 struct jvmtiStackInfo; 449 typedef struct jvmtiStackInfo jvmtiStackInfo; 450 struct jvmtiHeapReferenceInfoField; 451 typedef struct jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField; 452 struct jvmtiHeapReferenceInfoArray; 453 typedef struct jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray; 454 struct jvmtiHeapReferenceInfoConstantPool; 455 typedef struct jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool; 456 struct jvmtiHeapReferenceInfoStackLocal; 457 typedef struct jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal; 458 struct jvmtiHeapReferenceInfoJniLocal; 459 typedef struct jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal; 460 struct jvmtiHeapReferenceInfoReserved; 461 typedef struct jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved; 462 union jvmtiHeapReferenceInfo; 463 typedef union jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo; 464 struct jvmtiHeapCallbacks; 465 typedef struct jvmtiHeapCallbacks jvmtiHeapCallbacks; 466 struct jvmtiClassDefinition; 467 typedef struct jvmtiClassDefinition jvmtiClassDefinition; 468 struct jvmtiMonitorUsage; 469 typedef struct jvmtiMonitorUsage jvmtiMonitorUsage; 470 struct jvmtiLineNumberEntry; 471 typedef struct jvmtiLineNumberEntry jvmtiLineNumberEntry; 472 struct jvmtiLocalVariableEntry; 473 typedef struct jvmtiLocalVariableEntry jvmtiLocalVariableEntry; 474 struct jvmtiParamInfo; 475 typedef struct jvmtiParamInfo jvmtiParamInfo; 476 struct jvmtiExtensionFunctionInfo; 477 typedef struct jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo; 478 struct jvmtiExtensionEventInfo; 479 typedef struct jvmtiExtensionEventInfo jvmtiExtensionEventInfo; 480 struct jvmtiTimerInfo; 481 typedef struct jvmtiTimerInfo jvmtiTimerInfo; 482 struct jvmtiAddrLocationMap; 483 typedef struct jvmtiAddrLocationMap jvmtiAddrLocationMap; 484 485 /* Function Types */ 486 487 typedef void (JNICALL *jvmtiStartFunction) 488 (jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg); 489 490 typedef jint (JNICALL *jvmtiHeapIterationCallback) 491 (jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data); 492 493 typedef jint (JNICALL *jvmtiHeapReferenceCallback) 494 (jvmtiHeapReferenceKind reference_kind, const jvmtiHeapReferenceInfo* reference_info, jlong class_tag, jlong referrer_class_tag, jlong size, jlong* tag_ptr, jlong* referrer_tag_ptr, jint length, void* user_data); 495 496 typedef jint (JNICALL *jvmtiPrimitiveFieldCallback) 497 (jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data); 498 499 typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback) 500 (jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data); 501 502 typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback) 503 (jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data); 504 505 typedef jint (JNICALL *jvmtiReservedCallback) 506 (); 507 508 typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback) 509 (jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); 510 511 typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback) 512 (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, void* user_data); 513 514 typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback) 515 (jvmtiHeapRootKind root_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong thread_tag, jint depth, jmethodID method, jint slot, void* user_data); 516 517 typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback) 518 (jvmtiObjectReferenceKind reference_kind, jlong class_tag, jlong size, jlong* tag_ptr, jlong referrer_tag, jint referrer_index, void* user_data); 519 520 typedef jvmtiError (JNICALL *jvmtiExtensionFunction) 521 (jvmtiEnv* jvmti_env, ...); 522 523 typedef void (JNICALL *jvmtiExtensionEvent) 524 (jvmtiEnv* jvmti_env, ...); 525 526 527 /* Structure Types */ 528 struct jvmtiThreadInfo { 529 char* name; 530 jint priority; 531 jboolean is_daemon; 532 jthreadGroup thread_group; 533 jobject context_class_loader; 534 }; 535 struct jvmtiMonitorStackDepthInfo { 536 jobject monitor; 537 jint stack_depth; 538 }; 539 struct jvmtiThreadGroupInfo { 540 jthreadGroup parent; 541 char* name; 542 jint max_priority; 543 jboolean is_daemon; 544 }; 545 struct jvmtiFrameInfo { 546 jmethodID method; 547 jlocation location; 548 }; 549 struct jvmtiStackInfo { 550 jthread thread; 551 jint state; 552 jvmtiFrameInfo* frame_buffer; 553 jint frame_count; 554 }; 555 struct jvmtiHeapReferenceInfoField { 556 jint index; 557 }; 558 struct jvmtiHeapReferenceInfoArray { 559 jint index; 560 }; 561 struct jvmtiHeapReferenceInfoConstantPool { 562 jint index; 563 }; 564 struct jvmtiHeapReferenceInfoStackLocal { 565 jlong thread_tag; 566 jlong thread_id; 567 jint depth; 568 jmethodID method; 569 jlocation location; 570 jint slot; 571 }; 572 struct jvmtiHeapReferenceInfoJniLocal { 573 jlong thread_tag; 574 jlong thread_id; 575 jint depth; 576 jmethodID method; 577 }; 578 struct jvmtiHeapReferenceInfoReserved { 579 jlong reserved1; 580 jlong reserved2; 581 jlong reserved3; 582 jlong reserved4; 583 jlong reserved5; 584 jlong reserved6; 585 jlong reserved7; 586 jlong reserved8; 587 }; 588 union jvmtiHeapReferenceInfo { 589 jvmtiHeapReferenceInfoField field; 590 jvmtiHeapReferenceInfoArray array; 591 jvmtiHeapReferenceInfoConstantPool constant_pool; 592 jvmtiHeapReferenceInfoStackLocal stack_local; 593 jvmtiHeapReferenceInfoJniLocal jni_local; 594 jvmtiHeapReferenceInfoReserved other; 595 }; 596 struct jvmtiHeapCallbacks { 597 jvmtiHeapIterationCallback heap_iteration_callback; 598 jvmtiHeapReferenceCallback heap_reference_callback; 599 jvmtiPrimitiveFieldCallback primitive_field_callback; 600 jvmtiArrayPrimitiveValueCallback array_primitive_value_callback; 601 jvmtiStringPrimitiveValueCallback string_primitive_value_callback; 602 jvmtiReservedCallback reserved5; 603 jvmtiReservedCallback reserved6; 604 jvmtiReservedCallback reserved7; 605 jvmtiReservedCallback reserved8; 606 jvmtiReservedCallback reserved9; 607 jvmtiReservedCallback reserved10; 608 jvmtiReservedCallback reserved11; 609 jvmtiReservedCallback reserved12; 610 jvmtiReservedCallback reserved13; 611 jvmtiReservedCallback reserved14; 612 jvmtiReservedCallback reserved15; 613 }; 614 struct jvmtiClassDefinition { 615 jclass klass; 616 jint class_byte_count; 617 const unsigned char* class_bytes; 618 }; 619 struct jvmtiMonitorUsage { 620 jthread owner; 621 jint entry_count; 622 jint waiter_count; 623 jthread* waiters; 624 jint notify_waiter_count; 625 jthread* notify_waiters; 626 }; 627 struct jvmtiLineNumberEntry { 628 jlocation start_location; 629 jint line_number; 630 }; 631 struct jvmtiLocalVariableEntry { 632 jlocation start_location; 633 jint length; 634 char* name; 635 char* signature; 636 char* generic_signature; 637 jint slot; 638 }; 639 struct jvmtiParamInfo { 640 char* name; 641 jvmtiParamKind kind; 642 jvmtiParamTypes base_type; 643 jboolean null_ok; 644 }; 645 struct jvmtiExtensionFunctionInfo { 646 jvmtiExtensionFunction func; 647 char* id; 648 char* short_description; 649 jint param_count; 650 jvmtiParamInfo* params; 651 jint error_count; 652 jvmtiError* errors; 653 }; 654 struct jvmtiExtensionEventInfo { 655 jint extension_event_index; 656 char* id; 657 char* short_description; 658 jint param_count; 659 jvmtiParamInfo* params; 660 }; 661 struct jvmtiTimerInfo { 662 jlong max_value; 663 jboolean may_skip_forward; 664 jboolean may_skip_backward; 665 jvmtiTimerKind kind; 666 jlong reserved1; 667 jlong reserved2; 668 }; 669 struct jvmtiAddrLocationMap { 670 const void* start_address; 671 jlocation location; 672 }; 673 674 typedef struct { 675 unsigned int can_tag_objects : 1; 676 unsigned int can_generate_field_modification_events : 1; 677 unsigned int can_generate_field_access_events : 1; 678 unsigned int can_get_bytecodes : 1; 679 unsigned int can_get_synthetic_attribute : 1; 680 unsigned int can_get_owned_monitor_info : 1; 681 unsigned int can_get_current_contended_monitor : 1; 682 unsigned int can_get_monitor_info : 1; 683 unsigned int can_pop_frame : 1; 684 unsigned int can_redefine_classes : 1; 685 unsigned int can_signal_thread : 1; 686 unsigned int can_get_source_file_name : 1; 687 unsigned int can_get_line_numbers : 1; 688 unsigned int can_get_source_debug_extension : 1; 689 unsigned int can_access_local_variables : 1; 690 unsigned int can_maintain_original_method_order : 1; 691 unsigned int can_generate_single_step_events : 1; 692 unsigned int can_generate_exception_events : 1; 693 unsigned int can_generate_frame_pop_events : 1; 694 unsigned int can_generate_breakpoint_events : 1; 695 unsigned int can_suspend : 1; 696 unsigned int can_redefine_any_class : 1; 697 unsigned int can_get_current_thread_cpu_time : 1; 698 unsigned int can_get_thread_cpu_time : 1; 699 unsigned int can_generate_method_entry_events : 1; 700 unsigned int can_generate_method_exit_events : 1; 701 unsigned int can_generate_all_class_hook_events : 1; 702 unsigned int can_generate_compiled_method_load_events : 1; 703 unsigned int can_generate_monitor_events : 1; 704 unsigned int can_generate_vm_object_alloc_events : 1; 705 unsigned int can_generate_native_method_bind_events : 1; 706 unsigned int can_generate_garbage_collection_events : 1; 707 unsigned int can_generate_object_free_events : 1; 708 unsigned int can_force_early_return : 1; 709 unsigned int can_get_owned_monitor_stack_depth_info : 1; 710 unsigned int can_get_constant_pool : 1; 711 unsigned int can_set_native_method_prefix : 1; 712 unsigned int can_retransform_classes : 1; 713 unsigned int can_retransform_any_class : 1; 714 unsigned int can_generate_resource_exhaustion_heap_events : 1; 715 unsigned int can_generate_resource_exhaustion_threads_events : 1; 716 unsigned int can_generate_early_vmstart : 1; 717 unsigned int can_generate_early_class_hook_events : 1; 718 unsigned int can_generate_sampled_object_alloc_events : 1; 719 unsigned int can_support_virtual_threads : 1; 720 unsigned int : 3; 721 unsigned int : 16; 722 unsigned int : 16; 723 unsigned int : 16; 724 unsigned int : 16; 725 unsigned int : 16; 726 } jvmtiCapabilities; 727 728 729 /* Event Definitions */ 730 731 typedef void (JNICALL *jvmtiEventReserved)(void); 732 733 734 typedef void (JNICALL *jvmtiEventBreakpoint) 735 (jvmtiEnv *jvmti_env, 736 JNIEnv* jni_env, 737 jthread thread, 738 jmethodID method, 739 jlocation location); 740 741 typedef void (JNICALL *jvmtiEventClassFileLoadHook) 742 (jvmtiEnv *jvmti_env, 743 JNIEnv* jni_env, 744 jclass class_being_redefined, 745 jobject loader, 746 const char* name, 747 jobject protection_domain, 748 jint class_data_len, 749 const unsigned char* class_data, 750 jint* new_class_data_len, 751 unsigned char** new_class_data); 752 753 typedef void (JNICALL *jvmtiEventClassLoad) 754 (jvmtiEnv *jvmti_env, 755 JNIEnv* jni_env, 756 jthread thread, 757 jclass klass); 758 759 typedef void (JNICALL *jvmtiEventClassPrepare) 760 (jvmtiEnv *jvmti_env, 761 JNIEnv* jni_env, 762 jthread thread, 763 jclass klass); 764 765 typedef void (JNICALL *jvmtiEventCompiledMethodLoad) 766 (jvmtiEnv *jvmti_env, 767 jmethodID method, 768 jint code_size, 769 const void* code_addr, 770 jint map_length, 771 const jvmtiAddrLocationMap* map, 772 const void* compile_info); 773 774 typedef void (JNICALL *jvmtiEventCompiledMethodUnload) 775 (jvmtiEnv *jvmti_env, 776 jmethodID method, 777 const void* code_addr); 778 779 typedef void (JNICALL *jvmtiEventDataDumpRequest) 780 (jvmtiEnv *jvmti_env); 781 782 typedef void (JNICALL *jvmtiEventDynamicCodeGenerated) 783 (jvmtiEnv *jvmti_env, 784 const char* name, 785 const void* address, 786 jint length); 787 788 typedef void (JNICALL *jvmtiEventException) 789 (jvmtiEnv *jvmti_env, 790 JNIEnv* jni_env, 791 jthread thread, 792 jmethodID method, 793 jlocation location, 794 jobject exception, 795 jmethodID catch_method, 796 jlocation catch_location); 797 798 typedef void (JNICALL *jvmtiEventExceptionCatch) 799 (jvmtiEnv *jvmti_env, 800 JNIEnv* jni_env, 801 jthread thread, 802 jmethodID method, 803 jlocation location, 804 jobject exception); 805 806 typedef void (JNICALL *jvmtiEventFieldAccess) 807 (jvmtiEnv *jvmti_env, 808 JNIEnv* jni_env, 809 jthread thread, 810 jmethodID method, 811 jlocation location, 812 jclass field_klass, 813 jobject object, 814 jfieldID field); 815 816 typedef void (JNICALL *jvmtiEventFieldModification) 817 (jvmtiEnv *jvmti_env, 818 JNIEnv* jni_env, 819 jthread thread, 820 jmethodID method, 821 jlocation location, 822 jclass field_klass, 823 jobject object, 824 jfieldID field, 825 char signature_type, 826 jvalue new_value); 827 828 typedef void (JNICALL *jvmtiEventFramePop) 829 (jvmtiEnv *jvmti_env, 830 JNIEnv* jni_env, 831 jthread thread, 832 jmethodID method, 833 jboolean was_popped_by_exception); 834 835 typedef void (JNICALL *jvmtiEventGarbageCollectionFinish) 836 (jvmtiEnv *jvmti_env); 837 838 typedef void (JNICALL *jvmtiEventGarbageCollectionStart) 839 (jvmtiEnv *jvmti_env); 840 841 typedef void (JNICALL *jvmtiEventMethodEntry) 842 (jvmtiEnv *jvmti_env, 843 JNIEnv* jni_env, 844 jthread thread, 845 jmethodID method); 846 847 typedef void (JNICALL *jvmtiEventMethodExit) 848 (jvmtiEnv *jvmti_env, 849 JNIEnv* jni_env, 850 jthread thread, 851 jmethodID method, 852 jboolean was_popped_by_exception, 853 jvalue return_value); 854 855 typedef void (JNICALL *jvmtiEventMonitorContendedEnter) 856 (jvmtiEnv *jvmti_env, 857 JNIEnv* jni_env, 858 jthread thread, 859 jobject object); 860 861 typedef void (JNICALL *jvmtiEventMonitorContendedEntered) 862 (jvmtiEnv *jvmti_env, 863 JNIEnv* jni_env, 864 jthread thread, 865 jobject object); 866 867 typedef void (JNICALL *jvmtiEventMonitorWait) 868 (jvmtiEnv *jvmti_env, 869 JNIEnv* jni_env, 870 jthread thread, 871 jobject object, 872 jlong timeout); 873 874 typedef void (JNICALL *jvmtiEventMonitorWaited) 875 (jvmtiEnv *jvmti_env, 876 JNIEnv* jni_env, 877 jthread thread, 878 jobject object, 879 jboolean timed_out); 880 881 typedef void (JNICALL *jvmtiEventNativeMethodBind) 882 (jvmtiEnv *jvmti_env, 883 JNIEnv* jni_env, 884 jthread thread, 885 jmethodID method, 886 void* address, 887 void** new_address_ptr); 888 889 typedef void (JNICALL *jvmtiEventObjectFree) 890 (jvmtiEnv *jvmti_env, 891 jlong tag); 892 893 typedef void (JNICALL *jvmtiEventResourceExhausted) 894 (jvmtiEnv *jvmti_env, 895 JNIEnv* jni_env, 896 jint flags, 897 const void* reserved, 898 const char* description); 899 900 typedef void (JNICALL *jvmtiEventSampledObjectAlloc) 901 (jvmtiEnv *jvmti_env, 902 JNIEnv* jni_env, 903 jthread thread, 904 jobject object, 905 jclass object_klass, 906 jlong size); 907 908 typedef void (JNICALL *jvmtiEventSingleStep) 909 (jvmtiEnv *jvmti_env, 910 JNIEnv* jni_env, 911 jthread thread, 912 jmethodID method, 913 jlocation location); 914 915 typedef void (JNICALL *jvmtiEventThreadEnd) 916 (jvmtiEnv *jvmti_env, 917 JNIEnv* jni_env, 918 jthread thread); 919 920 typedef void (JNICALL *jvmtiEventThreadStart) 921 (jvmtiEnv *jvmti_env, 922 JNIEnv* jni_env, 923 jthread thread); 924 925 typedef void (JNICALL *jvmtiEventVirtualThreadEnd) 926 (jvmtiEnv *jvmti_env, 927 JNIEnv* jni_env, 928 jthread virtual_thread); 929 930 typedef void (JNICALL *jvmtiEventVirtualThreadStart) 931 (jvmtiEnv *jvmti_env, 932 JNIEnv* jni_env, 933 jthread virtual_thread); 934 935 typedef void (JNICALL *jvmtiEventVMDeath) 936 (jvmtiEnv *jvmti_env, 937 JNIEnv* jni_env); 938 939 typedef void (JNICALL *jvmtiEventVMInit) 940 (jvmtiEnv *jvmti_env, 941 JNIEnv* jni_env, 942 jthread thread); 943 944 typedef void (JNICALL *jvmtiEventVMObjectAlloc) 945 (jvmtiEnv *jvmti_env, 946 JNIEnv* jni_env, 947 jthread thread, 948 jobject object, 949 jclass object_klass, 950 jlong size); 951 952 typedef void (JNICALL *jvmtiEventVMStart) 953 (jvmtiEnv *jvmti_env, 954 JNIEnv* jni_env); 955 956 /* Event Callback Structure */ 957 958 typedef struct { 959 /* 50 : VM Initialization Event */ 960 jvmtiEventVMInit VMInit; 961 /* 51 : VM Death Event */ 962 jvmtiEventVMDeath VMDeath; 963 /* 52 : Thread Start */ 964 jvmtiEventThreadStart ThreadStart; 965 /* 53 : Thread End */ 966 jvmtiEventThreadEnd ThreadEnd; 967 /* 54 : Class File Load Hook */ 968 jvmtiEventClassFileLoadHook ClassFileLoadHook; 969 /* 55 : Class Load */ 970 jvmtiEventClassLoad ClassLoad; 971 /* 56 : Class Prepare */ 972 jvmtiEventClassPrepare ClassPrepare; 973 /* 57 : VM Start Event */ 974 jvmtiEventVMStart VMStart; 975 /* 58 : Exception */ 976 jvmtiEventException Exception; 977 /* 59 : Exception Catch */ 978 jvmtiEventExceptionCatch ExceptionCatch; 979 /* 60 : Single Step */ 980 jvmtiEventSingleStep SingleStep; 981 /* 61 : Frame Pop */ 982 jvmtiEventFramePop FramePop; 983 /* 62 : Breakpoint */ 984 jvmtiEventBreakpoint Breakpoint; 985 /* 63 : Field Access */ 986 jvmtiEventFieldAccess FieldAccess; 987 /* 64 : Field Modification */ 988 jvmtiEventFieldModification FieldModification; 989 /* 65 : Method Entry */ 990 jvmtiEventMethodEntry MethodEntry; 991 /* 66 : Method Exit */ 992 jvmtiEventMethodExit MethodExit; 993 /* 67 : Native Method Bind */ 994 jvmtiEventNativeMethodBind NativeMethodBind; 995 /* 68 : Compiled Method Load */ 996 jvmtiEventCompiledMethodLoad CompiledMethodLoad; 997 /* 69 : Compiled Method Unload */ 998 jvmtiEventCompiledMethodUnload CompiledMethodUnload; 999 /* 70 : Dynamic Code Generated */ 1000 jvmtiEventDynamicCodeGenerated DynamicCodeGenerated; 1001 /* 71 : Data Dump Request */ 1002 jvmtiEventDataDumpRequest DataDumpRequest; 1003 /* 72 */ 1004 jvmtiEventReserved reserved72; 1005 /* 73 : Monitor Wait */ 1006 jvmtiEventMonitorWait MonitorWait; 1007 /* 74 : Monitor Waited */ 1008 jvmtiEventMonitorWaited MonitorWaited; 1009 /* 75 : Monitor Contended Enter */ 1010 jvmtiEventMonitorContendedEnter MonitorContendedEnter; 1011 /* 76 : Monitor Contended Entered */ 1012 jvmtiEventMonitorContendedEntered MonitorContendedEntered; 1013 /* 77 */ 1014 jvmtiEventReserved reserved77; 1015 /* 78 */ 1016 jvmtiEventReserved reserved78; 1017 /* 79 */ 1018 jvmtiEventReserved reserved79; 1019 /* 80 : Resource Exhausted */ 1020 jvmtiEventResourceExhausted ResourceExhausted; 1021 /* 81 : Garbage Collection Start */ 1022 jvmtiEventGarbageCollectionStart GarbageCollectionStart; 1023 /* 82 : Garbage Collection Finish */ 1024 jvmtiEventGarbageCollectionFinish GarbageCollectionFinish; 1025 /* 83 : Object Free */ 1026 jvmtiEventObjectFree ObjectFree; 1027 /* 84 : VM Object Allocation */ 1028 jvmtiEventVMObjectAlloc VMObjectAlloc; 1029 /* 85 */ 1030 jvmtiEventReserved reserved85; 1031 /* 86 : Sampled Object Allocation */ 1032 jvmtiEventSampledObjectAlloc SampledObjectAlloc; 1033 /* 87 : Virtual Thread Start */ 1034 jvmtiEventVirtualThreadStart VirtualThreadStart; 1035 /* 88 : Virtual Thread End */ 1036 jvmtiEventVirtualThreadEnd VirtualThreadEnd; 1037 } jvmtiEventCallbacks; 1038 1039 1040 /* Function Interface */ 1041 1042 typedef struct jvmtiInterface_1_ { 1043 1044 /* 1 : RESERVED */ 1045 void *reserved1; 1046 1047 /* 2 : Set Event Notification Mode */ 1048 jvmtiError (JNICALL *SetEventNotificationMode) (jvmtiEnv* env, 1049 jvmtiEventMode mode, 1050 jvmtiEvent event_type, 1051 jthread event_thread, 1052 ...); 1053 1054 /* 3 : Get All Modules */ 1055 jvmtiError (JNICALL *GetAllModules) (jvmtiEnv* env, 1056 jint* module_count_ptr, 1057 jobject** modules_ptr); 1058 1059 /* 4 : Get All Threads */ 1060 jvmtiError (JNICALL *GetAllThreads) (jvmtiEnv* env, 1061 jint* threads_count_ptr, 1062 jthread** threads_ptr); 1063 1064 /* 5 : Suspend Thread */ 1065 jvmtiError (JNICALL *SuspendThread) (jvmtiEnv* env, 1066 jthread thread); 1067 1068 /* 6 : Resume Thread */ 1069 jvmtiError (JNICALL *ResumeThread) (jvmtiEnv* env, 1070 jthread thread); 1071 1072 /* 7 : Stop Thread */ 1073 jvmtiError (JNICALL *StopThread) (jvmtiEnv* env, 1074 jthread thread, 1075 jobject exception); 1076 1077 /* 8 : Interrupt Thread */ 1078 jvmtiError (JNICALL *InterruptThread) (jvmtiEnv* env, 1079 jthread thread); 1080 1081 /* 9 : Get Thread Info */ 1082 jvmtiError (JNICALL *GetThreadInfo) (jvmtiEnv* env, 1083 jthread thread, 1084 jvmtiThreadInfo* info_ptr); 1085 1086 /* 10 : Get Owned Monitor Info */ 1087 jvmtiError (JNICALL *GetOwnedMonitorInfo) (jvmtiEnv* env, 1088 jthread thread, 1089 jint* owned_monitor_count_ptr, 1090 jobject** owned_monitors_ptr); 1091 1092 /* 11 : Get Current Contended Monitor */ 1093 jvmtiError (JNICALL *GetCurrentContendedMonitor) (jvmtiEnv* env, 1094 jthread thread, 1095 jobject* monitor_ptr); 1096 1097 /* 12 : Run Agent Thread */ 1098 jvmtiError (JNICALL *RunAgentThread) (jvmtiEnv* env, 1099 jthread thread, 1100 jvmtiStartFunction proc, 1101 const void* arg, 1102 jint priority); 1103 1104 /* 13 : Get Top Thread Groups */ 1105 jvmtiError (JNICALL *GetTopThreadGroups) (jvmtiEnv* env, 1106 jint* group_count_ptr, 1107 jthreadGroup** groups_ptr); 1108 1109 /* 14 : Get Thread Group Info */ 1110 jvmtiError (JNICALL *GetThreadGroupInfo) (jvmtiEnv* env, 1111 jthreadGroup group, 1112 jvmtiThreadGroupInfo* info_ptr); 1113 1114 /* 15 : Get Thread Group Children */ 1115 jvmtiError (JNICALL *GetThreadGroupChildren) (jvmtiEnv* env, 1116 jthreadGroup group, 1117 jint* thread_count_ptr, 1118 jthread** threads_ptr, 1119 jint* group_count_ptr, 1120 jthreadGroup** groups_ptr); 1121 1122 /* 16 : Get Frame Count */ 1123 jvmtiError (JNICALL *GetFrameCount) (jvmtiEnv* env, 1124 jthread thread, 1125 jint* count_ptr); 1126 1127 /* 17 : Get Thread State */ 1128 jvmtiError (JNICALL *GetThreadState) (jvmtiEnv* env, 1129 jthread thread, 1130 jint* thread_state_ptr); 1131 1132 /* 18 : Get Current Thread */ 1133 jvmtiError (JNICALL *GetCurrentThread) (jvmtiEnv* env, 1134 jthread* thread_ptr); 1135 1136 /* 19 : Get Frame Location */ 1137 jvmtiError (JNICALL *GetFrameLocation) (jvmtiEnv* env, 1138 jthread thread, 1139 jint depth, 1140 jmethodID* method_ptr, 1141 jlocation* location_ptr); 1142 1143 /* 20 : Notify Frame Pop */ 1144 jvmtiError (JNICALL *NotifyFramePop) (jvmtiEnv* env, 1145 jthread thread, 1146 jint depth); 1147 1148 /* 21 : Get Local Variable - Object */ 1149 jvmtiError (JNICALL *GetLocalObject) (jvmtiEnv* env, 1150 jthread thread, 1151 jint depth, 1152 jint slot, 1153 jobject* value_ptr); 1154 1155 /* 22 : Get Local Variable - Int */ 1156 jvmtiError (JNICALL *GetLocalInt) (jvmtiEnv* env, 1157 jthread thread, 1158 jint depth, 1159 jint slot, 1160 jint* value_ptr); 1161 1162 /* 23 : Get Local Variable - Long */ 1163 jvmtiError (JNICALL *GetLocalLong) (jvmtiEnv* env, 1164 jthread thread, 1165 jint depth, 1166 jint slot, 1167 jlong* value_ptr); 1168 1169 /* 24 : Get Local Variable - Float */ 1170 jvmtiError (JNICALL *GetLocalFloat) (jvmtiEnv* env, 1171 jthread thread, 1172 jint depth, 1173 jint slot, 1174 jfloat* value_ptr); 1175 1176 /* 25 : Get Local Variable - Double */ 1177 jvmtiError (JNICALL *GetLocalDouble) (jvmtiEnv* env, 1178 jthread thread, 1179 jint depth, 1180 jint slot, 1181 jdouble* value_ptr); 1182 1183 /* 26 : Set Local Variable - Object */ 1184 jvmtiError (JNICALL *SetLocalObject) (jvmtiEnv* env, 1185 jthread thread, 1186 jint depth, 1187 jint slot, 1188 jobject value); 1189 1190 /* 27 : Set Local Variable - Int */ 1191 jvmtiError (JNICALL *SetLocalInt) (jvmtiEnv* env, 1192 jthread thread, 1193 jint depth, 1194 jint slot, 1195 jint value); 1196 1197 /* 28 : Set Local Variable - Long */ 1198 jvmtiError (JNICALL *SetLocalLong) (jvmtiEnv* env, 1199 jthread thread, 1200 jint depth, 1201 jint slot, 1202 jlong value); 1203 1204 /* 29 : Set Local Variable - Float */ 1205 jvmtiError (JNICALL *SetLocalFloat) (jvmtiEnv* env, 1206 jthread thread, 1207 jint depth, 1208 jint slot, 1209 jfloat value); 1210 1211 /* 30 : Set Local Variable - Double */ 1212 jvmtiError (JNICALL *SetLocalDouble) (jvmtiEnv* env, 1213 jthread thread, 1214 jint depth, 1215 jint slot, 1216 jdouble value); 1217 1218 /* 31 : Create Raw Monitor */ 1219 jvmtiError (JNICALL *CreateRawMonitor) (jvmtiEnv* env, 1220 const char* name, 1221 jrawMonitorID* monitor_ptr); 1222 1223 /* 32 : Destroy Raw Monitor */ 1224 jvmtiError (JNICALL *DestroyRawMonitor) (jvmtiEnv* env, 1225 jrawMonitorID monitor); 1226 1227 /* 33 : Raw Monitor Enter */ 1228 jvmtiError (JNICALL *RawMonitorEnter) (jvmtiEnv* env, 1229 jrawMonitorID monitor); 1230 1231 /* 34 : Raw Monitor Exit */ 1232 jvmtiError (JNICALL *RawMonitorExit) (jvmtiEnv* env, 1233 jrawMonitorID monitor); 1234 1235 /* 35 : Raw Monitor Wait */ 1236 jvmtiError (JNICALL *RawMonitorWait) (jvmtiEnv* env, 1237 jrawMonitorID monitor, 1238 jlong millis); 1239 1240 /* 36 : Raw Monitor Notify */ 1241 jvmtiError (JNICALL *RawMonitorNotify) (jvmtiEnv* env, 1242 jrawMonitorID monitor); 1243 1244 /* 37 : Raw Monitor Notify All */ 1245 jvmtiError (JNICALL *RawMonitorNotifyAll) (jvmtiEnv* env, 1246 jrawMonitorID monitor); 1247 1248 /* 38 : Set Breakpoint */ 1249 jvmtiError (JNICALL *SetBreakpoint) (jvmtiEnv* env, 1250 jmethodID method, 1251 jlocation location); 1252 1253 /* 39 : Clear Breakpoint */ 1254 jvmtiError (JNICALL *ClearBreakpoint) (jvmtiEnv* env, 1255 jmethodID method, 1256 jlocation location); 1257 1258 /* 40 : Get Named Module */ 1259 jvmtiError (JNICALL *GetNamedModule) (jvmtiEnv* env, 1260 jobject class_loader, 1261 const char* package_name, 1262 jobject* module_ptr); 1263 1264 /* 41 : Set Field Access Watch */ 1265 jvmtiError (JNICALL *SetFieldAccessWatch) (jvmtiEnv* env, 1266 jclass klass, 1267 jfieldID field); 1268 1269 /* 42 : Clear Field Access Watch */ 1270 jvmtiError (JNICALL *ClearFieldAccessWatch) (jvmtiEnv* env, 1271 jclass klass, 1272 jfieldID field); 1273 1274 /* 43 : Set Field Modification Watch */ 1275 jvmtiError (JNICALL *SetFieldModificationWatch) (jvmtiEnv* env, 1276 jclass klass, 1277 jfieldID field); 1278 1279 /* 44 : Clear Field Modification Watch */ 1280 jvmtiError (JNICALL *ClearFieldModificationWatch) (jvmtiEnv* env, 1281 jclass klass, 1282 jfieldID field); 1283 1284 /* 45 : Is Modifiable Class */ 1285 jvmtiError (JNICALL *IsModifiableClass) (jvmtiEnv* env, 1286 jclass klass, 1287 jboolean* is_modifiable_class_ptr); 1288 1289 /* 46 : Allocate */ 1290 jvmtiError (JNICALL *Allocate) (jvmtiEnv* env, 1291 jlong size, 1292 unsigned char** mem_ptr); 1293 1294 /* 47 : Deallocate */ 1295 jvmtiError (JNICALL *Deallocate) (jvmtiEnv* env, 1296 unsigned char* mem); 1297 1298 /* 48 : Get Class Signature */ 1299 jvmtiError (JNICALL *GetClassSignature) (jvmtiEnv* env, 1300 jclass klass, 1301 char** signature_ptr, 1302 char** generic_ptr); 1303 1304 /* 49 : Get Class Status */ 1305 jvmtiError (JNICALL *GetClassStatus) (jvmtiEnv* env, 1306 jclass klass, 1307 jint* status_ptr); 1308 1309 /* 50 : Get Source File Name */ 1310 jvmtiError (JNICALL *GetSourceFileName) (jvmtiEnv* env, 1311 jclass klass, 1312 char** source_name_ptr); 1313 1314 /* 51 : Get Class Modifiers */ 1315 jvmtiError (JNICALL *GetClassModifiers) (jvmtiEnv* env, 1316 jclass klass, 1317 jint* modifiers_ptr); 1318 1319 /* 52 : Get Class Methods */ 1320 jvmtiError (JNICALL *GetClassMethods) (jvmtiEnv* env, 1321 jclass klass, 1322 jint* method_count_ptr, 1323 jmethodID** methods_ptr); 1324 1325 /* 53 : Get Class Fields */ 1326 jvmtiError (JNICALL *GetClassFields) (jvmtiEnv* env, 1327 jclass klass, 1328 jint* field_count_ptr, 1329 jfieldID** fields_ptr); 1330 1331 /* 54 : Get Implemented Interfaces */ 1332 jvmtiError (JNICALL *GetImplementedInterfaces) (jvmtiEnv* env, 1333 jclass klass, 1334 jint* interface_count_ptr, 1335 jclass** interfaces_ptr); 1336 1337 /* 55 : Is Interface */ 1338 jvmtiError (JNICALL *IsInterface) (jvmtiEnv* env, 1339 jclass klass, 1340 jboolean* is_interface_ptr); 1341 1342 /* 56 : Is Array Class */ 1343 jvmtiError (JNICALL *IsArrayClass) (jvmtiEnv* env, 1344 jclass klass, 1345 jboolean* is_array_class_ptr); 1346 1347 /* 57 : Get Class Loader */ 1348 jvmtiError (JNICALL *GetClassLoader) (jvmtiEnv* env, 1349 jclass klass, 1350 jobject* classloader_ptr); 1351 1352 /* 58 : Get Object Hash Code */ 1353 jvmtiError (JNICALL *GetObjectHashCode) (jvmtiEnv* env, 1354 jobject object, 1355 jint* hash_code_ptr); 1356 1357 /* 59 : Get Object Monitor Usage */ 1358 jvmtiError (JNICALL *GetObjectMonitorUsage) (jvmtiEnv* env, 1359 jobject object, 1360 jvmtiMonitorUsage* info_ptr); 1361 1362 /* 60 : Get Field Name (and Signature) */ 1363 jvmtiError (JNICALL *GetFieldName) (jvmtiEnv* env, 1364 jclass klass, 1365 jfieldID field, 1366 char** name_ptr, 1367 char** signature_ptr, 1368 char** generic_ptr); 1369 1370 /* 61 : Get Field Declaring Class */ 1371 jvmtiError (JNICALL *GetFieldDeclaringClass) (jvmtiEnv* env, 1372 jclass klass, 1373 jfieldID field, 1374 jclass* declaring_class_ptr); 1375 1376 /* 62 : Get Field Modifiers */ 1377 jvmtiError (JNICALL *GetFieldModifiers) (jvmtiEnv* env, 1378 jclass klass, 1379 jfieldID field, 1380 jint* modifiers_ptr); 1381 1382 /* 63 : Is Field Synthetic */ 1383 jvmtiError (JNICALL *IsFieldSynthetic) (jvmtiEnv* env, 1384 jclass klass, 1385 jfieldID field, 1386 jboolean* is_synthetic_ptr); 1387 1388 /* 64 : Get Method Name (and Signature) */ 1389 jvmtiError (JNICALL *GetMethodName) (jvmtiEnv* env, 1390 jmethodID method, 1391 char** name_ptr, 1392 char** signature_ptr, 1393 char** generic_ptr); 1394 1395 /* 65 : Get Method Declaring Class */ 1396 jvmtiError (JNICALL *GetMethodDeclaringClass) (jvmtiEnv* env, 1397 jmethodID method, 1398 jclass* declaring_class_ptr); 1399 1400 /* 66 : Get Method Modifiers */ 1401 jvmtiError (JNICALL *GetMethodModifiers) (jvmtiEnv* env, 1402 jmethodID method, 1403 jint* modifiers_ptr); 1404 1405 /* 67 : RESERVED */ 1406 void *reserved67; 1407 1408 /* 68 : Get Max Locals */ 1409 jvmtiError (JNICALL *GetMaxLocals) (jvmtiEnv* env, 1410 jmethodID method, 1411 jint* max_ptr); 1412 1413 /* 69 : Get Arguments Size */ 1414 jvmtiError (JNICALL *GetArgumentsSize) (jvmtiEnv* env, 1415 jmethodID method, 1416 jint* size_ptr); 1417 1418 /* 70 : Get Line Number Table */ 1419 jvmtiError (JNICALL *GetLineNumberTable) (jvmtiEnv* env, 1420 jmethodID method, 1421 jint* entry_count_ptr, 1422 jvmtiLineNumberEntry** table_ptr); 1423 1424 /* 71 : Get Method Location */ 1425 jvmtiError (JNICALL *GetMethodLocation) (jvmtiEnv* env, 1426 jmethodID method, 1427 jlocation* start_location_ptr, 1428 jlocation* end_location_ptr); 1429 1430 /* 72 : Get Local Variable Table */ 1431 jvmtiError (JNICALL *GetLocalVariableTable) (jvmtiEnv* env, 1432 jmethodID method, 1433 jint* entry_count_ptr, 1434 jvmtiLocalVariableEntry** table_ptr); 1435 1436 /* 73 : Set Native Method Prefix */ 1437 jvmtiError (JNICALL *SetNativeMethodPrefix) (jvmtiEnv* env, 1438 const char* prefix); 1439 1440 /* 74 : Set Native Method Prefixes */ 1441 jvmtiError (JNICALL *SetNativeMethodPrefixes) (jvmtiEnv* env, 1442 jint prefix_count, 1443 char** prefixes); 1444 1445 /* 75 : Get Bytecodes */ 1446 jvmtiError (JNICALL *GetBytecodes) (jvmtiEnv* env, 1447 jmethodID method, 1448 jint* bytecode_count_ptr, 1449 unsigned char** bytecodes_ptr); 1450 1451 /* 76 : Is Method Native */ 1452 jvmtiError (JNICALL *IsMethodNative) (jvmtiEnv* env, 1453 jmethodID method, 1454 jboolean* is_native_ptr); 1455 1456 /* 77 : Is Method Synthetic */ 1457 jvmtiError (JNICALL *IsMethodSynthetic) (jvmtiEnv* env, 1458 jmethodID method, 1459 jboolean* is_synthetic_ptr); 1460 1461 /* 78 : Get Loaded Classes */ 1462 jvmtiError (JNICALL *GetLoadedClasses) (jvmtiEnv* env, 1463 jint* class_count_ptr, 1464 jclass** classes_ptr); 1465 1466 /* 79 : Get Classloader Classes */ 1467 jvmtiError (JNICALL *GetClassLoaderClasses) (jvmtiEnv* env, 1468 jobject initiating_loader, 1469 jint* class_count_ptr, 1470 jclass** classes_ptr); 1471 1472 /* 80 : Pop Frame */ 1473 jvmtiError (JNICALL *PopFrame) (jvmtiEnv* env, 1474 jthread thread); 1475 1476 /* 81 : Force Early Return - Object */ 1477 jvmtiError (JNICALL *ForceEarlyReturnObject) (jvmtiEnv* env, 1478 jthread thread, 1479 jobject value); 1480 1481 /* 82 : Force Early Return - Int */ 1482 jvmtiError (JNICALL *ForceEarlyReturnInt) (jvmtiEnv* env, 1483 jthread thread, 1484 jint value); 1485 1486 /* 83 : Force Early Return - Long */ 1487 jvmtiError (JNICALL *ForceEarlyReturnLong) (jvmtiEnv* env, 1488 jthread thread, 1489 jlong value); 1490 1491 /* 84 : Force Early Return - Float */ 1492 jvmtiError (JNICALL *ForceEarlyReturnFloat) (jvmtiEnv* env, 1493 jthread thread, 1494 jfloat value); 1495 1496 /* 85 : Force Early Return - Double */ 1497 jvmtiError (JNICALL *ForceEarlyReturnDouble) (jvmtiEnv* env, 1498 jthread thread, 1499 jdouble value); 1500 1501 /* 86 : Force Early Return - Void */ 1502 jvmtiError (JNICALL *ForceEarlyReturnVoid) (jvmtiEnv* env, 1503 jthread thread); 1504 1505 /* 87 : Redefine Classes */ 1506 jvmtiError (JNICALL *RedefineClasses) (jvmtiEnv* env, 1507 jint class_count, 1508 const jvmtiClassDefinition* class_definitions); 1509 1510 /* 88 : Get Version Number */ 1511 jvmtiError (JNICALL *GetVersionNumber) (jvmtiEnv* env, 1512 jint* version_ptr); 1513 1514 /* 89 : Get Capabilities */ 1515 jvmtiError (JNICALL *GetCapabilities) (jvmtiEnv* env, 1516 jvmtiCapabilities* capabilities_ptr); 1517 1518 /* 90 : Get Source Debug Extension */ 1519 jvmtiError (JNICALL *GetSourceDebugExtension) (jvmtiEnv* env, 1520 jclass klass, 1521 char** source_debug_extension_ptr); 1522 1523 /* 91 : Is Method Obsolete */ 1524 jvmtiError (JNICALL *IsMethodObsolete) (jvmtiEnv* env, 1525 jmethodID method, 1526 jboolean* is_obsolete_ptr); 1527 1528 /* 92 : Suspend Thread List */ 1529 jvmtiError (JNICALL *SuspendThreadList) (jvmtiEnv* env, 1530 jint request_count, 1531 const jthread* request_list, 1532 jvmtiError* results); 1533 1534 /* 93 : Resume Thread List */ 1535 jvmtiError (JNICALL *ResumeThreadList) (jvmtiEnv* env, 1536 jint request_count, 1537 const jthread* request_list, 1538 jvmtiError* results); 1539 1540 /* 94 : Add Module Reads */ 1541 jvmtiError (JNICALL *AddModuleReads) (jvmtiEnv* env, 1542 jobject module, 1543 jobject to_module); 1544 1545 /* 95 : Add Module Exports */ 1546 jvmtiError (JNICALL *AddModuleExports) (jvmtiEnv* env, 1547 jobject module, 1548 const char* pkg_name, 1549 jobject to_module); 1550 1551 /* 96 : Add Module Opens */ 1552 jvmtiError (JNICALL *AddModuleOpens) (jvmtiEnv* env, 1553 jobject module, 1554 const char* pkg_name, 1555 jobject to_module); 1556 1557 /* 97 : Add Module Uses */ 1558 jvmtiError (JNICALL *AddModuleUses) (jvmtiEnv* env, 1559 jobject module, 1560 jclass service); 1561 1562 /* 98 : Add Module Provides */ 1563 jvmtiError (JNICALL *AddModuleProvides) (jvmtiEnv* env, 1564 jobject module, 1565 jclass service, 1566 jclass impl_class); 1567 1568 /* 99 : Is Modifiable Module */ 1569 jvmtiError (JNICALL *IsModifiableModule) (jvmtiEnv* env, 1570 jobject module, 1571 jboolean* is_modifiable_module_ptr); 1572 1573 /* 100 : Get All Stack Traces */ 1574 jvmtiError (JNICALL *GetAllStackTraces) (jvmtiEnv* env, 1575 jint max_frame_count, 1576 jvmtiStackInfo** stack_info_ptr, 1577 jint* thread_count_ptr); 1578 1579 /* 101 : Get Thread List Stack Traces */ 1580 jvmtiError (JNICALL *GetThreadListStackTraces) (jvmtiEnv* env, 1581 jint thread_count, 1582 const jthread* thread_list, 1583 jint max_frame_count, 1584 jvmtiStackInfo** stack_info_ptr); 1585 1586 /* 102 : Get Thread Local Storage */ 1587 jvmtiError (JNICALL *GetThreadLocalStorage) (jvmtiEnv* env, 1588 jthread thread, 1589 void** data_ptr); 1590 1591 /* 103 : Set Thread Local Storage */ 1592 jvmtiError (JNICALL *SetThreadLocalStorage) (jvmtiEnv* env, 1593 jthread thread, 1594 const void* data); 1595 1596 /* 104 : Get Stack Trace */ 1597 jvmtiError (JNICALL *GetStackTrace) (jvmtiEnv* env, 1598 jthread thread, 1599 jint start_depth, 1600 jint max_frame_count, 1601 jvmtiFrameInfo* frame_buffer, 1602 jint* count_ptr); 1603 1604 /* 105 : RESERVED */ 1605 void *reserved105; 1606 1607 /* 106 : Get Tag */ 1608 jvmtiError (JNICALL *GetTag) (jvmtiEnv* env, 1609 jobject object, 1610 jlong* tag_ptr); 1611 1612 /* 107 : Set Tag */ 1613 jvmtiError (JNICALL *SetTag) (jvmtiEnv* env, 1614 jobject object, 1615 jlong tag); 1616 1617 /* 108 : Force Garbage Collection */ 1618 jvmtiError (JNICALL *ForceGarbageCollection) (jvmtiEnv* env); 1619 1620 /* 109 : Iterate Over Objects Reachable From Object */ 1621 jvmtiError (JNICALL *IterateOverObjectsReachableFromObject) (jvmtiEnv* env, 1622 jobject object, 1623 jvmtiObjectReferenceCallback object_reference_callback, 1624 const void* user_data); 1625 1626 /* 110 : Iterate Over Reachable Objects */ 1627 jvmtiError (JNICALL *IterateOverReachableObjects) (jvmtiEnv* env, 1628 jvmtiHeapRootCallback heap_root_callback, 1629 jvmtiStackReferenceCallback stack_ref_callback, 1630 jvmtiObjectReferenceCallback object_ref_callback, 1631 const void* user_data); 1632 1633 /* 111 : Iterate Over Heap */ 1634 jvmtiError (JNICALL *IterateOverHeap) (jvmtiEnv* env, 1635 jvmtiHeapObjectFilter object_filter, 1636 jvmtiHeapObjectCallback heap_object_callback, 1637 const void* user_data); 1638 1639 /* 112 : Iterate Over Instances Of Class */ 1640 jvmtiError (JNICALL *IterateOverInstancesOfClass) (jvmtiEnv* env, 1641 jclass klass, 1642 jvmtiHeapObjectFilter object_filter, 1643 jvmtiHeapObjectCallback heap_object_callback, 1644 const void* user_data); 1645 1646 /* 113 : RESERVED */ 1647 void *reserved113; 1648 1649 /* 114 : Get Objects With Tags */ 1650 jvmtiError (JNICALL *GetObjectsWithTags) (jvmtiEnv* env, 1651 jint tag_count, 1652 const jlong* tags, 1653 jint* count_ptr, 1654 jobject** object_result_ptr, 1655 jlong** tag_result_ptr); 1656 1657 /* 115 : Follow References */ 1658 jvmtiError (JNICALL *FollowReferences) (jvmtiEnv* env, 1659 jint heap_filter, 1660 jclass klass, 1661 jobject initial_object, 1662 const jvmtiHeapCallbacks* callbacks, 1663 const void* user_data); 1664 1665 /* 116 : Iterate Through Heap */ 1666 jvmtiError (JNICALL *IterateThroughHeap) (jvmtiEnv* env, 1667 jint heap_filter, 1668 jclass klass, 1669 const jvmtiHeapCallbacks* callbacks, 1670 const void* user_data); 1671 1672 /* 117 : RESERVED */ 1673 void *reserved117; 1674 1675 /* 118 : Suspend All Virtual Threads */ 1676 jvmtiError (JNICALL *SuspendAllVirtualThreads) (jvmtiEnv* env, 1677 jint except_count, 1678 const jthread* except_list); 1679 1680 /* 119 : Resume All Virtual Threads */ 1681 jvmtiError (JNICALL *ResumeAllVirtualThreads) (jvmtiEnv* env, 1682 jint except_count, 1683 const jthread* except_list); 1684 1685 /* 120 : Set JNI Function Table */ 1686 jvmtiError (JNICALL *SetJNIFunctionTable) (jvmtiEnv* env, 1687 const jniNativeInterface* function_table); 1688 1689 /* 121 : Get JNI Function Table */ 1690 jvmtiError (JNICALL *GetJNIFunctionTable) (jvmtiEnv* env, 1691 jniNativeInterface** function_table); 1692 1693 /* 122 : Set Event Callbacks */ 1694 jvmtiError (JNICALL *SetEventCallbacks) (jvmtiEnv* env, 1695 const jvmtiEventCallbacks* callbacks, 1696 jint size_of_callbacks); 1697 1698 /* 123 : Generate Events */ 1699 jvmtiError (JNICALL *GenerateEvents) (jvmtiEnv* env, 1700 jvmtiEvent event_type); 1701 1702 /* 124 : Get Extension Functions */ 1703 jvmtiError (JNICALL *GetExtensionFunctions) (jvmtiEnv* env, 1704 jint* extension_count_ptr, 1705 jvmtiExtensionFunctionInfo** extensions); 1706 1707 /* 125 : Get Extension Events */ 1708 jvmtiError (JNICALL *GetExtensionEvents) (jvmtiEnv* env, 1709 jint* extension_count_ptr, 1710 jvmtiExtensionEventInfo** extensions); 1711 1712 /* 126 : Set Extension Event Callback */ 1713 jvmtiError (JNICALL *SetExtensionEventCallback) (jvmtiEnv* env, 1714 jint extension_event_index, 1715 jvmtiExtensionEvent callback); 1716 1717 /* 127 : Dispose Environment */ 1718 jvmtiError (JNICALL *DisposeEnvironment) (jvmtiEnv* env); 1719 1720 /* 128 : Get Error Name */ 1721 jvmtiError (JNICALL *GetErrorName) (jvmtiEnv* env, 1722 jvmtiError error, 1723 char** name_ptr); 1724 1725 /* 129 : Get JLocation Format */ 1726 jvmtiError (JNICALL *GetJLocationFormat) (jvmtiEnv* env, 1727 jvmtiJlocationFormat* format_ptr); 1728 1729 /* 130 : Get System Properties */ 1730 jvmtiError (JNICALL *GetSystemProperties) (jvmtiEnv* env, 1731 jint* count_ptr, 1732 char*** property_ptr); 1733 1734 /* 131 : Get System Property */ 1735 jvmtiError (JNICALL *GetSystemProperty) (jvmtiEnv* env, 1736 const char* property, 1737 char** value_ptr); 1738 1739 /* 132 : Set System Property */ 1740 jvmtiError (JNICALL *SetSystemProperty) (jvmtiEnv* env, 1741 const char* property, 1742 const char* value_ptr); 1743 1744 /* 133 : Get Phase */ 1745 jvmtiError (JNICALL *GetPhase) (jvmtiEnv* env, 1746 jvmtiPhase* phase_ptr); 1747 1748 /* 134 : Get Current Thread CPU Timer Information */ 1749 jvmtiError (JNICALL *GetCurrentThreadCpuTimerInfo) (jvmtiEnv* env, 1750 jvmtiTimerInfo* info_ptr); 1751 1752 /* 135 : Get Current Thread CPU Time */ 1753 jvmtiError (JNICALL *GetCurrentThreadCpuTime) (jvmtiEnv* env, 1754 jlong* nanos_ptr); 1755 1756 /* 136 : Get Thread CPU Timer Information */ 1757 jvmtiError (JNICALL *GetThreadCpuTimerInfo) (jvmtiEnv* env, 1758 jvmtiTimerInfo* info_ptr); 1759 1760 /* 137 : Get Thread CPU Time */ 1761 jvmtiError (JNICALL *GetThreadCpuTime) (jvmtiEnv* env, 1762 jthread thread, 1763 jlong* nanos_ptr); 1764 1765 /* 138 : Get Timer Information */ 1766 jvmtiError (JNICALL *GetTimerInfo) (jvmtiEnv* env, 1767 jvmtiTimerInfo* info_ptr); 1768 1769 /* 139 : Get Time */ 1770 jvmtiError (JNICALL *GetTime) (jvmtiEnv* env, 1771 jlong* nanos_ptr); 1772 1773 /* 140 : Get Potential Capabilities */ 1774 jvmtiError (JNICALL *GetPotentialCapabilities) (jvmtiEnv* env, 1775 jvmtiCapabilities* capabilities_ptr); 1776 1777 /* 141 : RESERVED */ 1778 void *reserved141; 1779 1780 /* 142 : Add Capabilities */ 1781 jvmtiError (JNICALL *AddCapabilities) (jvmtiEnv* env, 1782 const jvmtiCapabilities* capabilities_ptr); 1783 1784 /* 143 : Relinquish Capabilities */ 1785 jvmtiError (JNICALL *RelinquishCapabilities) (jvmtiEnv* env, 1786 const jvmtiCapabilities* capabilities_ptr); 1787 1788 /* 144 : Get Available Processors */ 1789 jvmtiError (JNICALL *GetAvailableProcessors) (jvmtiEnv* env, 1790 jint* processor_count_ptr); 1791 1792 /* 145 : Get Class Version Numbers */ 1793 jvmtiError (JNICALL *GetClassVersionNumbers) (jvmtiEnv* env, 1794 jclass klass, 1795 jint* minor_version_ptr, 1796 jint* major_version_ptr); 1797 1798 /* 146 : Get Constant Pool */ 1799 jvmtiError (JNICALL *GetConstantPool) (jvmtiEnv* env, 1800 jclass klass, 1801 jint* constant_pool_count_ptr, 1802 jint* constant_pool_byte_count_ptr, 1803 unsigned char** constant_pool_bytes_ptr); 1804 1805 /* 147 : Get Environment Local Storage */ 1806 jvmtiError (JNICALL *GetEnvironmentLocalStorage) (jvmtiEnv* env, 1807 void** data_ptr); 1808 1809 /* 148 : Set Environment Local Storage */ 1810 jvmtiError (JNICALL *SetEnvironmentLocalStorage) (jvmtiEnv* env, 1811 const void* data); 1812 1813 /* 149 : Add To Bootstrap Class Loader Search */ 1814 jvmtiError (JNICALL *AddToBootstrapClassLoaderSearch) (jvmtiEnv* env, 1815 const char* segment); 1816 1817 /* 150 : Set Verbose Flag */ 1818 jvmtiError (JNICALL *SetVerboseFlag) (jvmtiEnv* env, 1819 jvmtiVerboseFlag flag, 1820 jboolean value); 1821 1822 /* 151 : Add To System Class Loader Search */ 1823 jvmtiError (JNICALL *AddToSystemClassLoaderSearch) (jvmtiEnv* env, 1824 const char* segment); 1825 1826 /* 152 : Retransform Classes */ 1827 jvmtiError (JNICALL *RetransformClasses) (jvmtiEnv* env, 1828 jint class_count, 1829 const jclass* classes); 1830 1831 /* 153 : Get Owned Monitor Stack Depth Info */ 1832 jvmtiError (JNICALL *GetOwnedMonitorStackDepthInfo) (jvmtiEnv* env, 1833 jthread thread, 1834 jint* monitor_info_count_ptr, 1835 jvmtiMonitorStackDepthInfo** monitor_info_ptr); 1836 1837 /* 154 : Get Object Size */ 1838 jvmtiError (JNICALL *GetObjectSize) (jvmtiEnv* env, 1839 jobject object, 1840 jlong* size_ptr); 1841 1842 /* 155 : Get Local Instance */ 1843 jvmtiError (JNICALL *GetLocalInstance) (jvmtiEnv* env, 1844 jthread thread, 1845 jint depth, 1846 jobject* value_ptr); 1847 1848 /* 156 : Set Heap Sampling Interval */ 1849 jvmtiError (JNICALL *SetHeapSamplingInterval) (jvmtiEnv* env, 1850 jint sampling_interval); 1851 1852 } jvmtiInterface_1; 1853 1854 struct _jvmtiEnv { 1855 const struct jvmtiInterface_1_ *functions; 1856 #ifdef __cplusplus 1857 1858 Allocate_jvmtiEnv1859 jvmtiError Allocate(jlong size, 1860 unsigned char** mem_ptr) { 1861 return functions->Allocate(this, size, mem_ptr); 1862 } 1863 Deallocate_jvmtiEnv1864 jvmtiError Deallocate(unsigned char* mem) { 1865 return functions->Deallocate(this, mem); 1866 } 1867 GetThreadState_jvmtiEnv1868 jvmtiError GetThreadState(jthread thread, 1869 jint* thread_state_ptr) { 1870 return functions->GetThreadState(this, thread, thread_state_ptr); 1871 } 1872 GetCurrentThread_jvmtiEnv1873 jvmtiError GetCurrentThread(jthread* thread_ptr) { 1874 return functions->GetCurrentThread(this, thread_ptr); 1875 } 1876 GetAllThreads_jvmtiEnv1877 jvmtiError GetAllThreads(jint* threads_count_ptr, 1878 jthread** threads_ptr) { 1879 return functions->GetAllThreads(this, threads_count_ptr, threads_ptr); 1880 } 1881 SuspendThread_jvmtiEnv1882 jvmtiError SuspendThread(jthread thread) { 1883 return functions->SuspendThread(this, thread); 1884 } 1885 SuspendThreadList_jvmtiEnv1886 jvmtiError SuspendThreadList(jint request_count, 1887 const jthread* request_list, 1888 jvmtiError* results) { 1889 return functions->SuspendThreadList(this, request_count, request_list, results); 1890 } 1891 SuspendAllVirtualThreads_jvmtiEnv1892 jvmtiError SuspendAllVirtualThreads(jint except_count, 1893 const jthread* except_list) { 1894 return functions->SuspendAllVirtualThreads(this, except_count, except_list); 1895 } 1896 ResumeThread_jvmtiEnv1897 jvmtiError ResumeThread(jthread thread) { 1898 return functions->ResumeThread(this, thread); 1899 } 1900 ResumeThreadList_jvmtiEnv1901 jvmtiError ResumeThreadList(jint request_count, 1902 const jthread* request_list, 1903 jvmtiError* results) { 1904 return functions->ResumeThreadList(this, request_count, request_list, results); 1905 } 1906 ResumeAllVirtualThreads_jvmtiEnv1907 jvmtiError ResumeAllVirtualThreads(jint except_count, 1908 const jthread* except_list) { 1909 return functions->ResumeAllVirtualThreads(this, except_count, except_list); 1910 } 1911 StopThread_jvmtiEnv1912 jvmtiError StopThread(jthread thread, 1913 jobject exception) { 1914 return functions->StopThread(this, thread, exception); 1915 } 1916 InterruptThread_jvmtiEnv1917 jvmtiError InterruptThread(jthread thread) { 1918 return functions->InterruptThread(this, thread); 1919 } 1920 GetThreadInfo_jvmtiEnv1921 jvmtiError GetThreadInfo(jthread thread, 1922 jvmtiThreadInfo* info_ptr) { 1923 return functions->GetThreadInfo(this, thread, info_ptr); 1924 } 1925 GetOwnedMonitorInfo_jvmtiEnv1926 jvmtiError GetOwnedMonitorInfo(jthread thread, 1927 jint* owned_monitor_count_ptr, 1928 jobject** owned_monitors_ptr) { 1929 return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr); 1930 } 1931 GetOwnedMonitorStackDepthInfo_jvmtiEnv1932 jvmtiError GetOwnedMonitorStackDepthInfo(jthread thread, 1933 jint* monitor_info_count_ptr, 1934 jvmtiMonitorStackDepthInfo** monitor_info_ptr) { 1935 return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr); 1936 } 1937 GetCurrentContendedMonitor_jvmtiEnv1938 jvmtiError GetCurrentContendedMonitor(jthread thread, 1939 jobject* monitor_ptr) { 1940 return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr); 1941 } 1942 RunAgentThread_jvmtiEnv1943 jvmtiError RunAgentThread(jthread thread, 1944 jvmtiStartFunction proc, 1945 const void* arg, 1946 jint priority) { 1947 return functions->RunAgentThread(this, thread, proc, arg, priority); 1948 } 1949 SetThreadLocalStorage_jvmtiEnv1950 jvmtiError SetThreadLocalStorage(jthread thread, 1951 const void* data) { 1952 return functions->SetThreadLocalStorage(this, thread, data); 1953 } 1954 GetThreadLocalStorage_jvmtiEnv1955 jvmtiError GetThreadLocalStorage(jthread thread, 1956 void** data_ptr) { 1957 return functions->GetThreadLocalStorage(this, thread, data_ptr); 1958 } 1959 GetTopThreadGroups_jvmtiEnv1960 jvmtiError GetTopThreadGroups(jint* group_count_ptr, 1961 jthreadGroup** groups_ptr) { 1962 return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr); 1963 } 1964 GetThreadGroupInfo_jvmtiEnv1965 jvmtiError GetThreadGroupInfo(jthreadGroup group, 1966 jvmtiThreadGroupInfo* info_ptr) { 1967 return functions->GetThreadGroupInfo(this, group, info_ptr); 1968 } 1969 GetThreadGroupChildren_jvmtiEnv1970 jvmtiError GetThreadGroupChildren(jthreadGroup group, 1971 jint* thread_count_ptr, 1972 jthread** threads_ptr, 1973 jint* group_count_ptr, 1974 jthreadGroup** groups_ptr) { 1975 return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr); 1976 } 1977 GetStackTrace_jvmtiEnv1978 jvmtiError GetStackTrace(jthread thread, 1979 jint start_depth, 1980 jint max_frame_count, 1981 jvmtiFrameInfo* frame_buffer, 1982 jint* count_ptr) { 1983 return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr); 1984 } 1985 GetAllStackTraces_jvmtiEnv1986 jvmtiError GetAllStackTraces(jint max_frame_count, 1987 jvmtiStackInfo** stack_info_ptr, 1988 jint* thread_count_ptr) { 1989 return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr); 1990 } 1991 GetThreadListStackTraces_jvmtiEnv1992 jvmtiError GetThreadListStackTraces(jint thread_count, 1993 const jthread* thread_list, 1994 jint max_frame_count, 1995 jvmtiStackInfo** stack_info_ptr) { 1996 return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr); 1997 } 1998 GetFrameCount_jvmtiEnv1999 jvmtiError GetFrameCount(jthread thread, 2000 jint* count_ptr) { 2001 return functions->GetFrameCount(this, thread, count_ptr); 2002 } 2003 PopFrame_jvmtiEnv2004 jvmtiError PopFrame(jthread thread) { 2005 return functions->PopFrame(this, thread); 2006 } 2007 GetFrameLocation_jvmtiEnv2008 jvmtiError GetFrameLocation(jthread thread, 2009 jint depth, 2010 jmethodID* method_ptr, 2011 jlocation* location_ptr) { 2012 return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr); 2013 } 2014 NotifyFramePop_jvmtiEnv2015 jvmtiError NotifyFramePop(jthread thread, 2016 jint depth) { 2017 return functions->NotifyFramePop(this, thread, depth); 2018 } 2019 ForceEarlyReturnObject_jvmtiEnv2020 jvmtiError ForceEarlyReturnObject(jthread thread, 2021 jobject value) { 2022 return functions->ForceEarlyReturnObject(this, thread, value); 2023 } 2024 ForceEarlyReturnInt_jvmtiEnv2025 jvmtiError ForceEarlyReturnInt(jthread thread, 2026 jint value) { 2027 return functions->ForceEarlyReturnInt(this, thread, value); 2028 } 2029 ForceEarlyReturnLong_jvmtiEnv2030 jvmtiError ForceEarlyReturnLong(jthread thread, 2031 jlong value) { 2032 return functions->ForceEarlyReturnLong(this, thread, value); 2033 } 2034 ForceEarlyReturnFloat_jvmtiEnv2035 jvmtiError ForceEarlyReturnFloat(jthread thread, 2036 jfloat value) { 2037 return functions->ForceEarlyReturnFloat(this, thread, value); 2038 } 2039 ForceEarlyReturnDouble_jvmtiEnv2040 jvmtiError ForceEarlyReturnDouble(jthread thread, 2041 jdouble value) { 2042 return functions->ForceEarlyReturnDouble(this, thread, value); 2043 } 2044 ForceEarlyReturnVoid_jvmtiEnv2045 jvmtiError ForceEarlyReturnVoid(jthread thread) { 2046 return functions->ForceEarlyReturnVoid(this, thread); 2047 } 2048 FollowReferences_jvmtiEnv2049 jvmtiError FollowReferences(jint heap_filter, 2050 jclass klass, 2051 jobject initial_object, 2052 const jvmtiHeapCallbacks* callbacks, 2053 const void* user_data) { 2054 return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data); 2055 } 2056 IterateThroughHeap_jvmtiEnv2057 jvmtiError IterateThroughHeap(jint heap_filter, 2058 jclass klass, 2059 const jvmtiHeapCallbacks* callbacks, 2060 const void* user_data) { 2061 return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data); 2062 } 2063 GetTag_jvmtiEnv2064 jvmtiError GetTag(jobject object, 2065 jlong* tag_ptr) { 2066 return functions->GetTag(this, object, tag_ptr); 2067 } 2068 SetTag_jvmtiEnv2069 jvmtiError SetTag(jobject object, 2070 jlong tag) { 2071 return functions->SetTag(this, object, tag); 2072 } 2073 GetObjectsWithTags_jvmtiEnv2074 jvmtiError GetObjectsWithTags(jint tag_count, 2075 const jlong* tags, 2076 jint* count_ptr, 2077 jobject** object_result_ptr, 2078 jlong** tag_result_ptr) { 2079 return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr); 2080 } 2081 ForceGarbageCollection_jvmtiEnv2082 jvmtiError ForceGarbageCollection() { 2083 return functions->ForceGarbageCollection(this); 2084 } 2085 IterateOverObjectsReachableFromObject_jvmtiEnv2086 jvmtiError IterateOverObjectsReachableFromObject(jobject object, 2087 jvmtiObjectReferenceCallback object_reference_callback, 2088 const void* user_data) { 2089 return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data); 2090 } 2091 IterateOverReachableObjects_jvmtiEnv2092 jvmtiError IterateOverReachableObjects(jvmtiHeapRootCallback heap_root_callback, 2093 jvmtiStackReferenceCallback stack_ref_callback, 2094 jvmtiObjectReferenceCallback object_ref_callback, 2095 const void* user_data) { 2096 return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data); 2097 } 2098 IterateOverHeap_jvmtiEnv2099 jvmtiError IterateOverHeap(jvmtiHeapObjectFilter object_filter, 2100 jvmtiHeapObjectCallback heap_object_callback, 2101 const void* user_data) { 2102 return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data); 2103 } 2104 IterateOverInstancesOfClass_jvmtiEnv2105 jvmtiError IterateOverInstancesOfClass(jclass klass, 2106 jvmtiHeapObjectFilter object_filter, 2107 jvmtiHeapObjectCallback heap_object_callback, 2108 const void* user_data) { 2109 return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data); 2110 } 2111 GetLocalObject_jvmtiEnv2112 jvmtiError GetLocalObject(jthread thread, 2113 jint depth, 2114 jint slot, 2115 jobject* value_ptr) { 2116 return functions->GetLocalObject(this, thread, depth, slot, value_ptr); 2117 } 2118 GetLocalInstance_jvmtiEnv2119 jvmtiError GetLocalInstance(jthread thread, 2120 jint depth, 2121 jobject* value_ptr) { 2122 return functions->GetLocalInstance(this, thread, depth, value_ptr); 2123 } 2124 GetLocalInt_jvmtiEnv2125 jvmtiError GetLocalInt(jthread thread, 2126 jint depth, 2127 jint slot, 2128 jint* value_ptr) { 2129 return functions->GetLocalInt(this, thread, depth, slot, value_ptr); 2130 } 2131 GetLocalLong_jvmtiEnv2132 jvmtiError GetLocalLong(jthread thread, 2133 jint depth, 2134 jint slot, 2135 jlong* value_ptr) { 2136 return functions->GetLocalLong(this, thread, depth, slot, value_ptr); 2137 } 2138 GetLocalFloat_jvmtiEnv2139 jvmtiError GetLocalFloat(jthread thread, 2140 jint depth, 2141 jint slot, 2142 jfloat* value_ptr) { 2143 return functions->GetLocalFloat(this, thread, depth, slot, value_ptr); 2144 } 2145 GetLocalDouble_jvmtiEnv2146 jvmtiError GetLocalDouble(jthread thread, 2147 jint depth, 2148 jint slot, 2149 jdouble* value_ptr) { 2150 return functions->GetLocalDouble(this, thread, depth, slot, value_ptr); 2151 } 2152 SetLocalObject_jvmtiEnv2153 jvmtiError SetLocalObject(jthread thread, 2154 jint depth, 2155 jint slot, 2156 jobject value) { 2157 return functions->SetLocalObject(this, thread, depth, slot, value); 2158 } 2159 SetLocalInt_jvmtiEnv2160 jvmtiError SetLocalInt(jthread thread, 2161 jint depth, 2162 jint slot, 2163 jint value) { 2164 return functions->SetLocalInt(this, thread, depth, slot, value); 2165 } 2166 SetLocalLong_jvmtiEnv2167 jvmtiError SetLocalLong(jthread thread, 2168 jint depth, 2169 jint slot, 2170 jlong value) { 2171 return functions->SetLocalLong(this, thread, depth, slot, value); 2172 } 2173 SetLocalFloat_jvmtiEnv2174 jvmtiError SetLocalFloat(jthread thread, 2175 jint depth, 2176 jint slot, 2177 jfloat value) { 2178 return functions->SetLocalFloat(this, thread, depth, slot, value); 2179 } 2180 SetLocalDouble_jvmtiEnv2181 jvmtiError SetLocalDouble(jthread thread, 2182 jint depth, 2183 jint slot, 2184 jdouble value) { 2185 return functions->SetLocalDouble(this, thread, depth, slot, value); 2186 } 2187 SetBreakpoint_jvmtiEnv2188 jvmtiError SetBreakpoint(jmethodID method, 2189 jlocation location) { 2190 return functions->SetBreakpoint(this, method, location); 2191 } 2192 ClearBreakpoint_jvmtiEnv2193 jvmtiError ClearBreakpoint(jmethodID method, 2194 jlocation location) { 2195 return functions->ClearBreakpoint(this, method, location); 2196 } 2197 SetFieldAccessWatch_jvmtiEnv2198 jvmtiError SetFieldAccessWatch(jclass klass, 2199 jfieldID field) { 2200 return functions->SetFieldAccessWatch(this, klass, field); 2201 } 2202 ClearFieldAccessWatch_jvmtiEnv2203 jvmtiError ClearFieldAccessWatch(jclass klass, 2204 jfieldID field) { 2205 return functions->ClearFieldAccessWatch(this, klass, field); 2206 } 2207 SetFieldModificationWatch_jvmtiEnv2208 jvmtiError SetFieldModificationWatch(jclass klass, 2209 jfieldID field) { 2210 return functions->SetFieldModificationWatch(this, klass, field); 2211 } 2212 ClearFieldModificationWatch_jvmtiEnv2213 jvmtiError ClearFieldModificationWatch(jclass klass, 2214 jfieldID field) { 2215 return functions->ClearFieldModificationWatch(this, klass, field); 2216 } 2217 GetAllModules_jvmtiEnv2218 jvmtiError GetAllModules(jint* module_count_ptr, 2219 jobject** modules_ptr) { 2220 return functions->GetAllModules(this, module_count_ptr, modules_ptr); 2221 } 2222 GetNamedModule_jvmtiEnv2223 jvmtiError GetNamedModule(jobject class_loader, 2224 const char* package_name, 2225 jobject* module_ptr) { 2226 return functions->GetNamedModule(this, class_loader, package_name, module_ptr); 2227 } 2228 AddModuleReads_jvmtiEnv2229 jvmtiError AddModuleReads(jobject module, 2230 jobject to_module) { 2231 return functions->AddModuleReads(this, module, to_module); 2232 } 2233 AddModuleExports_jvmtiEnv2234 jvmtiError AddModuleExports(jobject module, 2235 const char* pkg_name, 2236 jobject to_module) { 2237 return functions->AddModuleExports(this, module, pkg_name, to_module); 2238 } 2239 AddModuleOpens_jvmtiEnv2240 jvmtiError AddModuleOpens(jobject module, 2241 const char* pkg_name, 2242 jobject to_module) { 2243 return functions->AddModuleOpens(this, module, pkg_name, to_module); 2244 } 2245 AddModuleUses_jvmtiEnv2246 jvmtiError AddModuleUses(jobject module, 2247 jclass service) { 2248 return functions->AddModuleUses(this, module, service); 2249 } 2250 AddModuleProvides_jvmtiEnv2251 jvmtiError AddModuleProvides(jobject module, 2252 jclass service, 2253 jclass impl_class) { 2254 return functions->AddModuleProvides(this, module, service, impl_class); 2255 } 2256 IsModifiableModule_jvmtiEnv2257 jvmtiError IsModifiableModule(jobject module, 2258 jboolean* is_modifiable_module_ptr) { 2259 return functions->IsModifiableModule(this, module, is_modifiable_module_ptr); 2260 } 2261 GetLoadedClasses_jvmtiEnv2262 jvmtiError GetLoadedClasses(jint* class_count_ptr, 2263 jclass** classes_ptr) { 2264 return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr); 2265 } 2266 GetClassLoaderClasses_jvmtiEnv2267 jvmtiError GetClassLoaderClasses(jobject initiating_loader, 2268 jint* class_count_ptr, 2269 jclass** classes_ptr) { 2270 return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr); 2271 } 2272 GetClassSignature_jvmtiEnv2273 jvmtiError GetClassSignature(jclass klass, 2274 char** signature_ptr, 2275 char** generic_ptr) { 2276 return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr); 2277 } 2278 GetClassStatus_jvmtiEnv2279 jvmtiError GetClassStatus(jclass klass, 2280 jint* status_ptr) { 2281 return functions->GetClassStatus(this, klass, status_ptr); 2282 } 2283 GetSourceFileName_jvmtiEnv2284 jvmtiError GetSourceFileName(jclass klass, 2285 char** source_name_ptr) { 2286 return functions->GetSourceFileName(this, klass, source_name_ptr); 2287 } 2288 GetClassModifiers_jvmtiEnv2289 jvmtiError GetClassModifiers(jclass klass, 2290 jint* modifiers_ptr) { 2291 return functions->GetClassModifiers(this, klass, modifiers_ptr); 2292 } 2293 GetClassMethods_jvmtiEnv2294 jvmtiError GetClassMethods(jclass klass, 2295 jint* method_count_ptr, 2296 jmethodID** methods_ptr) { 2297 return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr); 2298 } 2299 GetClassFields_jvmtiEnv2300 jvmtiError GetClassFields(jclass klass, 2301 jint* field_count_ptr, 2302 jfieldID** fields_ptr) { 2303 return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr); 2304 } 2305 GetImplementedInterfaces_jvmtiEnv2306 jvmtiError GetImplementedInterfaces(jclass klass, 2307 jint* interface_count_ptr, 2308 jclass** interfaces_ptr) { 2309 return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr); 2310 } 2311 GetClassVersionNumbers_jvmtiEnv2312 jvmtiError GetClassVersionNumbers(jclass klass, 2313 jint* minor_version_ptr, 2314 jint* major_version_ptr) { 2315 return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr); 2316 } 2317 GetConstantPool_jvmtiEnv2318 jvmtiError GetConstantPool(jclass klass, 2319 jint* constant_pool_count_ptr, 2320 jint* constant_pool_byte_count_ptr, 2321 unsigned char** constant_pool_bytes_ptr) { 2322 return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr); 2323 } 2324 IsInterface_jvmtiEnv2325 jvmtiError IsInterface(jclass klass, 2326 jboolean* is_interface_ptr) { 2327 return functions->IsInterface(this, klass, is_interface_ptr); 2328 } 2329 IsArrayClass_jvmtiEnv2330 jvmtiError IsArrayClass(jclass klass, 2331 jboolean* is_array_class_ptr) { 2332 return functions->IsArrayClass(this, klass, is_array_class_ptr); 2333 } 2334 IsModifiableClass_jvmtiEnv2335 jvmtiError IsModifiableClass(jclass klass, 2336 jboolean* is_modifiable_class_ptr) { 2337 return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr); 2338 } 2339 GetClassLoader_jvmtiEnv2340 jvmtiError GetClassLoader(jclass klass, 2341 jobject* classloader_ptr) { 2342 return functions->GetClassLoader(this, klass, classloader_ptr); 2343 } 2344 GetSourceDebugExtension_jvmtiEnv2345 jvmtiError GetSourceDebugExtension(jclass klass, 2346 char** source_debug_extension_ptr) { 2347 return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr); 2348 } 2349 RetransformClasses_jvmtiEnv2350 jvmtiError RetransformClasses(jint class_count, 2351 const jclass* classes) { 2352 return functions->RetransformClasses(this, class_count, classes); 2353 } 2354 RedefineClasses_jvmtiEnv2355 jvmtiError RedefineClasses(jint class_count, 2356 const jvmtiClassDefinition* class_definitions) { 2357 return functions->RedefineClasses(this, class_count, class_definitions); 2358 } 2359 GetObjectSize_jvmtiEnv2360 jvmtiError GetObjectSize(jobject object, 2361 jlong* size_ptr) { 2362 return functions->GetObjectSize(this, object, size_ptr); 2363 } 2364 GetObjectHashCode_jvmtiEnv2365 jvmtiError GetObjectHashCode(jobject object, 2366 jint* hash_code_ptr) { 2367 return functions->GetObjectHashCode(this, object, hash_code_ptr); 2368 } 2369 GetObjectMonitorUsage_jvmtiEnv2370 jvmtiError GetObjectMonitorUsage(jobject object, 2371 jvmtiMonitorUsage* info_ptr) { 2372 return functions->GetObjectMonitorUsage(this, object, info_ptr); 2373 } 2374 GetFieldName_jvmtiEnv2375 jvmtiError GetFieldName(jclass klass, 2376 jfieldID field, 2377 char** name_ptr, 2378 char** signature_ptr, 2379 char** generic_ptr) { 2380 return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr); 2381 } 2382 GetFieldDeclaringClass_jvmtiEnv2383 jvmtiError GetFieldDeclaringClass(jclass klass, 2384 jfieldID field, 2385 jclass* declaring_class_ptr) { 2386 return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr); 2387 } 2388 GetFieldModifiers_jvmtiEnv2389 jvmtiError GetFieldModifiers(jclass klass, 2390 jfieldID field, 2391 jint* modifiers_ptr) { 2392 return functions->GetFieldModifiers(this, klass, field, modifiers_ptr); 2393 } 2394 IsFieldSynthetic_jvmtiEnv2395 jvmtiError IsFieldSynthetic(jclass klass, 2396 jfieldID field, 2397 jboolean* is_synthetic_ptr) { 2398 return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr); 2399 } 2400 GetMethodName_jvmtiEnv2401 jvmtiError GetMethodName(jmethodID method, 2402 char** name_ptr, 2403 char** signature_ptr, 2404 char** generic_ptr) { 2405 return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr); 2406 } 2407 GetMethodDeclaringClass_jvmtiEnv2408 jvmtiError GetMethodDeclaringClass(jmethodID method, 2409 jclass* declaring_class_ptr) { 2410 return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr); 2411 } 2412 GetMethodModifiers_jvmtiEnv2413 jvmtiError GetMethodModifiers(jmethodID method, 2414 jint* modifiers_ptr) { 2415 return functions->GetMethodModifiers(this, method, modifiers_ptr); 2416 } 2417 GetMaxLocals_jvmtiEnv2418 jvmtiError GetMaxLocals(jmethodID method, 2419 jint* max_ptr) { 2420 return functions->GetMaxLocals(this, method, max_ptr); 2421 } 2422 GetArgumentsSize_jvmtiEnv2423 jvmtiError GetArgumentsSize(jmethodID method, 2424 jint* size_ptr) { 2425 return functions->GetArgumentsSize(this, method, size_ptr); 2426 } 2427 GetLineNumberTable_jvmtiEnv2428 jvmtiError GetLineNumberTable(jmethodID method, 2429 jint* entry_count_ptr, 2430 jvmtiLineNumberEntry** table_ptr) { 2431 return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr); 2432 } 2433 GetMethodLocation_jvmtiEnv2434 jvmtiError GetMethodLocation(jmethodID method, 2435 jlocation* start_location_ptr, 2436 jlocation* end_location_ptr) { 2437 return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr); 2438 } 2439 GetLocalVariableTable_jvmtiEnv2440 jvmtiError GetLocalVariableTable(jmethodID method, 2441 jint* entry_count_ptr, 2442 jvmtiLocalVariableEntry** table_ptr) { 2443 return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr); 2444 } 2445 GetBytecodes_jvmtiEnv2446 jvmtiError GetBytecodes(jmethodID method, 2447 jint* bytecode_count_ptr, 2448 unsigned char** bytecodes_ptr) { 2449 return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr); 2450 } 2451 IsMethodNative_jvmtiEnv2452 jvmtiError IsMethodNative(jmethodID method, 2453 jboolean* is_native_ptr) { 2454 return functions->IsMethodNative(this, method, is_native_ptr); 2455 } 2456 IsMethodSynthetic_jvmtiEnv2457 jvmtiError IsMethodSynthetic(jmethodID method, 2458 jboolean* is_synthetic_ptr) { 2459 return functions->IsMethodSynthetic(this, method, is_synthetic_ptr); 2460 } 2461 IsMethodObsolete_jvmtiEnv2462 jvmtiError IsMethodObsolete(jmethodID method, 2463 jboolean* is_obsolete_ptr) { 2464 return functions->IsMethodObsolete(this, method, is_obsolete_ptr); 2465 } 2466 SetNativeMethodPrefix_jvmtiEnv2467 jvmtiError SetNativeMethodPrefix(const char* prefix) { 2468 return functions->SetNativeMethodPrefix(this, prefix); 2469 } 2470 SetNativeMethodPrefixes_jvmtiEnv2471 jvmtiError SetNativeMethodPrefixes(jint prefix_count, 2472 char** prefixes) { 2473 return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes); 2474 } 2475 CreateRawMonitor_jvmtiEnv2476 jvmtiError CreateRawMonitor(const char* name, 2477 jrawMonitorID* monitor_ptr) { 2478 return functions->CreateRawMonitor(this, name, monitor_ptr); 2479 } 2480 DestroyRawMonitor_jvmtiEnv2481 jvmtiError DestroyRawMonitor(jrawMonitorID monitor) { 2482 return functions->DestroyRawMonitor(this, monitor); 2483 } 2484 RawMonitorEnter_jvmtiEnv2485 jvmtiError RawMonitorEnter(jrawMonitorID monitor) { 2486 return functions->RawMonitorEnter(this, monitor); 2487 } 2488 RawMonitorExit_jvmtiEnv2489 jvmtiError RawMonitorExit(jrawMonitorID monitor) { 2490 return functions->RawMonitorExit(this, monitor); 2491 } 2492 RawMonitorWait_jvmtiEnv2493 jvmtiError RawMonitorWait(jrawMonitorID monitor, 2494 jlong millis) { 2495 return functions->RawMonitorWait(this, monitor, millis); 2496 } 2497 RawMonitorNotify_jvmtiEnv2498 jvmtiError RawMonitorNotify(jrawMonitorID monitor) { 2499 return functions->RawMonitorNotify(this, monitor); 2500 } 2501 RawMonitorNotifyAll_jvmtiEnv2502 jvmtiError RawMonitorNotifyAll(jrawMonitorID monitor) { 2503 return functions->RawMonitorNotifyAll(this, monitor); 2504 } 2505 SetJNIFunctionTable_jvmtiEnv2506 jvmtiError SetJNIFunctionTable(const jniNativeInterface* function_table) { 2507 return functions->SetJNIFunctionTable(this, function_table); 2508 } 2509 GetJNIFunctionTable_jvmtiEnv2510 jvmtiError GetJNIFunctionTable(jniNativeInterface** function_table) { 2511 return functions->GetJNIFunctionTable(this, function_table); 2512 } 2513 SetEventCallbacks_jvmtiEnv2514 jvmtiError SetEventCallbacks(const jvmtiEventCallbacks* callbacks, 2515 jint size_of_callbacks) { 2516 return functions->SetEventCallbacks(this, callbacks, size_of_callbacks); 2517 } 2518 SetEventNotificationMode_jvmtiEnv2519 jvmtiError SetEventNotificationMode(jvmtiEventMode mode, 2520 jvmtiEvent event_type, 2521 jthread event_thread, 2522 ...) { 2523 return functions->SetEventNotificationMode(this, mode, event_type, event_thread); 2524 } 2525 GenerateEvents_jvmtiEnv2526 jvmtiError GenerateEvents(jvmtiEvent event_type) { 2527 return functions->GenerateEvents(this, event_type); 2528 } 2529 GetExtensionFunctions_jvmtiEnv2530 jvmtiError GetExtensionFunctions(jint* extension_count_ptr, 2531 jvmtiExtensionFunctionInfo** extensions) { 2532 return functions->GetExtensionFunctions(this, extension_count_ptr, extensions); 2533 } 2534 GetExtensionEvents_jvmtiEnv2535 jvmtiError GetExtensionEvents(jint* extension_count_ptr, 2536 jvmtiExtensionEventInfo** extensions) { 2537 return functions->GetExtensionEvents(this, extension_count_ptr, extensions); 2538 } 2539 SetExtensionEventCallback_jvmtiEnv2540 jvmtiError SetExtensionEventCallback(jint extension_event_index, 2541 jvmtiExtensionEvent callback) { 2542 return functions->SetExtensionEventCallback(this, extension_event_index, callback); 2543 } 2544 GetPotentialCapabilities_jvmtiEnv2545 jvmtiError GetPotentialCapabilities(jvmtiCapabilities* capabilities_ptr) { 2546 return functions->GetPotentialCapabilities(this, capabilities_ptr); 2547 } 2548 AddCapabilities_jvmtiEnv2549 jvmtiError AddCapabilities(const jvmtiCapabilities* capabilities_ptr) { 2550 return functions->AddCapabilities(this, capabilities_ptr); 2551 } 2552 RelinquishCapabilities_jvmtiEnv2553 jvmtiError RelinquishCapabilities(const jvmtiCapabilities* capabilities_ptr) { 2554 return functions->RelinquishCapabilities(this, capabilities_ptr); 2555 } 2556 GetCapabilities_jvmtiEnv2557 jvmtiError GetCapabilities(jvmtiCapabilities* capabilities_ptr) { 2558 return functions->GetCapabilities(this, capabilities_ptr); 2559 } 2560 GetCurrentThreadCpuTimerInfo_jvmtiEnv2561 jvmtiError GetCurrentThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { 2562 return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr); 2563 } 2564 GetCurrentThreadCpuTime_jvmtiEnv2565 jvmtiError GetCurrentThreadCpuTime(jlong* nanos_ptr) { 2566 return functions->GetCurrentThreadCpuTime(this, nanos_ptr); 2567 } 2568 GetThreadCpuTimerInfo_jvmtiEnv2569 jvmtiError GetThreadCpuTimerInfo(jvmtiTimerInfo* info_ptr) { 2570 return functions->GetThreadCpuTimerInfo(this, info_ptr); 2571 } 2572 GetThreadCpuTime_jvmtiEnv2573 jvmtiError GetThreadCpuTime(jthread thread, 2574 jlong* nanos_ptr) { 2575 return functions->GetThreadCpuTime(this, thread, nanos_ptr); 2576 } 2577 GetTimerInfo_jvmtiEnv2578 jvmtiError GetTimerInfo(jvmtiTimerInfo* info_ptr) { 2579 return functions->GetTimerInfo(this, info_ptr); 2580 } 2581 GetTime_jvmtiEnv2582 jvmtiError GetTime(jlong* nanos_ptr) { 2583 return functions->GetTime(this, nanos_ptr); 2584 } 2585 GetAvailableProcessors_jvmtiEnv2586 jvmtiError GetAvailableProcessors(jint* processor_count_ptr) { 2587 return functions->GetAvailableProcessors(this, processor_count_ptr); 2588 } 2589 AddToBootstrapClassLoaderSearch_jvmtiEnv2590 jvmtiError AddToBootstrapClassLoaderSearch(const char* segment) { 2591 return functions->AddToBootstrapClassLoaderSearch(this, segment); 2592 } 2593 AddToSystemClassLoaderSearch_jvmtiEnv2594 jvmtiError AddToSystemClassLoaderSearch(const char* segment) { 2595 return functions->AddToSystemClassLoaderSearch(this, segment); 2596 } 2597 GetSystemProperties_jvmtiEnv2598 jvmtiError GetSystemProperties(jint* count_ptr, 2599 char*** property_ptr) { 2600 return functions->GetSystemProperties(this, count_ptr, property_ptr); 2601 } 2602 GetSystemProperty_jvmtiEnv2603 jvmtiError GetSystemProperty(const char* property, 2604 char** value_ptr) { 2605 return functions->GetSystemProperty(this, property, value_ptr); 2606 } 2607 SetSystemProperty_jvmtiEnv2608 jvmtiError SetSystemProperty(const char* property, 2609 const char* value_ptr) { 2610 return functions->SetSystemProperty(this, property, value_ptr); 2611 } 2612 GetPhase_jvmtiEnv2613 jvmtiError GetPhase(jvmtiPhase* phase_ptr) { 2614 return functions->GetPhase(this, phase_ptr); 2615 } 2616 DisposeEnvironment_jvmtiEnv2617 jvmtiError DisposeEnvironment() { 2618 return functions->DisposeEnvironment(this); 2619 } 2620 SetEnvironmentLocalStorage_jvmtiEnv2621 jvmtiError SetEnvironmentLocalStorage(const void* data) { 2622 return functions->SetEnvironmentLocalStorage(this, data); 2623 } 2624 GetEnvironmentLocalStorage_jvmtiEnv2625 jvmtiError GetEnvironmentLocalStorage(void** data_ptr) { 2626 return functions->GetEnvironmentLocalStorage(this, data_ptr); 2627 } 2628 GetVersionNumber_jvmtiEnv2629 jvmtiError GetVersionNumber(jint* version_ptr) { 2630 return functions->GetVersionNumber(this, version_ptr); 2631 } 2632 GetErrorName_jvmtiEnv2633 jvmtiError GetErrorName(jvmtiError error, 2634 char** name_ptr) { 2635 return functions->GetErrorName(this, error, name_ptr); 2636 } 2637 SetVerboseFlag_jvmtiEnv2638 jvmtiError SetVerboseFlag(jvmtiVerboseFlag flag, 2639 jboolean value) { 2640 return functions->SetVerboseFlag(this, flag, value); 2641 } 2642 GetJLocationFormat_jvmtiEnv2643 jvmtiError GetJLocationFormat(jvmtiJlocationFormat* format_ptr) { 2644 return functions->GetJLocationFormat(this, format_ptr); 2645 } 2646 SetHeapSamplingInterval_jvmtiEnv2647 jvmtiError SetHeapSamplingInterval(jint sampling_interval) { 2648 return functions->SetHeapSamplingInterval(this, sampling_interval); 2649 } 2650 2651 #endif /* __cplusplus */ 2652 }; 2653 2654 2655 #ifdef __cplusplus 2656 } /* extern "C" */ 2657 #endif /* __cplusplus */ 2658 2659 #endif /* !_JAVA_JVMTI_H_ */ 2660