jvmti.h 63 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279
  1. /*******************************************************************************
  2. * Licensed Materials - Property of IBM
  3. * "Restricted Materials of IBM"
  4. *
  5. * (c) Copyright IBM Corp. 1991, 2015 All Rights Reserved
  6. *
  7. * US Government Users Restricted Rights - Use, duplication or disclosure
  8. * restricted by GSA ADP Schedule Contract with IBM Corp.
  9. *******************************************************************************/
  10. #ifndef jvmti_h
  11. #define jvmti_h
  12. #include "jni.h"
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM * vm, char * options, void * reserved);
  17. JNIEXPORT void JNICALL Agent_OnUnload(JavaVM * vm);
  18. JNIEXPORT jint JNICALL Agent_OnAttach(JavaVM* vm, char *options, void *reserved);
  19. /*
  20. *-----------------------------------------------------------------------------
  21. * JVMTI constants
  22. *-----------------------------------------------------------------------------
  23. */
  24. #define JVMTI_VERSION_1_0 0x30010000
  25. #define JVMTI_VERSION_1_1 0x30010100
  26. #define JVMTI_VERSION_1_2 0x30010200
  27. #define JVMTI_VERSION_1 (JVMTI_VERSION_1_0)
  28. #define JVMTI_1_0_SPEC_VERSION (JVMTI_VERSION_1_0 + 37) /* Spec version is 1.0.37 */
  29. #define JVMTI_1_1_SPEC_VERSION (JVMTI_VERSION_1_1 + 102) /* Spec version is 1.1.102 */
  30. #define JVMTI_1_2_SPEC_VERSION (JVMTI_VERSION_1_2 + 1) /* Spec version is 1.2.1 */
  31. #define JVMTI_VERSION (JVMTI_VERSION_1_2 + 3) /* Spec version is 1.2.3 */
  32. #define JVMTI_CLASS_STATUS_VERIFIED 0x00000001
  33. #define JVMTI_CLASS_STATUS_PREPARED 0x00000002
  34. #define JVMTI_CLASS_STATUS_INITIALIZED 0x00000004
  35. #define JVMTI_CLASS_STATUS_ERROR 0x00000008
  36. #define JVMTI_CLASS_STATUS_ARRAY 0x00000010
  37. #define JVMTI_CLASS_STATUS_PRIMITIVE 0x00000020
  38. #define JVMTI_THREAD_MIN_PRIORITY 1
  39. #define JVMTI_THREAD_NORM_PRIORITY 5
  40. #define JVMTI_THREAD_MAX_PRIORITY 10
  41. #define JVMTI_THREAD_STATE_ALIVE 0x00000001
  42. #define JVMTI_THREAD_STATE_TERMINATED 0x00000002
  43. #define JVMTI_THREAD_STATE_RUNNABLE 0x00000004
  44. #define JVMTI_THREAD_STATE_WAITING_INDEFINITELY 0x00000010
  45. #define JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT 0x00000020
  46. #define JVMTI_THREAD_STATE_SLEEPING 0x00000040
  47. #define JVMTI_THREAD_STATE_WAITING 0x00000080
  48. #define JVMTI_THREAD_STATE_IN_OBJECT_WAIT 0x00000100
  49. #define JVMTI_THREAD_STATE_PARKED 0x00000200
  50. #define JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER 0x00000400
  51. #define JVMTI_THREAD_STATE_SUSPENDED 0x00100000
  52. #define JVMTI_THREAD_STATE_INTERRUPTED 0x00200000
  53. #define JVMTI_THREAD_STATE_IN_NATIVE 0x00400000
  54. #define JVMTI_THREAD_STATE_VENDOR_1 0x10000000
  55. #define JVMTI_THREAD_STATE_VENDOR_2 0x20000000
  56. #define JVMTI_THREAD_STATE_VENDOR_3 0x40000000
  57. #define JVMTI_JAVA_LANG_THREAD_STATE_MASK \
  58. JVMTI_THREAD_STATE_TERMINATED \
  59. | JVMTI_THREAD_STATE_ALIVE \
  60. | JVMTI_THREAD_STATE_RUNNABLE \
  61. | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER \
  62. | JVMTI_THREAD_STATE_WAITING \
  63. | JVMTI_THREAD_STATE_WAITING_INDEFINITELY \
  64. | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
  65. #define JVMTI_JAVA_LANG_THREAD_STATE_NEW 0
  66. #define JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED \
  67. JVMTI_THREAD_STATE_TERMINATED
  68. #define JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE \
  69. JVMTI_THREAD_STATE_ALIVE \
  70. | JVMTI_THREAD_STATE_RUNNABLE
  71. #define JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED \
  72. JVMTI_THREAD_STATE_ALIVE \
  73. | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER
  74. #define JVMTI_JAVA_LANG_THREAD_STATE_WAITING \
  75. JVMTI_THREAD_STATE_ALIVE \
  76. | JVMTI_THREAD_STATE_WAITING \
  77. | JVMTI_THREAD_STATE_WAITING_INDEFINITELY
  78. #define JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING \
  79. JVMTI_THREAD_STATE_ALIVE \
  80. | JVMTI_THREAD_STATE_WAITING \
  81. | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
  82. #define JVMTI_VERSION_INTERFACE_JNI 0x00000000
  83. #define JVMTI_VERSION_INTERFACE_JVMTI 0x30000000
  84. #define JVMTI_VERSION_MASK_INTERFACE_TYPE 0x70000000
  85. #define JVMTI_VERSION_MASK_MAJOR 0x0FFF0000
  86. #define JVMTI_VERSION_MASK_MINOR 0x0000FF00
  87. #define JVMTI_VERSION_MASK_MICRO 0x000000FF
  88. #define JVMTI_VERSION_SHIFT_MAJOR 16
  89. #define JVMTI_VERSION_SHIFT_MINOR 8
  90. #define JVMTI_VERSION_SHIFT_MICRO 0
  91. #define JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR 1
  92. #define JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP 2
  93. #define JVMTI_RESOURCE_EXHAUSTED_THREADS 4
  94. /*
  95. *-----------------------------------------------------------------------------
  96. * JVMTI enumerations
  97. *-----------------------------------------------------------------------------
  98. */
  99. typedef enum jvmtiEventMode {
  100. JVMTI_ENABLE = 1,
  101. JVMTI_DISABLE = 0,
  102. jvmtiEventModeEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  103. } jvmtiEventMode;
  104. typedef enum jvmtiHeapObjectFilter {
  105. JVMTI_HEAP_OBJECT_TAGGED = 1,
  106. JVMTI_HEAP_OBJECT_UNTAGGED = 2,
  107. JVMTI_HEAP_OBJECT_EITHER = 3,
  108. jvmtiHeapObjectFilterEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  109. } jvmtiHeapObjectFilter;
  110. typedef enum jvmtiHeapRootKind {
  111. JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
  112. JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
  113. JVMTI_HEAP_ROOT_MONITOR = 3,
  114. JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
  115. JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
  116. JVMTI_HEAP_ROOT_THREAD = 6,
  117. JVMTI_HEAP_ROOT_OTHER = 7,
  118. jvmtiHeapRootKindEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  119. } jvmtiHeapRootKind;
  120. typedef enum jvmtiIterationControl {
  121. JVMTI_ITERATION_CONTINUE = 1,
  122. JVMTI_ITERATION_IGNORE = 2,
  123. JVMTI_ITERATION_ABORT = 0,
  124. jvmtiIterationControlEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  125. } jvmtiIterationControl;
  126. typedef enum jvmtiJlocationFormat {
  127. JVMTI_JLOCATION_JVMBCI = 1,
  128. JVMTI_JLOCATION_MACHINEPC = 2,
  129. JVMTI_JLOCATION_OTHER = 0,
  130. jvmtiJlocationFormatEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  131. } jvmtiJlocationFormat;
  132. typedef enum jvmtiObjectReferenceKind {
  133. JVMTI_REFERENCE_CLASS = 1,
  134. JVMTI_REFERENCE_FIELD = 2,
  135. JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
  136. JVMTI_REFERENCE_CLASS_LOADER = 4,
  137. JVMTI_REFERENCE_SIGNERS = 5,
  138. JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
  139. JVMTI_REFERENCE_INTERFACE = 7,
  140. JVMTI_REFERENCE_STATIC_FIELD = 8,
  141. JVMTI_REFERENCE_CONSTANT_POOL = 9,
  142. jvmtiObjectReferenceKindEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  143. } jvmtiObjectReferenceKind;
  144. typedef enum jvmtiParamKind {
  145. JVMTI_KIND_IN = 91,
  146. JVMTI_KIND_IN_PTR = 92,
  147. JVMTI_KIND_IN_BUF = 93,
  148. JVMTI_KIND_ALLOC_BUF = 94,
  149. JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
  150. JVMTI_KIND_OUT = 96,
  151. JVMTI_KIND_OUT_BUF = 97,
  152. jvmtiParamKindEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  153. } jvmtiParamKind;
  154. typedef enum jvmtiParamTypes {
  155. JVMTI_TYPE_JBYTE = 101,
  156. JVMTI_TYPE_JCHAR = 102,
  157. JVMTI_TYPE_JSHORT = 103,
  158. JVMTI_TYPE_JINT = 104,
  159. JVMTI_TYPE_JLONG = 105,
  160. JVMTI_TYPE_JFLOAT = 106,
  161. JVMTI_TYPE_JDOUBLE = 107,
  162. JVMTI_TYPE_JBOOLEAN = 108,
  163. JVMTI_TYPE_JOBJECT = 109,
  164. JVMTI_TYPE_JTHREAD = 110,
  165. JVMTI_TYPE_JCLASS = 111,
  166. JVMTI_TYPE_JVALUE = 112,
  167. JVMTI_TYPE_JFIELDID = 113,
  168. JVMTI_TYPE_JMETHODID = 114,
  169. JVMTI_TYPE_CCHAR = 115,
  170. JVMTI_TYPE_CVOID = 116,
  171. JVMTI_TYPE_JNIENV = 117,
  172. jvmtiParamTypesEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  173. } jvmtiParamTypes;
  174. typedef enum jvmtiPhase {
  175. JVMTI_PHASE_ONLOAD = 1,
  176. JVMTI_PHASE_PRIMORDIAL = 2,
  177. JVMTI_PHASE_LIVE = 4,
  178. JVMTI_PHASE_START = 6,
  179. JVMTI_PHASE_DEAD = 8,
  180. jvmtiPhaseEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  181. } jvmtiPhase;
  182. typedef enum jvmtiTimerKind {
  183. JVMTI_TIMER_USER_CPU = 30,
  184. JVMTI_TIMER_TOTAL_CPU = 31,
  185. JVMTI_TIMER_ELAPSED = 32,
  186. jvmtiTimerKindEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  187. } jvmtiTimerKind;
  188. typedef enum jvmtiVerboseFlag {
  189. JVMTI_VERBOSE_OTHER = 0,
  190. JVMTI_VERBOSE_GC = 1,
  191. JVMTI_VERBOSE_CLASS = 2,
  192. JVMTI_VERBOSE_JNI = 4,
  193. jvmtiVerboseFlagEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  194. } jvmtiVerboseFlag;
  195. #define JVMTI_HEAP_FILTER_TAGGED 0x4
  196. #define JVMTI_HEAP_FILTER_UNTAGGED 0x8
  197. #define JVMTI_HEAP_FILTER_CLASS_TAGGED 0x10
  198. #define JVMTI_HEAP_FILTER_CLASS_UNTAGGED 0x20
  199. #define JVMTI_VISIT_OBJECTS 0x100
  200. #define JVMTI_VISIT_ABORT 0x8000
  201. typedef enum jvmtiHeapReferenceKind {
  202. JVMTI_HEAP_REFERENCE_CLASS = 1,
  203. JVMTI_HEAP_REFERENCE_FIELD = 2,
  204. JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3,
  205. JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4,
  206. JVMTI_HEAP_REFERENCE_SIGNERS = 5,
  207. JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6,
  208. JVMTI_HEAP_REFERENCE_INTERFACE = 7,
  209. JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8,
  210. JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9,
  211. JVMTI_HEAP_REFERENCE_SUPERCLASS = 10,
  212. JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21,
  213. JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22,
  214. JVMTI_HEAP_REFERENCE_MONITOR = 23,
  215. JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24,
  216. JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25,
  217. JVMTI_HEAP_REFERENCE_THREAD = 26,
  218. JVMTI_HEAP_REFERENCE_OTHER = 27,
  219. jvmtiHeapReferenceKindEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  220. } jvmtiHeapReferenceKind;
  221. typedef enum jvmtiPrimitiveType {
  222. JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90,
  223. JVMTI_PRIMITIVE_TYPE_BYTE = 66,
  224. JVMTI_PRIMITIVE_TYPE_CHAR = 67,
  225. JVMTI_PRIMITIVE_TYPE_SHORT = 83,
  226. JVMTI_PRIMITIVE_TYPE_INT = 73,
  227. JVMTI_PRIMITIVE_TYPE_LONG = 74,
  228. JVMTI_PRIMITIVE_TYPE_FLOAT = 70,
  229. JVMTI_PRIMITIVE_TYPE_DOUBLE = 68,
  230. jvmtiPrimitiveTypeEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  231. } jvmtiPrimitiveType;
  232. /*
  233. *-----------------------------------------------------------------------------
  234. * JVMTI error codes
  235. *-----------------------------------------------------------------------------
  236. */
  237. typedef enum jvmtiError {
  238. JVMTI_ERROR_NONE = 0,
  239. JVMTI_ERROR_INVALID_THREAD = 10,
  240. JVMTI_ERROR_INVALID_THREAD_GROUP = 11,
  241. JVMTI_ERROR_INVALID_PRIORITY = 12,
  242. JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13,
  243. JVMTI_ERROR_THREAD_SUSPENDED = 14,
  244. JVMTI_ERROR_THREAD_NOT_ALIVE = 15,
  245. JVMTI_ERROR_INVALID_OBJECT = 20,
  246. JVMTI_ERROR_INVALID_CLASS = 21,
  247. JVMTI_ERROR_CLASS_NOT_PREPARED = 22,
  248. JVMTI_ERROR_INVALID_METHODID = 23,
  249. JVMTI_ERROR_INVALID_LOCATION = 24,
  250. JVMTI_ERROR_INVALID_FIELDID = 25,
  251. JVMTI_ERROR_NO_MORE_FRAMES = 31,
  252. JVMTI_ERROR_OPAQUE_FRAME = 32,
  253. JVMTI_ERROR_TYPE_MISMATCH = 34,
  254. JVMTI_ERROR_INVALID_SLOT = 35,
  255. JVMTI_ERROR_DUPLICATE = 40,
  256. JVMTI_ERROR_NOT_FOUND = 41,
  257. JVMTI_ERROR_INVALID_MONITOR = 50,
  258. JVMTI_ERROR_NOT_MONITOR_OWNER = 51,
  259. JVMTI_ERROR_INTERRUPT = 52,
  260. JVMTI_ERROR_INVALID_CLASS_FORMAT = 60,
  261. JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61,
  262. JVMTI_ERROR_FAILS_VERIFICATION = 62,
  263. JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63,
  264. JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64,
  265. JVMTI_ERROR_INVALID_TYPESTATE = 65,
  266. JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66,
  267. JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67,
  268. JVMTI_ERROR_UNSUPPORTED_VERSION = 68,
  269. JVMTI_ERROR_NAMES_DONT_MATCH = 69,
  270. JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
  271. JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71,
  272. JVMTI_ERROR_UNMODIFIABLE_CLASS = 79,
  273. JVMTI_ERROR_NOT_AVAILABLE = 98,
  274. JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
  275. JVMTI_ERROR_NULL_POINTER = 100,
  276. JVMTI_ERROR_ABSENT_INFORMATION = 101,
  277. JVMTI_ERROR_INVALID_EVENT_TYPE = 102,
  278. JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
  279. JVMTI_ERROR_NATIVE_METHOD = 104,
  280. JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106,
  281. JVMTI_ERROR_OUT_OF_MEMORY = 110,
  282. JVMTI_ERROR_ACCESS_DENIED = 111,
  283. JVMTI_ERROR_WRONG_PHASE = 112,
  284. JVMTI_ERROR_INTERNAL = 113,
  285. JVMTI_ERROR_UNATTACHED_THREAD = 115,
  286. JVMTI_ERROR_INVALID_ENVIRONMENT = 116,
  287. JVMTI_ERROR_MAX = 116,
  288. jvmtiErrorEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  289. } jvmtiError;
  290. /*
  291. *-----------------------------------------------------------------------------
  292. * JVMTI base types
  293. *-----------------------------------------------------------------------------
  294. */
  295. typedef jobject jthread;
  296. typedef jobject jthreadGroup;
  297. typedef jlong jlocation;
  298. /* hidden type */
  299. struct _jrawMonitorID;
  300. typedef struct _jrawMonitorID *jrawMonitorID;
  301. typedef struct JNINativeInterface_ jniNativeInterface;
  302. struct _jvmtiEnv;
  303. struct JVMTINativeInterface_;
  304. #ifdef __cplusplus
  305. typedef _jvmtiEnv jvmtiEnv;
  306. #else
  307. typedef const struct JVMTINativeInterface_ * jvmtiEnv;
  308. #endif
  309. typedef void (JNICALL *jvmtiExtensionEvent)
  310. (jvmtiEnv *jvmti_env, ...);
  311. typedef jvmtiError (JNICALL *jvmtiExtensionFunction)
  312. (jvmtiEnv *jvmti_env, ...);
  313. typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
  314. (jlong class_tag, jlong size, jlong *tag_ptr,
  315. void *user_data);
  316. typedef jvmtiIterationControl (JNICALL *jvmtiHeapRootCallback)
  317. (jvmtiHeapRootKind root_kind,
  318. jlong class_tag, jlong size, jlong *tag_ptr,
  319. void *user_data);
  320. typedef jvmtiIterationControl (JNICALL *jvmtiObjectReferenceCallback)
  321. (jvmtiObjectReferenceKind reference_kind,
  322. jlong class_tag, jlong size, jlong *tag_ptr,
  323. jlong referrer_tag, jint referrer_index,
  324. void *user_data);
  325. typedef jvmtiIterationControl (JNICALL *jvmtiStackReferenceCallback)
  326. (jvmtiHeapRootKind root_kind,
  327. jlong class_tag, jlong size, jlong *tag_ptr,
  328. jlong thread_tag, jint depth, jmethodID method, jint slot,
  329. void *user_data);
  330. typedef void (JNICALL *jvmtiStartFunction)
  331. (jvmtiEnv *jvmti_env, JNIEnv *jni_env, void *arg);
  332. typedef struct jvmtiFrameInfo {
  333. jmethodID method;
  334. jlocation location;
  335. } jvmtiFrameInfo;
  336. typedef struct jvmtiStackInfo {
  337. jthread thread;
  338. jint state;
  339. jvmtiFrameInfo* frame_buffer;
  340. jint frame_count;
  341. } jvmtiStackInfo;
  342. typedef struct jvmtiAddrLocationMap {
  343. const void *start_address;
  344. jlocation location;
  345. } jvmtiAddrLocationMap;
  346. typedef struct {
  347. unsigned int can_tag_objects : 1;
  348. unsigned int can_generate_field_modification_events : 1;
  349. unsigned int can_generate_field_access_events : 1;
  350. unsigned int can_get_bytecodes : 1;
  351. unsigned int can_get_synthetic_attribute : 1;
  352. unsigned int can_get_owned_monitor_info : 1;
  353. unsigned int can_get_current_contended_monitor : 1;
  354. unsigned int can_get_monitor_info : 1;
  355. unsigned int can_pop_frame : 1;
  356. unsigned int can_redefine_classes : 1;
  357. unsigned int can_signal_thread : 1;
  358. unsigned int can_get_source_file_name : 1;
  359. unsigned int can_get_line_numbers : 1;
  360. unsigned int can_get_source_debug_extension : 1;
  361. unsigned int can_access_local_variables : 1;
  362. unsigned int can_maintain_original_method_order : 1;
  363. unsigned int can_generate_single_step_events : 1;
  364. unsigned int can_generate_exception_events : 1;
  365. unsigned int can_generate_frame_pop_events : 1;
  366. unsigned int can_generate_breakpoint_events : 1;
  367. unsigned int can_suspend : 1;
  368. unsigned int can_redefine_any_class : 1;
  369. unsigned int can_get_current_thread_cpu_time : 1;
  370. unsigned int can_get_thread_cpu_time : 1;
  371. unsigned int can_generate_method_entry_events : 1;
  372. unsigned int can_generate_method_exit_events : 1;
  373. unsigned int can_generate_all_class_hook_events : 1;
  374. unsigned int can_generate_compiled_method_load_events : 1;
  375. unsigned int can_generate_monitor_events : 1;
  376. unsigned int can_generate_vm_object_alloc_events : 1;
  377. unsigned int can_generate_native_method_bind_events : 1;
  378. unsigned int can_generate_garbage_collection_events : 1;
  379. unsigned int can_generate_object_free_events : 1;
  380. unsigned int can_force_early_return : 1;
  381. unsigned int can_get_owned_monitor_stack_depth_info : 1;
  382. unsigned int can_get_constant_pool : 1;
  383. unsigned int can_set_native_method_prefix : 1;
  384. unsigned int can_retransform_classes : 1;
  385. unsigned int can_retransform_any_class : 1;
  386. unsigned int can_generate_resource_exhaustion_heap_events : 1;
  387. unsigned int can_generate_resource_exhaustion_threads_events : 1;
  388. unsigned int : 5;
  389. unsigned int : 16;
  390. unsigned int : 16;
  391. unsigned int : 16;
  392. unsigned int : 16;
  393. unsigned int : 16;
  394. } jvmtiCapabilities;
  395. typedef struct jvmtiClassDefinition {
  396. jclass klass;
  397. jint class_byte_count;
  398. const unsigned char *class_bytes;
  399. } jvmtiClassDefinition;
  400. typedef struct jvmtiParamInfo {
  401. char *name;
  402. jvmtiParamKind kind;
  403. jvmtiParamTypes base_type;
  404. jboolean null_ok;
  405. } jvmtiParamInfo;
  406. typedef struct jvmtiExtensionEventInfo {
  407. jint extension_event_index;
  408. char *id;
  409. char *short_description;
  410. jint param_count;
  411. jvmtiParamInfo *params;
  412. } jvmtiExtensionEventInfo;
  413. typedef struct jvmtiExtensionFunctionInfo {
  414. jvmtiExtensionFunction func;
  415. char *id;
  416. char *short_description;
  417. jint param_count;
  418. jvmtiParamInfo *params;
  419. jint error_count;
  420. jvmtiError *errors;
  421. } jvmtiExtensionFunctionInfo;
  422. typedef struct jvmtiLineNumberEntry {
  423. jlocation start_location;
  424. jint line_number;
  425. } jvmtiLineNumberEntry;
  426. typedef struct jvmtiLocalVariableEntry {
  427. jlocation start_location;
  428. jint length;
  429. char *name;
  430. char *signature;
  431. char *generic_signature;
  432. jint slot;
  433. } jvmtiLocalVariableEntry;
  434. typedef struct jvmtiMonitorUsage {
  435. jthread owner;
  436. jint entry_count;
  437. jint waiter_count;
  438. jthread *waiters;
  439. jint notify_waiter_count;
  440. jthread *notify_waiters;
  441. } jvmtiMonitorUsage;
  442. typedef struct jvmtiThreadGroupInfo {
  443. jthreadGroup parent;
  444. char *name;
  445. jint max_priority;
  446. jboolean is_daemon;
  447. } jvmtiThreadGroupInfo;
  448. typedef struct jvmtiThreadInfo {
  449. char *name;
  450. jint priority;
  451. jboolean is_daemon;
  452. jthreadGroup thread_group;
  453. jobject context_class_loader;
  454. } jvmtiThreadInfo;
  455. typedef struct jvmtiTimerInfo {
  456. jlong max_value;
  457. jboolean may_skip_forward;
  458. jboolean may_skip_backward;
  459. jvmtiTimerKind kind;
  460. jlong reserved1;
  461. jlong reserved2;
  462. } jvmtiTimerInfo;
  463. typedef struct jvmtiMonitorStackDepthInfo {
  464. jobject monitor;
  465. jint stack_depth;
  466. } jvmtiMonitorStackDepthInfo;
  467. typedef struct jvmtiHeapReferenceInfoField {
  468. jint index;
  469. } jvmtiHeapReferenceInfoField;
  470. typedef struct jvmtiHeapReferenceInfoArray {
  471. jint index;
  472. } jvmtiHeapReferenceInfoArray;
  473. typedef struct jvmtiHeapReferenceInfoConstantPool {
  474. jint index;
  475. } jvmtiHeapReferenceInfoConstantPool;
  476. typedef struct jvmtiHeapReferenceInfoStackLocal {
  477. jlong thread_tag;
  478. jlong thread_id;
  479. jint depth;
  480. jmethodID method;
  481. jlocation location;
  482. jint slot;
  483. } jvmtiHeapReferenceInfoStackLocal;
  484. typedef struct jvmtiHeapReferenceInfoJniLocal {
  485. jlong thread_tag;
  486. jlong thread_id;
  487. jint depth;
  488. jmethodID method;
  489. } jvmtiHeapReferenceInfoJniLocal;
  490. typedef struct jvmtiHeapReferenceInfoReserved {
  491. jlong reserved1;
  492. jlong reserved2;
  493. jlong reserved3;
  494. jlong reserved4;
  495. jlong reserved5;
  496. jlong reserved6;
  497. jlong reserved7;
  498. jlong reserved8;
  499. } jvmtiHeapReferenceInfoReserved;
  500. typedef union {
  501. jvmtiHeapReferenceInfoField field;
  502. jvmtiHeapReferenceInfoArray array;
  503. jvmtiHeapReferenceInfoConstantPool constant_pool;
  504. jvmtiHeapReferenceInfoStackLocal stack_local;
  505. jvmtiHeapReferenceInfoJniLocal jni_local;
  506. jvmtiHeapReferenceInfoReserved other;
  507. } jvmtiHeapReferenceInfo;
  508. typedef jint (JNICALL *jvmtiHeapIterationCallback)
  509. (jlong class_tag,
  510. jlong size,
  511. jlong* tag_ptr,
  512. jint length,
  513. void* user_data);
  514. typedef jint (JNICALL *jvmtiHeapReferenceCallback)
  515. (jvmtiHeapReferenceKind reference_kind,
  516. const jvmtiHeapReferenceInfo* referrer_info,
  517. jlong class_tag,
  518. jlong referrer_class_tag,
  519. jlong size,
  520. jlong* tag_ptr,
  521. jlong* referrer_tag_ptr,
  522. jint length,
  523. void* user_data);
  524. typedef jint (JNICALL *jvmtiPrimitiveFieldCallback)
  525. (jvmtiHeapReferenceKind reference_kind,
  526. const jvmtiHeapReferenceInfo* referrer_info,
  527. jlong class_tag,
  528. jlong* tag_ptr,
  529. jvalue value,
  530. jvmtiPrimitiveType value_type,
  531. void* user_data);
  532. typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback)
  533. (jlong class_tag,
  534. jlong size,
  535. jlong* tag_ptr,
  536. jint element_count,
  537. jvmtiPrimitiveType element_type,
  538. const void* elements,
  539. void* user_data);
  540. typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback)
  541. (jlong class_tag,
  542. jlong size,
  543. jlong* tag_ptr,
  544. const jchar* value,
  545. jint value_length,
  546. void* user_data);
  547. typedef jint (JNICALL *jvmtiReservedCallback)
  548. ();
  549. /**
  550. * JVMTI Heap 1.1 Callbacks
  551. */
  552. typedef struct {
  553. jvmtiHeapIterationCallback heap_iteration_callback;
  554. jvmtiHeapReferenceCallback heap_reference_callback;
  555. jvmtiPrimitiveFieldCallback primitive_field_callback;
  556. jvmtiArrayPrimitiveValueCallback array_primitive_value_callback;
  557. jvmtiStringPrimitiveValueCallback string_primitive_value_callback;
  558. jvmtiReservedCallback reserved5;
  559. jvmtiReservedCallback reserved6;
  560. jvmtiReservedCallback reserved7;
  561. jvmtiReservedCallback reserved8;
  562. jvmtiReservedCallback reserved9;
  563. jvmtiReservedCallback reserved10;
  564. jvmtiReservedCallback reserved11;
  565. jvmtiReservedCallback reserved12;
  566. jvmtiReservedCallback reserved13;
  567. jvmtiReservedCallback reserved14;
  568. jvmtiReservedCallback reserved15;
  569. } jvmtiHeapCallbacks;
  570. /*
  571. *-----------------------------------------------------------------------------
  572. * JVMTI events
  573. *-----------------------------------------------------------------------------
  574. */
  575. typedef enum jvmtiEvent {
  576. JVMTI_MIN_EVENT_TYPE_VAL = 50,
  577. JVMTI_EVENT_VM_INIT = 50,
  578. JVMTI_EVENT_VM_DEATH = 51,
  579. JVMTI_EVENT_THREAD_START = 52,
  580. JVMTI_EVENT_THREAD_END = 53,
  581. JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
  582. JVMTI_EVENT_CLASS_LOAD = 55,
  583. JVMTI_EVENT_CLASS_PREPARE = 56,
  584. JVMTI_EVENT_VM_START = 57,
  585. JVMTI_EVENT_EXCEPTION = 58,
  586. JVMTI_EVENT_EXCEPTION_CATCH = 59,
  587. JVMTI_EVENT_SINGLE_STEP = 60,
  588. JVMTI_EVENT_FRAME_POP = 61,
  589. JVMTI_EVENT_BREAKPOINT = 62,
  590. JVMTI_EVENT_FIELD_ACCESS = 63,
  591. JVMTI_EVENT_FIELD_MODIFICATION = 64,
  592. JVMTI_EVENT_METHOD_ENTRY = 65,
  593. JVMTI_EVENT_METHOD_EXIT = 66,
  594. JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
  595. JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
  596. JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
  597. JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
  598. JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
  599. JVMTI_EVENT_MONITOR_WAIT = 73,
  600. JVMTI_EVENT_MONITOR_WAITED = 74,
  601. JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
  602. JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
  603. JVMTI_EVENT_RESOURCE_EXHAUSTED = 80,
  604. JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
  605. JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
  606. JVMTI_EVENT_OBJECT_FREE = 83,
  607. JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
  608. JVMTI_MAX_EVENT_TYPE_VAL = 84,
  609. jvmtiEventEnsureWideEnum = 0x1000000 /* ensure 4-byte enum */
  610. } jvmtiEvent;
  611. /*
  612. *-----------------------------------------------------------------------------
  613. * JVMTI callbacks
  614. *-----------------------------------------------------------------------------
  615. */
  616. typedef void(JNICALL *jvmtiEventSingleStep)(
  617. jvmtiEnv *jvmti_env,
  618. JNIEnv* jni_env,
  619. jthread thread,
  620. jmethodID method,
  621. jlocation location);
  622. typedef void(JNICALL *jvmtiEventBreakpoint)(
  623. jvmtiEnv *jvmti_env,
  624. JNIEnv* jni_env,
  625. jthread thread,
  626. jmethodID method,
  627. jlocation location);
  628. typedef void(JNICALL *jvmtiEventFieldAccess)(
  629. jvmtiEnv *jvmti_env,
  630. JNIEnv* jni_env,
  631. jthread thread,
  632. jmethodID method,
  633. jlocation location,
  634. jclass field_klass,
  635. jobject object,
  636. jfieldID field);
  637. typedef void(JNICALL *jvmtiEventFieldModification)(
  638. jvmtiEnv *jvmti_env,
  639. JNIEnv* jni_env,
  640. jthread thread,
  641. jmethodID method,
  642. jlocation location,
  643. jclass field_klass,
  644. jobject object,
  645. jfieldID field,
  646. char signature_type,
  647. jvalue new_value);
  648. typedef void(JNICALL *jvmtiEventFramePop)(
  649. jvmtiEnv *jvmti_env,
  650. JNIEnv* jni_env,
  651. jthread thread,
  652. jmethodID method,
  653. jboolean was_popped_by_exception);
  654. typedef void(JNICALL *jvmtiEventMethodEntry)(
  655. jvmtiEnv *jvmti_env,
  656. JNIEnv* jni_env,
  657. jthread thread,
  658. jmethodID method);
  659. typedef void(JNICALL *jvmtiEventMethodExit)(
  660. jvmtiEnv *jvmti_env,
  661. JNIEnv* jni_env,
  662. jthread thread,
  663. jmethodID method,
  664. jboolean was_popped_by_exception,
  665. jvalue return_value);
  666. typedef void(JNICALL *jvmtiEventNativeMethodBind)(
  667. jvmtiEnv *jvmti_env,
  668. JNIEnv* jni_env,
  669. jthread thread,
  670. jmethodID method,
  671. void* address,
  672. void** new_address_ptr);
  673. typedef void(JNICALL *jvmtiEventException)(
  674. jvmtiEnv *jvmti_env,
  675. JNIEnv* jni_env,
  676. jthread thread,
  677. jmethodID method,
  678. jlocation location,
  679. jobject exception,
  680. jmethodID catch_method,
  681. jlocation catch_location);
  682. typedef void(JNICALL *jvmtiEventExceptionCatch)(
  683. jvmtiEnv *jvmti_env,
  684. JNIEnv* jni_env,
  685. jthread thread,
  686. jmethodID method,
  687. jlocation location,
  688. jobject exception);
  689. typedef void(JNICALL *jvmtiEventThreadStart)(
  690. jvmtiEnv *jvmti_env,
  691. JNIEnv* jni_env,
  692. jthread thread);
  693. typedef void(JNICALL *jvmtiEventThreadEnd)(
  694. jvmtiEnv *jvmti_env,
  695. JNIEnv* jni_env,
  696. jthread thread);
  697. typedef void(JNICALL *jvmtiEventClassLoad)(
  698. jvmtiEnv *jvmti_env,
  699. JNIEnv* jni_env,
  700. jthread thread,
  701. jclass klass);
  702. typedef void(JNICALL *jvmtiEventClassPrepare)(
  703. jvmtiEnv *jvmti_env,
  704. JNIEnv* jni_env,
  705. jthread thread,
  706. jclass klass);
  707. typedef void(JNICALL *jvmtiEventClassFileLoadHook)(
  708. jvmtiEnv *jvmti_env,
  709. JNIEnv* jni_env,
  710. jclass class_being_redefined,
  711. jobject loader,
  712. const char* name,
  713. jobject protection_domain,
  714. jint class_data_len,
  715. const unsigned char* class_data,
  716. jint* new_class_data_len,
  717. unsigned char** new_class_data);
  718. typedef void(JNICALL *jvmtiEventVMStart)(
  719. jvmtiEnv *jvmti_env,
  720. JNIEnv* jni_env);
  721. typedef void(JNICALL *jvmtiEventVMInit)(
  722. jvmtiEnv *jvmti_env,
  723. JNIEnv* jni_env,
  724. jthread thread);
  725. typedef void(JNICALL *jvmtiEventVMDeath)(
  726. jvmtiEnv *jvmti_env,
  727. JNIEnv* jni_env);
  728. typedef void(JNICALL *jvmtiEventCompiledMethodLoad)(
  729. jvmtiEnv *jvmti_env,
  730. jmethodID method,
  731. jint code_size,
  732. const void* code_addr,
  733. jint map_length,
  734. const jvmtiAddrLocationMap* map,
  735. const void* compile_info);
  736. typedef void(JNICALL *jvmtiEventCompiledMethodUnload)(
  737. jvmtiEnv *jvmti_env,
  738. jmethodID method,
  739. const void* code_addr);
  740. typedef void(JNICALL *jvmtiEventDynamicCodeGenerated)(
  741. jvmtiEnv *jvmti_env,
  742. const char* name,
  743. const void* address,
  744. jint length);
  745. typedef void(JNICALL *jvmtiEventDataDumpRequest)(
  746. jvmtiEnv *jvmti_env);
  747. typedef void(JNICALL *jvmtiEventMonitorContendedEnter)(
  748. jvmtiEnv *jvmti_env,
  749. JNIEnv* jni_env,
  750. jthread thread,
  751. jobject object);
  752. typedef void(JNICALL *jvmtiEventMonitorContendedEntered)(
  753. jvmtiEnv *jvmti_env,
  754. JNIEnv* jni_env,
  755. jthread thread,
  756. jobject object);
  757. typedef void(JNICALL *jvmtiEventMonitorWait)(
  758. jvmtiEnv *jvmti_env,
  759. JNIEnv* jni_env,
  760. jthread thread,
  761. jobject object,
  762. jlong timeout);
  763. typedef void(JNICALL *jvmtiEventMonitorWaited)(
  764. jvmtiEnv *jvmti_env,
  765. JNIEnv* jni_env,
  766. jthread thread,
  767. jobject object,
  768. jboolean timed_out);
  769. typedef void(JNICALL *jvmtiEventVMObjectAlloc)(
  770. jvmtiEnv *jvmti_env,
  771. JNIEnv* jni_env,
  772. jthread thread,
  773. jobject object,
  774. jclass object_klass,
  775. jlong size);
  776. typedef void(JNICALL *jvmtiEventObjectFree)(
  777. jvmtiEnv *jvmti_env,
  778. jlong tag);
  779. typedef void(JNICALL *jvmtiEventGarbageCollectionStart)(
  780. jvmtiEnv *jvmti_env);
  781. typedef void(JNICALL *jvmtiEventGarbageCollectionFinish)(
  782. jvmtiEnv *jvmti_env);
  783. typedef void (JNICALL *jvmtiEventResourceExhausted) (
  784. jvmtiEnv *jvmti_env,
  785. JNIEnv* jni_env,
  786. jint flags,
  787. const void* reserved,
  788. const char* description);
  789. typedef void * jvmtiEventReserved;
  790. typedef struct {
  791. jvmtiEventVMInit VMInit;
  792. jvmtiEventVMDeath VMDeath;
  793. jvmtiEventThreadStart ThreadStart;
  794. jvmtiEventThreadEnd ThreadEnd;
  795. jvmtiEventClassFileLoadHook ClassFileLoadHook;
  796. jvmtiEventClassLoad ClassLoad;
  797. jvmtiEventClassPrepare ClassPrepare;
  798. jvmtiEventVMStart VMStart;
  799. jvmtiEventException Exception;
  800. jvmtiEventExceptionCatch ExceptionCatch;
  801. jvmtiEventSingleStep SingleStep;
  802. jvmtiEventFramePop FramePop;
  803. jvmtiEventBreakpoint Breakpoint;
  804. jvmtiEventFieldAccess FieldAccess;
  805. jvmtiEventFieldModification FieldModification;
  806. jvmtiEventMethodEntry MethodEntry;
  807. jvmtiEventMethodExit MethodExit;
  808. jvmtiEventNativeMethodBind NativeMethodBind;
  809. jvmtiEventCompiledMethodLoad CompiledMethodLoad;
  810. jvmtiEventCompiledMethodUnload CompiledMethodUnload;
  811. jvmtiEventDynamicCodeGenerated DynamicCodeGenerated;
  812. jvmtiEventDataDumpRequest DataDumpRequest;
  813. jvmtiEventReserved reserved72;
  814. jvmtiEventMonitorWait MonitorWait;
  815. jvmtiEventMonitorWaited MonitorWaited;
  816. jvmtiEventMonitorContendedEnter MonitorContendedEnter;
  817. jvmtiEventMonitorContendedEntered MonitorContendedEntered;
  818. jvmtiEventReserved reserved77;
  819. jvmtiEventReserved reserved78;
  820. jvmtiEventReserved reserved79;
  821. jvmtiEventResourceExhausted ResourceExhausted;
  822. jvmtiEventGarbageCollectionStart GarbageCollectionStart;
  823. jvmtiEventGarbageCollectionFinish GarbageCollectionFinish;
  824. jvmtiEventObjectFree ObjectFree;
  825. jvmtiEventVMObjectAlloc VMObjectAlloc;
  826. } jvmtiEventCallbacks;
  827. /*
  828. *-----------------------------------------------------------------------------
  829. * JVMTI methods
  830. *-----------------------------------------------------------------------------
  831. */
  832. typedef struct JVMTINativeInterface_ {
  833. void *reserved1;
  834. jvmtiError (JNICALL * SetEventNotificationMode)(jvmtiEnv* env, jvmtiEventMode mode, jvmtiEvent event_type, jthread event_thread, ...);
  835. void *reserved3;
  836. jvmtiError (JNICALL * GetAllThreads)(jvmtiEnv* env, jint* threads_count_ptr, jthread** threads_ptr);
  837. jvmtiError (JNICALL * SuspendThread)(jvmtiEnv* env, jthread thread);
  838. jvmtiError (JNICALL * ResumeThread)(jvmtiEnv* env, jthread thread);
  839. jvmtiError (JNICALL * StopThread)(jvmtiEnv* env, jthread thread, jobject exception);
  840. jvmtiError (JNICALL * InterruptThread)(jvmtiEnv* env, jthread thread);
  841. jvmtiError (JNICALL * GetThreadInfo)(jvmtiEnv* env, jthread thread, jvmtiThreadInfo* info_ptr);
  842. jvmtiError (JNICALL * GetOwnedMonitorInfo)(jvmtiEnv* env, jthread thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr);
  843. jvmtiError (JNICALL * GetCurrentContendedMonitor)(jvmtiEnv* env, jthread thread, jobject* monitor_ptr);
  844. jvmtiError (JNICALL * RunAgentThread)(jvmtiEnv* env, jthread thread, jvmtiStartFunction proc, const void* arg, jint priority);
  845. jvmtiError (JNICALL * GetTopThreadGroups)(jvmtiEnv* env, jint* group_count_ptr, jthreadGroup** groups_ptr);
  846. jvmtiError (JNICALL * GetThreadGroupInfo)(jvmtiEnv* env, jthreadGroup group, jvmtiThreadGroupInfo* info_ptr);
  847. jvmtiError (JNICALL * GetThreadGroupChildren)(jvmtiEnv* env, jthreadGroup group, jint* thread_count_ptr, jthread** threads_ptr, jint* group_count_ptr, jthreadGroup** groups_ptr);
  848. jvmtiError (JNICALL * GetFrameCount)(jvmtiEnv* env, jthread thread, jint* count_ptr);
  849. jvmtiError (JNICALL * GetThreadState)(jvmtiEnv* env, jthread thread, jint* thread_state_ptr);
  850. jvmtiError (JNICALL * GetCurrentThread)(jvmtiEnv* env, jthread* thread_ptr);
  851. jvmtiError (JNICALL * GetFrameLocation)(jvmtiEnv* env, jthread thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr);
  852. jvmtiError (JNICALL * NotifyFramePop)(jvmtiEnv* env, jthread thread, jint depth);
  853. jvmtiError (JNICALL * GetLocalObject)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jobject* value_ptr);
  854. jvmtiError (JNICALL * GetLocalInt)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jint* value_ptr);
  855. jvmtiError (JNICALL * GetLocalLong)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jlong* value_ptr);
  856. jvmtiError (JNICALL * GetLocalFloat)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jfloat* value_ptr);
  857. jvmtiError (JNICALL * GetLocalDouble)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jdouble* value_ptr);
  858. jvmtiError (JNICALL * SetLocalObject)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jobject value);
  859. jvmtiError (JNICALL * SetLocalInt)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jint value);
  860. jvmtiError (JNICALL * SetLocalLong)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jlong value);
  861. jvmtiError (JNICALL * SetLocalFloat)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jfloat value);
  862. jvmtiError (JNICALL * SetLocalDouble)(jvmtiEnv* env, jthread thread, jint depth, jint slot, jdouble value);
  863. jvmtiError (JNICALL * CreateRawMonitor)(jvmtiEnv* env, const char* name, jrawMonitorID* monitor_ptr);
  864. jvmtiError (JNICALL * DestroyRawMonitor)(jvmtiEnv* env, jrawMonitorID monitor);
  865. jvmtiError (JNICALL * RawMonitorEnter)(jvmtiEnv* env, jrawMonitorID monitor);
  866. jvmtiError (JNICALL * RawMonitorExit)(jvmtiEnv* env, jrawMonitorID monitor);
  867. jvmtiError (JNICALL * RawMonitorWait)(jvmtiEnv* env, jrawMonitorID monitor, jlong millis);
  868. jvmtiError (JNICALL * RawMonitorNotify)(jvmtiEnv* env, jrawMonitorID monitor);
  869. jvmtiError (JNICALL * RawMonitorNotifyAll)(jvmtiEnv* env, jrawMonitorID monitor);
  870. jvmtiError (JNICALL * SetBreakpoint)(jvmtiEnv* env, jmethodID method, jlocation location);
  871. jvmtiError (JNICALL * ClearBreakpoint)(jvmtiEnv* env, jmethodID method, jlocation location);
  872. void *reserved40;
  873. jvmtiError (JNICALL * SetFieldAccessWatch)(jvmtiEnv* env, jclass klass, jfieldID field);
  874. jvmtiError (JNICALL * ClearFieldAccessWatch)(jvmtiEnv* env, jclass klass, jfieldID field);
  875. jvmtiError (JNICALL * SetFieldModificationWatch)(jvmtiEnv* env, jclass klass, jfieldID field);
  876. jvmtiError (JNICALL * ClearFieldModificationWatch)(jvmtiEnv* env, jclass klass, jfieldID field);
  877. jvmtiError (JNICALL * IsModifiableClass)(jvmtiEnv* env, jclass klass, jboolean* is_modifiable_class_ptr);
  878. jvmtiError (JNICALL * Allocate)(jvmtiEnv* env, jlong size, unsigned char** mem_ptr);
  879. jvmtiError (JNICALL * Deallocate)(jvmtiEnv* env, unsigned char* mem);
  880. jvmtiError (JNICALL * GetClassSignature)(jvmtiEnv* env, jclass klass, char** signature_ptr, char** generic_ptr);
  881. jvmtiError (JNICALL * GetClassStatus)(jvmtiEnv* env, jclass klass, jint* status_ptr);
  882. jvmtiError (JNICALL * GetSourceFileName)(jvmtiEnv* env, jclass klass, char** source_name_ptr);
  883. jvmtiError (JNICALL * GetClassModifiers)(jvmtiEnv* env, jclass klass, jint* modifiers_ptr);
  884. jvmtiError (JNICALL * GetClassMethods)(jvmtiEnv* env, jclass klass, jint* method_count_ptr, jmethodID** methods_ptr);
  885. jvmtiError (JNICALL * GetClassFields)(jvmtiEnv* env, jclass klass, jint* field_count_ptr, jfieldID** fields_ptr);
  886. jvmtiError (JNICALL * GetImplementedInterfaces)(jvmtiEnv* env, jclass klass, jint* interface_count_ptr, jclass** interfaces_ptr);
  887. jvmtiError (JNICALL * IsInterface)(jvmtiEnv* env, jclass klass, jboolean* is_interface_ptr);
  888. jvmtiError (JNICALL * IsArrayClass)(jvmtiEnv* env, jclass klass, jboolean* is_array_class_ptr);
  889. jvmtiError (JNICALL * GetClassLoader)(jvmtiEnv* env, jclass klass, jobject* classloader_ptr);
  890. jvmtiError (JNICALL * GetObjectHashCode)(jvmtiEnv* env, jobject object, jint* hash_code_ptr);
  891. jvmtiError (JNICALL * GetObjectMonitorUsage)(jvmtiEnv* env, jobject object, jvmtiMonitorUsage* info_ptr);
  892. jvmtiError (JNICALL * GetFieldName)(jvmtiEnv* env, jclass klass, jfieldID field, char** name_ptr, char** signature_ptr, char** generic_ptr);
  893. jvmtiError (JNICALL * GetFieldDeclaringClass)(jvmtiEnv* env, jclass klass, jfieldID field, jclass* declaring_class_ptr);
  894. jvmtiError (JNICALL * GetFieldModifiers)(jvmtiEnv* env, jclass klass, jfieldID field, jint* modifiers_ptr);
  895. jvmtiError (JNICALL * IsFieldSynthetic)(jvmtiEnv* env, jclass klass, jfieldID field, jboolean* is_synthetic_ptr);
  896. jvmtiError (JNICALL * GetMethodName)(jvmtiEnv* env, jmethodID method, char** name_ptr, char** signature_ptr, char** generic_ptr);
  897. jvmtiError (JNICALL * GetMethodDeclaringClass)(jvmtiEnv* env, jmethodID method, jclass* declaring_class_ptr);
  898. jvmtiError (JNICALL * GetMethodModifiers)(jvmtiEnv* env, jmethodID method, jint* modifiers_ptr);
  899. void *reserved67;
  900. jvmtiError (JNICALL * GetMaxLocals)(jvmtiEnv* env, jmethodID method, jint* max_ptr);
  901. jvmtiError (JNICALL * GetArgumentsSize)(jvmtiEnv* env, jmethodID method, jint* size_ptr);
  902. jvmtiError (JNICALL * GetLineNumberTable)(jvmtiEnv* env, jmethodID method, jint* entry_count_ptr, jvmtiLineNumberEntry** table_ptr);
  903. jvmtiError (JNICALL * GetMethodLocation)(jvmtiEnv* env, jmethodID method, jlocation* start_location_ptr, jlocation* end_location_ptr);
  904. jvmtiError (JNICALL * GetLocalVariableTable)(jvmtiEnv* env, jmethodID method, jint* entry_count_ptr, jvmtiLocalVariableEntry** table_ptr);
  905. jvmtiError (JNICALL * SetNativeMethodPrefix)(jvmtiEnv* env, const char* prefix);
  906. jvmtiError (JNICALL * SetNativeMethodPrefixes)(jvmtiEnv* env, jint prefix_count, char** prefixes);
  907. jvmtiError (JNICALL * GetBytecodes)(jvmtiEnv* env, jmethodID method, jint* bytecode_count_ptr, unsigned char** bytecodes_ptr);
  908. jvmtiError (JNICALL * IsMethodNative)(jvmtiEnv* env, jmethodID method, jboolean* is_native_ptr);
  909. jvmtiError (JNICALL * IsMethodSynthetic)(jvmtiEnv* env, jmethodID method, jboolean* is_synthetic_ptr);
  910. jvmtiError (JNICALL * GetLoadedClasses)(jvmtiEnv* env, jint* class_count_ptr, jclass** classes_ptr);
  911. jvmtiError (JNICALL * GetClassLoaderClasses)(jvmtiEnv* env, jobject initiating_loader, jint* class_count_ptr, jclass** classes_ptr);
  912. jvmtiError (JNICALL * PopFrame)(jvmtiEnv* env, jthread thread);
  913. jvmtiError (JNICALL * ForceEarlyReturnObject)(jvmtiEnv* env, jthread thread, jobject value);
  914. jvmtiError (JNICALL * ForceEarlyReturnInt)(jvmtiEnv* env, jthread thread, jint value);
  915. jvmtiError (JNICALL * ForceEarlyReturnLong)(jvmtiEnv* env, jthread thread, jlong value);
  916. jvmtiError (JNICALL * ForceEarlyReturnFloat)(jvmtiEnv* env, jthread thread, jfloat value);
  917. jvmtiError (JNICALL * ForceEarlyReturnDouble)(jvmtiEnv* env, jthread thread, jdouble value);
  918. jvmtiError (JNICALL * ForceEarlyReturnVoid)(jvmtiEnv* env, jthread thread);
  919. jvmtiError (JNICALL * RedefineClasses)(jvmtiEnv* env, jint class_count, const jvmtiClassDefinition* class_definitions);
  920. jvmtiError (JNICALL * GetVersionNumber)(jvmtiEnv* env, jint* version_ptr);
  921. jvmtiError (JNICALL * GetCapabilities)(jvmtiEnv* env, jvmtiCapabilities* capabilities_ptr);
  922. jvmtiError (JNICALL * GetSourceDebugExtension)(jvmtiEnv* env, jclass klass, char** source_debug_extension_ptr);
  923. jvmtiError (JNICALL * IsMethodObsolete)(jvmtiEnv* env, jmethodID method, jboolean* is_obsolete_ptr);
  924. jvmtiError (JNICALL * SuspendThreadList)(jvmtiEnv* env, jint request_count, const jthread* request_list, jvmtiError* results);
  925. jvmtiError (JNICALL * ResumeThreadList)(jvmtiEnv* env, jint request_count, const jthread* request_list, jvmtiError* results);
  926. void *reserved94;
  927. void *reserved95;
  928. void *reserved96;
  929. void *reserved97;
  930. void *reserved98;
  931. void *reserved99;
  932. jvmtiError (JNICALL * GetAllStackTraces)(jvmtiEnv* env, jint max_frame_count, jvmtiStackInfo** stack_info_ptr, jint* thread_count_ptr);
  933. jvmtiError (JNICALL * GetThreadListStackTraces)(jvmtiEnv* env, jint thread_count, const jthread* thread_list, jint max_frame_count, jvmtiStackInfo** stack_info_ptr);
  934. jvmtiError (JNICALL * GetThreadLocalStorage)(jvmtiEnv* env, jthread thread, void** data_ptr);
  935. jvmtiError (JNICALL * SetThreadLocalStorage)(jvmtiEnv* env, jthread thread, const void* data);
  936. jvmtiError (JNICALL * GetStackTrace)(jvmtiEnv* env, jthread thread, jint start_depth, jint max_frame_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr);
  937. void *reserved105;
  938. jvmtiError (JNICALL * GetTag)(jvmtiEnv* env, jobject object, jlong* tag_ptr);
  939. jvmtiError (JNICALL * SetTag)(jvmtiEnv* env, jobject object, jlong tag);
  940. jvmtiError (JNICALL * ForceGarbageCollection)(jvmtiEnv* env);
  941. jvmtiError (JNICALL * IterateOverObjectsReachableFromObject)(jvmtiEnv* env, jobject object, jvmtiObjectReferenceCallback object_reference_callback, const void * user_data);
  942. jvmtiError (JNICALL * IterateOverReachableObjects)(jvmtiEnv* env, jvmtiHeapRootCallback heap_root_callback, jvmtiStackReferenceCallback stack_ref_callback, jvmtiObjectReferenceCallback object_ref_callback, const void * user_data);
  943. jvmtiError (JNICALL * IterateOverHeap)(jvmtiEnv* env, jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void * user_data);
  944. jvmtiError (JNICALL * IterateOverInstancesOfClass)(jvmtiEnv* env, jclass klass, jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void * user_data);
  945. void *reserved113;
  946. jvmtiError (JNICALL * GetObjectsWithTags)(jvmtiEnv* env, jint tag_count, const jlong* tags, jint* count_ptr, jobject** object_result_ptr, jlong** tag_result_ptr);
  947. jvmtiError (JNICALL * FollowReferences)(jvmtiEnv* env, jint heap_filter, jclass klass, jobject initial_object, const jvmtiHeapCallbacks* callbacks, const void* user_data);
  948. jvmtiError (JNICALL * IterateThroughHeap)(jvmtiEnv* env, jint heap_filter, jclass klass, const jvmtiHeapCallbacks* callbacks, const void* user_data);
  949. void *reserved117;
  950. void *reserved118;
  951. void *reserved119;
  952. jvmtiError (JNICALL * SetJNIFunctionTable)(jvmtiEnv* env, const jniNativeInterface* function_table);
  953. jvmtiError (JNICALL * GetJNIFunctionTable)(jvmtiEnv* env, jniNativeInterface** function_table);
  954. jvmtiError (JNICALL * SetEventCallbacks)(jvmtiEnv* env, const jvmtiEventCallbacks* callbacks, jint size_of_callbacks);
  955. jvmtiError (JNICALL * GenerateEvents)(jvmtiEnv* env, jvmtiEvent event_type);
  956. jvmtiError (JNICALL * GetExtensionFunctions)(jvmtiEnv* env, jint* extension_count_ptr, jvmtiExtensionFunctionInfo** extensions);
  957. jvmtiError (JNICALL * GetExtensionEvents)(jvmtiEnv* env, jint* extension_count_ptr, jvmtiExtensionEventInfo** extensions);
  958. jvmtiError (JNICALL * SetExtensionEventCallback)(jvmtiEnv* env, jint extension_event_index, jvmtiExtensionEvent callback);
  959. jvmtiError (JNICALL * DisposeEnvironment)(jvmtiEnv* env);
  960. jvmtiError (JNICALL * GetErrorName)(jvmtiEnv* env, jvmtiError error, char** name_ptr);
  961. jvmtiError (JNICALL * GetJLocationFormat)(jvmtiEnv* env, jvmtiJlocationFormat* format_ptr);
  962. jvmtiError (JNICALL * GetSystemProperties)(jvmtiEnv* env, jint* count_ptr, char*** property_ptr);
  963. jvmtiError (JNICALL * GetSystemProperty)(jvmtiEnv* env, const char* property, char** value_ptr);
  964. jvmtiError (JNICALL * SetSystemProperty)(jvmtiEnv* env, const char* property, const char* value);
  965. jvmtiError (JNICALL * GetPhase)(jvmtiEnv* env, jvmtiPhase* phase_ptr);
  966. jvmtiError (JNICALL * GetCurrentThreadCpuTimerInfo)(jvmtiEnv* env, jvmtiTimerInfo* info_ptr);
  967. jvmtiError (JNICALL * GetCurrentThreadCpuTime)(jvmtiEnv* env, jlong* nanos_ptr);
  968. jvmtiError (JNICALL * GetThreadCpuTimerInfo)(jvmtiEnv* env, jvmtiTimerInfo* info_ptr);
  969. jvmtiError (JNICALL * GetThreadCpuTime)(jvmtiEnv* env, jthread thread, jlong* nanos_ptr);
  970. jvmtiError (JNICALL * GetTimerInfo)(jvmtiEnv* env, jvmtiTimerInfo* info_ptr);
  971. jvmtiError (JNICALL * GetTime)(jvmtiEnv* env, jlong* nanos_ptr);
  972. jvmtiError (JNICALL * GetPotentialCapabilities)(jvmtiEnv* env, jvmtiCapabilities* capabilities_ptr);
  973. void *reserved141;
  974. jvmtiError (JNICALL * AddCapabilities)(jvmtiEnv* env, const jvmtiCapabilities* capabilities_ptr);
  975. jvmtiError (JNICALL * RelinquishCapabilities)(jvmtiEnv* env, const jvmtiCapabilities* capabilities_ptr);
  976. jvmtiError (JNICALL * GetAvailableProcessors)(jvmtiEnv* env, jint* processor_count_ptr);
  977. jvmtiError (JNICALL * GetClassVersionNumbers)(jvmtiEnv* env, jclass klass, jint* minor_version_ptr, jint* major_version_ptr);
  978. jvmtiError (JNICALL * GetConstantPool)(jvmtiEnv* env, jclass klass, jint* constant_pool_count_ptr, jint* constant_pool_byte_count_ptr, unsigned char** constant_pool_bytes_ptr);
  979. jvmtiError (JNICALL * GetEnvironmentLocalStorage)(jvmtiEnv* env, void** data_ptr);
  980. jvmtiError (JNICALL * SetEnvironmentLocalStorage)(jvmtiEnv* env, const void* data);
  981. jvmtiError (JNICALL * AddToBootstrapClassLoaderSearch)(jvmtiEnv* env, const char* segment);
  982. jvmtiError (JNICALL * SetVerboseFlag)(jvmtiEnv* env, jvmtiVerboseFlag flag, jboolean value);
  983. jvmtiError (JNICALL * AddToSystemClassLoaderSearch)(jvmtiEnv* env, const char* segment);
  984. jvmtiError (JNICALL * RetransformClasses)(jvmtiEnv* env, jint class_count, const jclass* classes);
  985. jvmtiError (JNICALL * GetOwnedMonitorStackDepthInfo)(jvmtiEnv* env, jthread thread, jint* monitor_info_count_ptr, jvmtiMonitorStackDepthInfo** monitor_info_ptr);
  986. jvmtiError (JNICALL * GetObjectSize)(jvmtiEnv* env, jobject object, jlong* size_ptr);
  987. jvmtiError (JNICALL * GetLocalInstance)(jvmtiEnv* env, jthread thread, jint depth, jobject* value_ptr);
  988. } jvmtiNativeInterface;
  989. struct _jvmtiEnv {
  990. const struct JVMTINativeInterface_ * functions;
  991. #ifdef __cplusplus
  992. jvmtiError SetEventNotificationMode (jvmtiEventMode mode, jvmtiEvent event_type, jthread event_thread, ...) { return functions->SetEventNotificationMode(this, mode, event_type, event_thread); }
  993. jvmtiError GetAllThreads (jint* threads_count_ptr, jthread** threads_ptr) { return functions->GetAllThreads(this, threads_count_ptr, threads_ptr); }
  994. jvmtiError SuspendThread (jthread thread) { return functions->SuspendThread(this, thread); }
  995. jvmtiError ResumeThread (jthread thread) { return functions->ResumeThread(this, thread); }
  996. jvmtiError StopThread (jthread thread, jobject exception) { return functions->StopThread(this, thread, exception); }
  997. jvmtiError InterruptThread (jthread thread) { return functions->InterruptThread(this, thread); }
  998. jvmtiError GetThreadInfo (jthread thread, jvmtiThreadInfo* info_ptr) { return functions->GetThreadInfo(this, thread, info_ptr); }
  999. jvmtiError GetOwnedMonitorInfo (jthread thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr) { return functions->GetOwnedMonitorInfo(this, thread, owned_monitor_count_ptr, owned_monitors_ptr); }
  1000. jvmtiError GetCurrentContendedMonitor (jthread thread, jobject* monitor_ptr) { return functions->GetCurrentContendedMonitor(this, thread, monitor_ptr); }
  1001. jvmtiError RunAgentThread (jthread thread, jvmtiStartFunction proc, const void* arg, jint priority) { return functions->RunAgentThread(this, thread, proc, arg, priority); }
  1002. jvmtiError GetTopThreadGroups (jint* group_count_ptr, jthreadGroup** groups_ptr) { return functions->GetTopThreadGroups(this, group_count_ptr, groups_ptr); }
  1003. jvmtiError GetThreadGroupInfo (jthreadGroup group, jvmtiThreadGroupInfo* info_ptr) { return functions->GetThreadGroupInfo(this, group, info_ptr); }
  1004. jvmtiError GetThreadGroupChildren (jthreadGroup group, jint* thread_count_ptr, jthread** threads_ptr, jint* group_count_ptr, jthreadGroup** groups_ptr) { return functions->GetThreadGroupChildren(this, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr); }
  1005. jvmtiError GetFrameCount (jthread thread, jint* count_ptr) { return functions->GetFrameCount(this, thread, count_ptr); }
  1006. jvmtiError GetThreadState (jthread thread, jint* thread_state_ptr) { return functions->GetThreadState(this, thread, thread_state_ptr); }
  1007. jvmtiError GetCurrentThread (jthread* thread_ptr) { return functions->GetCurrentThread(this, thread_ptr); }
  1008. jvmtiError GetFrameLocation (jthread thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr) { return functions->GetFrameLocation(this, thread, depth, method_ptr, location_ptr); }
  1009. jvmtiError NotifyFramePop (jthread thread, jint depth) { return functions->NotifyFramePop(this, thread, depth); }
  1010. jvmtiError GetLocalObject (jthread thread, jint depth, jint slot, jobject* value_ptr) { return functions->GetLocalObject(this, thread, depth, slot, value_ptr); }
  1011. jvmtiError GetLocalInt (jthread thread, jint depth, jint slot, jint* value_ptr) { return functions->GetLocalInt(this, thread, depth, slot, value_ptr); }
  1012. jvmtiError GetLocalLong (jthread thread, jint depth, jint slot, jlong* value_ptr) { return functions->GetLocalLong(this, thread, depth, slot, value_ptr); }
  1013. jvmtiError GetLocalFloat (jthread thread, jint depth, jint slot, jfloat* value_ptr) { return functions->GetLocalFloat(this, thread, depth, slot, value_ptr); }
  1014. jvmtiError GetLocalDouble (jthread thread, jint depth, jint slot, jdouble* value_ptr) { return functions->GetLocalDouble(this, thread, depth, slot, value_ptr); }
  1015. jvmtiError SetLocalObject (jthread thread, jint depth, jint slot, jobject value) { return functions->SetLocalObject(this, thread, depth, slot, value); }
  1016. jvmtiError SetLocalInt (jthread thread, jint depth, jint slot, jint value) { return functions->SetLocalInt(this, thread, depth, slot, value); }
  1017. jvmtiError SetLocalLong (jthread thread, jint depth, jint slot, jlong value) { return functions->SetLocalLong(this, thread, depth, slot, value); }
  1018. jvmtiError SetLocalFloat (jthread thread, jint depth, jint slot, jfloat value) { return functions->SetLocalFloat(this, thread, depth, slot, value); }
  1019. jvmtiError SetLocalDouble (jthread thread, jint depth, jint slot, jdouble value) { return functions->SetLocalDouble(this, thread, depth, slot, value); }
  1020. jvmtiError CreateRawMonitor (const char* name, jrawMonitorID* monitor_ptr) { return functions->CreateRawMonitor(this, name, monitor_ptr); }
  1021. jvmtiError DestroyRawMonitor (jrawMonitorID monitor) { return functions->DestroyRawMonitor(this, monitor); }
  1022. jvmtiError RawMonitorEnter (jrawMonitorID monitor) { return functions->RawMonitorEnter(this, monitor); }
  1023. jvmtiError RawMonitorExit (jrawMonitorID monitor) { return functions->RawMonitorExit(this, monitor); }
  1024. jvmtiError RawMonitorWait (jrawMonitorID monitor, jlong millis) { return functions->RawMonitorWait(this, monitor, millis); }
  1025. jvmtiError RawMonitorNotify (jrawMonitorID monitor) { return functions->RawMonitorNotify(this, monitor); }
  1026. jvmtiError RawMonitorNotifyAll (jrawMonitorID monitor) { return functions->RawMonitorNotifyAll(this, monitor); }
  1027. jvmtiError SetBreakpoint (jmethodID method, jlocation location) { return functions->SetBreakpoint(this, method, location); }
  1028. jvmtiError ClearBreakpoint (jmethodID method, jlocation location) { return functions->ClearBreakpoint(this, method, location); }
  1029. jvmtiError SetFieldAccessWatch (jclass klass, jfieldID field) { return functions->SetFieldAccessWatch(this, klass, field); }
  1030. jvmtiError ClearFieldAccessWatch (jclass klass, jfieldID field) { return functions->ClearFieldAccessWatch(this, klass, field); }
  1031. jvmtiError SetFieldModificationWatch (jclass klass, jfieldID field) { return functions->SetFieldModificationWatch(this, klass, field); }
  1032. jvmtiError ClearFieldModificationWatch (jclass klass, jfieldID field) { return functions->ClearFieldModificationWatch(this, klass, field); }
  1033. jvmtiError IsModifiableClass (jclass klass, jboolean* is_modifiable_class_ptr) { return functions->IsModifiableClass(this, klass, is_modifiable_class_ptr); }
  1034. jvmtiError Allocate (jlong size, unsigned char** mem_ptr) { return functions->Allocate(this, size, mem_ptr); }
  1035. jvmtiError Deallocate (unsigned char* mem) { return functions->Deallocate(this, mem); }
  1036. jvmtiError GetClassSignature (jclass klass, char** signature_ptr, char** generic_ptr) { return functions->GetClassSignature(this, klass, signature_ptr, generic_ptr); }
  1037. jvmtiError GetClassStatus (jclass klass, jint* status_ptr) { return functions->GetClassStatus(this, klass, status_ptr); }
  1038. jvmtiError GetSourceFileName (jclass klass, char** source_name_ptr) { return functions->GetSourceFileName(this, klass, source_name_ptr); }
  1039. jvmtiError GetClassModifiers (jclass klass, jint* modifiers_ptr) { return functions->GetClassModifiers(this, klass, modifiers_ptr); }
  1040. jvmtiError GetClassMethods (jclass klass, jint* method_count_ptr, jmethodID** methods_ptr) { return functions->GetClassMethods(this, klass, method_count_ptr, methods_ptr); }
  1041. jvmtiError GetClassFields (jclass klass, jint* field_count_ptr, jfieldID** fields_ptr) { return functions->GetClassFields(this, klass, field_count_ptr, fields_ptr); }
  1042. jvmtiError GetImplementedInterfaces (jclass klass, jint* interface_count_ptr, jclass** interfaces_ptr) { return functions->GetImplementedInterfaces(this, klass, interface_count_ptr, interfaces_ptr); }
  1043. jvmtiError IsInterface (jclass klass, jboolean* is_interface_ptr) { return functions->IsInterface(this, klass, is_interface_ptr); }
  1044. jvmtiError IsArrayClass (jclass klass, jboolean* is_array_class_ptr) { return functions->IsArrayClass(this, klass, is_array_class_ptr); }
  1045. jvmtiError GetClassLoader (jclass klass, jobject* classloader_ptr) { return functions->GetClassLoader(this, klass, classloader_ptr); }
  1046. jvmtiError GetObjectHashCode (jobject object, jint* hash_code_ptr) { return functions->GetObjectHashCode(this, object, hash_code_ptr); }
  1047. jvmtiError GetObjectMonitorUsage (jobject object, jvmtiMonitorUsage* info_ptr) { return functions->GetObjectMonitorUsage(this, object, info_ptr); }
  1048. jvmtiError GetFieldName (jclass klass, jfieldID field, char** name_ptr, char** signature_ptr, char** generic_ptr) { return functions->GetFieldName(this, klass, field, name_ptr, signature_ptr, generic_ptr); }
  1049. jvmtiError GetFieldDeclaringClass (jclass klass, jfieldID field, jclass* declaring_class_ptr) { return functions->GetFieldDeclaringClass(this, klass, field, declaring_class_ptr); }
  1050. jvmtiError GetFieldModifiers (jclass klass, jfieldID field, jint* modifiers_ptr) { return functions->GetFieldModifiers(this, klass, field, modifiers_ptr); }
  1051. jvmtiError IsFieldSynthetic (jclass klass, jfieldID field, jboolean* is_synthetic_ptr) { return functions->IsFieldSynthetic(this, klass, field, is_synthetic_ptr); }
  1052. jvmtiError GetMethodName (jmethodID method, char** name_ptr, char** signature_ptr, char** generic_ptr) { return functions->GetMethodName(this, method, name_ptr, signature_ptr, generic_ptr); }
  1053. jvmtiError GetMethodDeclaringClass (jmethodID method, jclass* declaring_class_ptr) { return functions->GetMethodDeclaringClass(this, method, declaring_class_ptr); }
  1054. jvmtiError GetMethodModifiers (jmethodID method, jint* modifiers_ptr) { return functions->GetMethodModifiers(this, method, modifiers_ptr); }
  1055. jvmtiError GetMaxLocals (jmethodID method, jint* max_ptr) { return functions->GetMaxLocals(this, method, max_ptr); }
  1056. jvmtiError GetArgumentsSize (jmethodID method, jint* size_ptr) { return functions->GetArgumentsSize(this, method, size_ptr); }
  1057. jvmtiError GetLineNumberTable (jmethodID method, jint* entry_count_ptr, jvmtiLineNumberEntry** table_ptr) { return functions->GetLineNumberTable(this, method, entry_count_ptr, table_ptr); }
  1058. jvmtiError GetMethodLocation (jmethodID method, jlocation* start_location_ptr, jlocation* end_location_ptr) { return functions->GetMethodLocation(this, method, start_location_ptr, end_location_ptr); }
  1059. jvmtiError GetLocalVariableTable (jmethodID method, jint* entry_count_ptr, jvmtiLocalVariableEntry** table_ptr) { return functions->GetLocalVariableTable(this, method, entry_count_ptr, table_ptr); }
  1060. jvmtiError SetNativeMethodPrefix (const char* prefix) { return functions->SetNativeMethodPrefix(this, prefix); }
  1061. jvmtiError SetNativeMethodPrefixes (jint prefix_count, char** prefixes) { return functions->SetNativeMethodPrefixes(this, prefix_count, prefixes); }
  1062. jvmtiError GetBytecodes (jmethodID method, jint* bytecode_count_ptr, unsigned char** bytecodes_ptr) { return functions->GetBytecodes(this, method, bytecode_count_ptr, bytecodes_ptr); }
  1063. jvmtiError IsMethodNative (jmethodID method, jboolean* is_native_ptr) { return functions->IsMethodNative(this, method, is_native_ptr); }
  1064. jvmtiError IsMethodSynthetic (jmethodID method, jboolean* is_synthetic_ptr) { return functions->IsMethodSynthetic(this, method, is_synthetic_ptr); }
  1065. jvmtiError GetLoadedClasses (jint* class_count_ptr, jclass** classes_ptr) { return functions->GetLoadedClasses(this, class_count_ptr, classes_ptr); }
  1066. jvmtiError GetClassLoaderClasses (jobject initiating_loader, jint* class_count_ptr, jclass** classes_ptr) { return functions->GetClassLoaderClasses(this, initiating_loader, class_count_ptr, classes_ptr); }
  1067. jvmtiError PopFrame (jthread thread) { return functions->PopFrame(this, thread); }
  1068. jvmtiError ForceEarlyReturnObject (jthread thread, jobject value) { return functions->ForceEarlyReturnObject(this, thread, value); }
  1069. jvmtiError ForceEarlyReturnInt (jthread thread, jint value) { return functions->ForceEarlyReturnInt(this, thread, value); }
  1070. jvmtiError ForceEarlyReturnLong (jthread thread, jlong value) { return functions->ForceEarlyReturnLong(this, thread, value); }
  1071. jvmtiError ForceEarlyReturnFloat (jthread thread, jfloat value) { return functions->ForceEarlyReturnFloat(this, thread, value); }
  1072. jvmtiError ForceEarlyReturnDouble (jthread thread, jdouble value) { return functions->ForceEarlyReturnDouble(this, thread, value); }
  1073. jvmtiError ForceEarlyReturnVoid (jthread thread) { return functions->ForceEarlyReturnVoid(this, thread); }
  1074. jvmtiError RedefineClasses (jint class_count, const jvmtiClassDefinition* class_definitions) { return functions->RedefineClasses(this, class_count, class_definitions); }
  1075. jvmtiError GetVersionNumber (jint* version_ptr) { return functions->GetVersionNumber(this, version_ptr); }
  1076. jvmtiError GetCapabilities (jvmtiCapabilities* capabilities_ptr) { return functions->GetCapabilities(this, capabilities_ptr); }
  1077. jvmtiError GetSourceDebugExtension (jclass klass, char** source_debug_extension_ptr) { return functions->GetSourceDebugExtension(this, klass, source_debug_extension_ptr); }
  1078. jvmtiError IsMethodObsolete (jmethodID method, jboolean* is_obsolete_ptr) { return functions->IsMethodObsolete(this, method, is_obsolete_ptr); }
  1079. jvmtiError SuspendThreadList (jint request_count, const jthread* request_list, jvmtiError* results) { return functions->SuspendThreadList(this, request_count, request_list, results); }
  1080. jvmtiError ResumeThreadList (jint request_count, const jthread* request_list, jvmtiError* results) { return functions->ResumeThreadList(this, request_count, request_list, results); }
  1081. jvmtiError GetAllStackTraces (jint max_frame_count, jvmtiStackInfo** stack_info_ptr, jint* thread_count_ptr) { return functions->GetAllStackTraces(this, max_frame_count, stack_info_ptr, thread_count_ptr); }
  1082. jvmtiError GetThreadListStackTraces (jint thread_count, const jthread* thread_list, jint max_frame_count, jvmtiStackInfo** stack_info_ptr) { return functions->GetThreadListStackTraces(this, thread_count, thread_list, max_frame_count, stack_info_ptr); }
  1083. jvmtiError GetThreadLocalStorage (jthread thread, void** data_ptr) { return functions->GetThreadLocalStorage(this, thread, data_ptr); }
  1084. jvmtiError SetThreadLocalStorage (jthread thread, const void* data) { return functions->SetThreadLocalStorage(this, thread, data); }
  1085. jvmtiError GetStackTrace (jthread thread, jint start_depth, jint max_frame_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr) { return functions->GetStackTrace(this, thread, start_depth, max_frame_count, frame_buffer, count_ptr); }
  1086. jvmtiError GetTag (jobject object, jlong* tag_ptr) { return functions->GetTag(this, object, tag_ptr); }
  1087. jvmtiError SetTag (jobject object, jlong tag) { return functions->SetTag(this, object, tag); }
  1088. jvmtiError ForceGarbageCollection (void) { return functions->ForceGarbageCollection(this); }
  1089. jvmtiError IterateOverObjectsReachableFromObject (jobject object, jvmtiObjectReferenceCallback object_reference_callback, const void * user_data) { return functions->IterateOverObjectsReachableFromObject(this, object, object_reference_callback, user_data); }
  1090. jvmtiError IterateOverReachableObjects (jvmtiHeapRootCallback heap_root_callback, jvmtiStackReferenceCallback stack_ref_callback, jvmtiObjectReferenceCallback object_ref_callback, const void * user_data) { return functions->IterateOverReachableObjects(this, heap_root_callback, stack_ref_callback, object_ref_callback, user_data); }
  1091. jvmtiError IterateOverHeap (jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void * user_data) { return functions->IterateOverHeap(this, object_filter, heap_object_callback, user_data); }
  1092. jvmtiError IterateOverInstancesOfClass (jclass klass, jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void * user_data) { return functions->IterateOverInstancesOfClass(this, klass, object_filter, heap_object_callback, user_data); }
  1093. jvmtiError GetObjectsWithTags (jint tag_count, const jlong* tags, jint* count_ptr, jobject** object_result_ptr, jlong** tag_result_ptr) { return functions->GetObjectsWithTags(this, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr); }
  1094. jvmtiError FollowReferences (jint heap_filter, jclass klass, jobject initial_object, const jvmtiHeapCallbacks* callbacks, const void* user_data) { return functions->FollowReferences(this, heap_filter, klass, initial_object, callbacks, user_data); }
  1095. jvmtiError IterateThroughHeap (jint heap_filter, jclass klass, const jvmtiHeapCallbacks* callbacks, const void* user_data) { return functions->IterateThroughHeap(this, heap_filter, klass, callbacks, user_data); }
  1096. jvmtiError SetJNIFunctionTable (const jniNativeInterface* function_table) { return functions->SetJNIFunctionTable(this, function_table); }
  1097. jvmtiError GetJNIFunctionTable (jniNativeInterface** function_table) { return functions->GetJNIFunctionTable(this, function_table); }
  1098. jvmtiError SetEventCallbacks (const jvmtiEventCallbacks* callbacks, jint size_of_callbacks) { return functions->SetEventCallbacks(this, callbacks, size_of_callbacks); }
  1099. jvmtiError GenerateEvents (jvmtiEvent event_type) { return functions->GenerateEvents(this, event_type); }
  1100. jvmtiError GetExtensionFunctions (jint* extension_count_ptr, jvmtiExtensionFunctionInfo** extensions) { return functions->GetExtensionFunctions(this, extension_count_ptr, extensions); }
  1101. jvmtiError GetExtensionEvents (jint* extension_count_ptr, jvmtiExtensionEventInfo** extensions) { return functions->GetExtensionEvents(this, extension_count_ptr, extensions); }
  1102. jvmtiError SetExtensionEventCallback (jint extension_event_index, jvmtiExtensionEvent callback) { return functions->SetExtensionEventCallback(this, extension_event_index, callback); }
  1103. jvmtiError DisposeEnvironment (void) { return functions->DisposeEnvironment(this); }
  1104. jvmtiError GetErrorName (jvmtiError error, char** name_ptr) { return functions->GetErrorName(this, error, name_ptr); }
  1105. jvmtiError GetJLocationFormat (jvmtiJlocationFormat* format_ptr) { return functions->GetJLocationFormat(this, format_ptr); }
  1106. jvmtiError GetSystemProperties (jint* count_ptr, char*** property_ptr) { return functions->GetSystemProperties(this, count_ptr, property_ptr); }
  1107. jvmtiError GetSystemProperty (const char* property, char** value_ptr) { return functions->GetSystemProperty(this, property, value_ptr); }
  1108. jvmtiError SetSystemProperty (const char* property, const char* value) { return functions->SetSystemProperty(this, property, value); }
  1109. jvmtiError GetPhase (jvmtiPhase* phase_ptr) { return functions->GetPhase(this, phase_ptr); }
  1110. jvmtiError GetCurrentThreadCpuTimerInfo (jvmtiTimerInfo* info_ptr) { return functions->GetCurrentThreadCpuTimerInfo(this, info_ptr); }
  1111. jvmtiError GetCurrentThreadCpuTime (jlong* nanos_ptr) { return functions->GetCurrentThreadCpuTime(this, nanos_ptr); }
  1112. jvmtiError GetThreadCpuTimerInfo (jvmtiTimerInfo* info_ptr) { return functions->GetThreadCpuTimerInfo(this, info_ptr); }
  1113. jvmtiError GetThreadCpuTime (jthread thread, jlong* nanos_ptr) { return functions->GetThreadCpuTime(this, thread, nanos_ptr); }
  1114. jvmtiError GetTimerInfo (jvmtiTimerInfo* info_ptr) { return functions->GetTimerInfo(this, info_ptr); }
  1115. jvmtiError GetTime (jlong* nanos_ptr) { return functions->GetTime(this, nanos_ptr); }
  1116. jvmtiError GetPotentialCapabilities (jvmtiCapabilities* capabilities_ptr) { return functions->GetPotentialCapabilities(this, capabilities_ptr); }
  1117. jvmtiError AddCapabilities (const jvmtiCapabilities* capabilities_ptr) { return functions->AddCapabilities(this, capabilities_ptr); }
  1118. jvmtiError RelinquishCapabilities (const jvmtiCapabilities* capabilities_ptr) { return functions->RelinquishCapabilities(this, capabilities_ptr); }
  1119. jvmtiError GetAvailableProcessors (jint* processor_count_ptr) { return functions->GetAvailableProcessors(this, processor_count_ptr); }
  1120. jvmtiError GetClassVersionNumbers (jclass klass, jint* minor_version_ptr, jint* major_version_ptr) { return functions->GetClassVersionNumbers(this, klass, minor_version_ptr, major_version_ptr); }
  1121. jvmtiError GetConstantPool (jclass klass, jint* constant_pool_count_ptr, jint* constant_pool_byte_count_ptr, unsigned char** constant_pool_bytes_ptr) { return functions->GetConstantPool(this, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr); }
  1122. jvmtiError GetEnvironmentLocalStorage (void** data_ptr) { return functions->GetEnvironmentLocalStorage(this, data_ptr); }
  1123. jvmtiError SetEnvironmentLocalStorage (const void* data) { return functions->SetEnvironmentLocalStorage(this, data); }
  1124. jvmtiError AddToBootstrapClassLoaderSearch (const char* segment) { return functions->AddToBootstrapClassLoaderSearch(this, segment); }
  1125. jvmtiError SetVerboseFlag (jvmtiVerboseFlag flag, jboolean value) { return functions->SetVerboseFlag(this, flag, value); }
  1126. jvmtiError AddToSystemClassLoaderSearch (const char* segment) { return functions->AddToSystemClassLoaderSearch(this, segment); }
  1127. jvmtiError RetransformClasses (jint class_count, const jclass* classes) { return functions->RetransformClasses(this, class_count, classes); }
  1128. jvmtiError GetOwnedMonitorStackDepthInfo (jthread thread, jint* monitor_info_count_ptr, jvmtiMonitorStackDepthInfo** monitor_info_ptr) { return functions->GetOwnedMonitorStackDepthInfo(this, thread, monitor_info_count_ptr, monitor_info_ptr); }
  1129. jvmtiError GetObjectSize (jobject object, jlong* size_ptr) { return functions->GetObjectSize(this, object, size_ptr); }
  1130. jvmtiError GetLocalInstance (jthread thread, jint depth, jobject* value_ptr) { return functions->GetLocalInstance(this, thread, depth, value_ptr); }
  1131. #endif
  1132. };
  1133. #ifdef __cplusplus
  1134. }
  1135. #endif
  1136. #endif /* jvmti_h */