jvmti.h 76 KB

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