jw项目windows环境软件安装
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2625 lines
80 KiB

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