github.com/luchsh/agentlib.go@v0.0.0-20221115155834-ffd0caec4d72/jgo/jvmti.go (about) 1 // Copyright 2022 chuanshenglu@gmail.com 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License.\n\n 14 15 // Generated by jgo/mkjvmti.go, please do not edit this file directly! 16 17 package jgo 18 19 // #include <jvmti.h> 20 // 21 // static jvmtiError jvmtiSetEventNotificationMode(jvmtiEnv* env, jvmtiEventMode mode, jvmtiEvent event_type, jthread event_thread) { 22 // return (*env)->SetEventNotificationMode(env, mode, event_type, event_thread); 23 // } 24 // static jvmtiError jvmtiGetAllModules(jvmtiEnv* env, jint* module_count_ptr, jobject** modules_ptr) { 25 // return (*env)->GetAllModules(env, module_count_ptr, modules_ptr); 26 // } 27 // static jvmtiError jvmtiGetAllThreads(jvmtiEnv* env, jint* threads_count_ptr, jthread** threads_ptr) { 28 // return (*env)->GetAllThreads(env, threads_count_ptr, threads_ptr); 29 // } 30 // static jvmtiError jvmtiSuspendThread(jvmtiEnv* env, jthread thread) { 31 // return (*env)->SuspendThread(env, thread); 32 // } 33 // static jvmtiError jvmtiResumeThread(jvmtiEnv* env, jthread thread) { 34 // return (*env)->ResumeThread(env, thread); 35 // } 36 // static jvmtiError jvmtiStopThread(jvmtiEnv* env, jthread thread, jobject exception) { 37 // return (*env)->StopThread(env, thread, exception); 38 // } 39 // static jvmtiError jvmtiInterruptThread(jvmtiEnv* env, jthread thread) { 40 // return (*env)->InterruptThread(env, thread); 41 // } 42 // static jvmtiError jvmtiGetThreadInfo(jvmtiEnv* env, jthread thread, jvmtiThreadInfo* info_ptr) { 43 // return (*env)->GetThreadInfo(env, thread, info_ptr); 44 // } 45 // static jvmtiError jvmtiGetOwnedMonitorInfo(jvmtiEnv* env, jthread thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr) { 46 // return (*env)->GetOwnedMonitorInfo(env, thread, owned_monitor_count_ptr, owned_monitors_ptr); 47 // } 48 // static jvmtiError jvmtiGetCurrentContendedMonitor(jvmtiEnv* env, jthread thread, jobject* monitor_ptr) { 49 // return (*env)->GetCurrentContendedMonitor(env, thread, monitor_ptr); 50 // } 51 // static jvmtiError jvmtiRunAgentThread(jvmtiEnv* env, jthread thread, jvmtiStartFunction proc, const void* arg, jint priority) { 52 // return (*env)->RunAgentThread(env, thread, proc, arg, priority); 53 // } 54 // static jvmtiError jvmtiGetTopThreadGroups(jvmtiEnv* env, jint* group_count_ptr, jthreadGroup** groups_ptr) { 55 // return (*env)->GetTopThreadGroups(env, group_count_ptr, groups_ptr); 56 // } 57 // static jvmtiError jvmtiGetThreadGroupInfo(jvmtiEnv* env, jthreadGroup group, jvmtiThreadGroupInfo* info_ptr) { 58 // return (*env)->GetThreadGroupInfo(env, group, info_ptr); 59 // } 60 // static jvmtiError jvmtiGetThreadGroupChildren(jvmtiEnv* env, jthreadGroup group, jint* thread_count_ptr, jthread** threads_ptr, jint* group_count_ptr, jthreadGroup** groups_ptr) { 61 // return (*env)->GetThreadGroupChildren(env, group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr); 62 // } 63 // static jvmtiError jvmtiGetFrameCount(jvmtiEnv* env, jthread thread, jint* count_ptr) { 64 // return (*env)->GetFrameCount(env, thread, count_ptr); 65 // } 66 // static jvmtiError jvmtiGetThreadState(jvmtiEnv* env, jthread thread, jint* thread_state_ptr) { 67 // return (*env)->GetThreadState(env, thread, thread_state_ptr); 68 // } 69 // static jvmtiError jvmtiGetCurrentThread(jvmtiEnv* env, jthread* thread_ptr) { 70 // return (*env)->GetCurrentThread(env, thread_ptr); 71 // } 72 // static jvmtiError jvmtiGetFrameLocation(jvmtiEnv* env, jthread thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr) { 73 // return (*env)->GetFrameLocation(env, thread, depth, method_ptr, location_ptr); 74 // } 75 // static jvmtiError jvmtiNotifyFramePop(jvmtiEnv* env, jthread thread, jint depth) { 76 // return (*env)->NotifyFramePop(env, thread, depth); 77 // } 78 // static jvmtiError jvmtiGetLocalObject(jvmtiEnv* env, jthread thread, jint depth, jint slot, jobject* value_ptr) { 79 // return (*env)->GetLocalObject(env, thread, depth, slot, value_ptr); 80 // } 81 // static jvmtiError jvmtiGetLocalInt(jvmtiEnv* env, jthread thread, jint depth, jint slot, jint* value_ptr) { 82 // return (*env)->GetLocalInt(env, thread, depth, slot, value_ptr); 83 // } 84 // static jvmtiError jvmtiGetLocalLong(jvmtiEnv* env, jthread thread, jint depth, jint slot, jlong* value_ptr) { 85 // return (*env)->GetLocalLong(env, thread, depth, slot, value_ptr); 86 // } 87 // static jvmtiError jvmtiGetLocalFloat(jvmtiEnv* env, jthread thread, jint depth, jint slot, jfloat* value_ptr) { 88 // return (*env)->GetLocalFloat(env, thread, depth, slot, value_ptr); 89 // } 90 // static jvmtiError jvmtiGetLocalDouble(jvmtiEnv* env, jthread thread, jint depth, jint slot, jdouble* value_ptr) { 91 // return (*env)->GetLocalDouble(env, thread, depth, slot, value_ptr); 92 // } 93 // static jvmtiError jvmtiSetLocalObject(jvmtiEnv* env, jthread thread, jint depth, jint slot, jobject value) { 94 // return (*env)->SetLocalObject(env, thread, depth, slot, value); 95 // } 96 // static jvmtiError jvmtiSetLocalInt(jvmtiEnv* env, jthread thread, jint depth, jint slot, jint value) { 97 // return (*env)->SetLocalInt(env, thread, depth, slot, value); 98 // } 99 // static jvmtiError jvmtiSetLocalLong(jvmtiEnv* env, jthread thread, jint depth, jint slot, jlong value) { 100 // return (*env)->SetLocalLong(env, thread, depth, slot, value); 101 // } 102 // static jvmtiError jvmtiSetLocalFloat(jvmtiEnv* env, jthread thread, jint depth, jint slot, jfloat value) { 103 // return (*env)->SetLocalFloat(env, thread, depth, slot, value); 104 // } 105 // static jvmtiError jvmtiSetLocalDouble(jvmtiEnv* env, jthread thread, jint depth, jint slot, jdouble value) { 106 // return (*env)->SetLocalDouble(env, thread, depth, slot, value); 107 // } 108 // static jvmtiError jvmtiCreateRawMonitor(jvmtiEnv* env, const char* name, jrawMonitorID* monitor_ptr) { 109 // return (*env)->CreateRawMonitor(env, name, monitor_ptr); 110 // } 111 // static jvmtiError jvmtiDestroyRawMonitor(jvmtiEnv* env, jrawMonitorID monitor) { 112 // return (*env)->DestroyRawMonitor(env, monitor); 113 // } 114 // static jvmtiError jvmtiRawMonitorEnter(jvmtiEnv* env, jrawMonitorID monitor) { 115 // return (*env)->RawMonitorEnter(env, monitor); 116 // } 117 // static jvmtiError jvmtiRawMonitorExit(jvmtiEnv* env, jrawMonitorID monitor) { 118 // return (*env)->RawMonitorExit(env, monitor); 119 // } 120 // static jvmtiError jvmtiRawMonitorWait(jvmtiEnv* env, jrawMonitorID monitor, jlong millis) { 121 // return (*env)->RawMonitorWait(env, monitor, millis); 122 // } 123 // static jvmtiError jvmtiRawMonitorNotify(jvmtiEnv* env, jrawMonitorID monitor) { 124 // return (*env)->RawMonitorNotify(env, monitor); 125 // } 126 // static jvmtiError jvmtiRawMonitorNotifyAll(jvmtiEnv* env, jrawMonitorID monitor) { 127 // return (*env)->RawMonitorNotifyAll(env, monitor); 128 // } 129 // static jvmtiError jvmtiSetBreakpoint(jvmtiEnv* env, jmethodID method, jlocation location) { 130 // return (*env)->SetBreakpoint(env, method, location); 131 // } 132 // static jvmtiError jvmtiClearBreakpoint(jvmtiEnv* env, jmethodID method, jlocation location) { 133 // return (*env)->ClearBreakpoint(env, method, location); 134 // } 135 // static jvmtiError jvmtiGetNamedModule(jvmtiEnv* env, jobject class_loader, const char* package_name, jobject* module_ptr) { 136 // return (*env)->GetNamedModule(env, class_loader, package_name, module_ptr); 137 // } 138 // static jvmtiError jvmtiSetFieldAccessWatch(jvmtiEnv* env, jclass klass, jfieldID field) { 139 // return (*env)->SetFieldAccessWatch(env, klass, field); 140 // } 141 // static jvmtiError jvmtiClearFieldAccessWatch(jvmtiEnv* env, jclass klass, jfieldID field) { 142 // return (*env)->ClearFieldAccessWatch(env, klass, field); 143 // } 144 // static jvmtiError jvmtiSetFieldModificationWatch(jvmtiEnv* env, jclass klass, jfieldID field) { 145 // return (*env)->SetFieldModificationWatch(env, klass, field); 146 // } 147 // static jvmtiError jvmtiClearFieldModificationWatch(jvmtiEnv* env, jclass klass, jfieldID field) { 148 // return (*env)->ClearFieldModificationWatch(env, klass, field); 149 // } 150 // static jvmtiError jvmtiIsModifiableClass(jvmtiEnv* env, jclass klass, jboolean* is_modifiable_class_ptr) { 151 // return (*env)->IsModifiableClass(env, klass, is_modifiable_class_ptr); 152 // } 153 // static jvmtiError jvmtiAllocate(jvmtiEnv* env, jlong size, unsigned char** mem_ptr) { 154 // return (*env)->Allocate(env, size, mem_ptr); 155 // } 156 // static jvmtiError jvmtiDeallocate(jvmtiEnv* env, unsigned char* mem) { 157 // return (*env)->Deallocate(env, mem); 158 // } 159 // static jvmtiError jvmtiGetClassSignature(jvmtiEnv* env, jclass klass, char** signature_ptr, char** generic_ptr) { 160 // return (*env)->GetClassSignature(env, klass, signature_ptr, generic_ptr); 161 // } 162 // static jvmtiError jvmtiGetClassStatus(jvmtiEnv* env, jclass klass, jint* status_ptr) { 163 // return (*env)->GetClassStatus(env, klass, status_ptr); 164 // } 165 // static jvmtiError jvmtiGetSourceFileName(jvmtiEnv* env, jclass klass, char** source_name_ptr) { 166 // return (*env)->GetSourceFileName(env, klass, source_name_ptr); 167 // } 168 // static jvmtiError jvmtiGetClassModifiers(jvmtiEnv* env, jclass klass, jint* modifiers_ptr) { 169 // return (*env)->GetClassModifiers(env, klass, modifiers_ptr); 170 // } 171 // static jvmtiError jvmtiGetClassMethods(jvmtiEnv* env, jclass klass, jint* method_count_ptr, jmethodID** methods_ptr) { 172 // return (*env)->GetClassMethods(env, klass, method_count_ptr, methods_ptr); 173 // } 174 // static jvmtiError jvmtiGetClassFields(jvmtiEnv* env, jclass klass, jint* field_count_ptr, jfieldID** fields_ptr) { 175 // return (*env)->GetClassFields(env, klass, field_count_ptr, fields_ptr); 176 // } 177 // static jvmtiError jvmtiGetImplementedInterfaces(jvmtiEnv* env, jclass klass, jint* interface_count_ptr, jclass** interfaces_ptr) { 178 // return (*env)->GetImplementedInterfaces(env, klass, interface_count_ptr, interfaces_ptr); 179 // } 180 // static jvmtiError jvmtiIsInterface(jvmtiEnv* env, jclass klass, jboolean* is_interface_ptr) { 181 // return (*env)->IsInterface(env, klass, is_interface_ptr); 182 // } 183 // static jvmtiError jvmtiIsArrayClass(jvmtiEnv* env, jclass klass, jboolean* is_array_class_ptr) { 184 // return (*env)->IsArrayClass(env, klass, is_array_class_ptr); 185 // } 186 // static jvmtiError jvmtiGetClassLoader(jvmtiEnv* env, jclass klass, jobject* classloader_ptr) { 187 // return (*env)->GetClassLoader(env, klass, classloader_ptr); 188 // } 189 // static jvmtiError jvmtiGetObjectHashCode(jvmtiEnv* env, jobject object, jint* hash_code_ptr) { 190 // return (*env)->GetObjectHashCode(env, object, hash_code_ptr); 191 // } 192 // static jvmtiError jvmtiGetObjectMonitorUsage(jvmtiEnv* env, jobject object, jvmtiMonitorUsage* info_ptr) { 193 // return (*env)->GetObjectMonitorUsage(env, object, info_ptr); 194 // } 195 // static jvmtiError jvmtiGetFieldName(jvmtiEnv* env, jclass klass, jfieldID field, char** name_ptr, char** signature_ptr, char** generic_ptr) { 196 // return (*env)->GetFieldName(env, klass, field, name_ptr, signature_ptr, generic_ptr); 197 // } 198 // static jvmtiError jvmtiGetFieldDeclaringClass(jvmtiEnv* env, jclass klass, jfieldID field, jclass* declaring_class_ptr) { 199 // return (*env)->GetFieldDeclaringClass(env, klass, field, declaring_class_ptr); 200 // } 201 // static jvmtiError jvmtiGetFieldModifiers(jvmtiEnv* env, jclass klass, jfieldID field, jint* modifiers_ptr) { 202 // return (*env)->GetFieldModifiers(env, klass, field, modifiers_ptr); 203 // } 204 // static jvmtiError jvmtiIsFieldSynthetic(jvmtiEnv* env, jclass klass, jfieldID field, jboolean* is_synthetic_ptr) { 205 // return (*env)->IsFieldSynthetic(env, klass, field, is_synthetic_ptr); 206 // } 207 // static jvmtiError jvmtiGetMethodName(jvmtiEnv* env, jmethodID method, char** name_ptr, char** signature_ptr, char** generic_ptr) { 208 // return (*env)->GetMethodName(env, method, name_ptr, signature_ptr, generic_ptr); 209 // } 210 // static jvmtiError jvmtiGetMethodDeclaringClass(jvmtiEnv* env, jmethodID method, jclass* declaring_class_ptr) { 211 // return (*env)->GetMethodDeclaringClass(env, method, declaring_class_ptr); 212 // } 213 // static jvmtiError jvmtiGetMethodModifiers(jvmtiEnv* env, jmethodID method, jint* modifiers_ptr) { 214 // return (*env)->GetMethodModifiers(env, method, modifiers_ptr); 215 // } 216 // static jvmtiError jvmtiGetMaxLocals(jvmtiEnv* env, jmethodID method, jint* max_ptr) { 217 // return (*env)->GetMaxLocals(env, method, max_ptr); 218 // } 219 // static jvmtiError jvmtiGetArgumentsSize(jvmtiEnv* env, jmethodID method, jint* size_ptr) { 220 // return (*env)->GetArgumentsSize(env, method, size_ptr); 221 // } 222 // static jvmtiError jvmtiGetLineNumberTable(jvmtiEnv* env, jmethodID method, jint* entry_count_ptr, jvmtiLineNumberEntry** table_ptr) { 223 // return (*env)->GetLineNumberTable(env, method, entry_count_ptr, table_ptr); 224 // } 225 // static jvmtiError jvmtiGetMethodLocation(jvmtiEnv* env, jmethodID method, jlocation* start_location_ptr, jlocation* end_location_ptr) { 226 // return (*env)->GetMethodLocation(env, method, start_location_ptr, end_location_ptr); 227 // } 228 // static jvmtiError jvmtiGetLocalVariableTable(jvmtiEnv* env, jmethodID method, jint* entry_count_ptr, jvmtiLocalVariableEntry** table_ptr) { 229 // return (*env)->GetLocalVariableTable(env, method, entry_count_ptr, table_ptr); 230 // } 231 // static jvmtiError jvmtiSetNativeMethodPrefix(jvmtiEnv* env, const char* prefix) { 232 // return (*env)->SetNativeMethodPrefix(env, prefix); 233 // } 234 // static jvmtiError jvmtiSetNativeMethodPrefixes(jvmtiEnv* env, jint prefix_count, char** prefixes) { 235 // return (*env)->SetNativeMethodPrefixes(env, prefix_count, prefixes); 236 // } 237 // static jvmtiError jvmtiGetBytecodes(jvmtiEnv* env, jmethodID method, jint* bytecode_count_ptr, unsigned char** bytecodes_ptr) { 238 // return (*env)->GetBytecodes(env, method, bytecode_count_ptr, bytecodes_ptr); 239 // } 240 // static jvmtiError jvmtiIsMethodNative(jvmtiEnv* env, jmethodID method, jboolean* is_native_ptr) { 241 // return (*env)->IsMethodNative(env, method, is_native_ptr); 242 // } 243 // static jvmtiError jvmtiIsMethodSynthetic(jvmtiEnv* env, jmethodID method, jboolean* is_synthetic_ptr) { 244 // return (*env)->IsMethodSynthetic(env, method, is_synthetic_ptr); 245 // } 246 // static jvmtiError jvmtiGetLoadedClasses(jvmtiEnv* env, jint* class_count_ptr, jclass** classes_ptr) { 247 // return (*env)->GetLoadedClasses(env, class_count_ptr, classes_ptr); 248 // } 249 // static jvmtiError jvmtiGetClassLoaderClasses(jvmtiEnv* env, jobject initiating_loader, jint* class_count_ptr, jclass** classes_ptr) { 250 // return (*env)->GetClassLoaderClasses(env, initiating_loader, class_count_ptr, classes_ptr); 251 // } 252 // static jvmtiError jvmtiPopFrame(jvmtiEnv* env, jthread thread) { 253 // return (*env)->PopFrame(env, thread); 254 // } 255 // static jvmtiError jvmtiForceEarlyReturnObject(jvmtiEnv* env, jthread thread, jobject value) { 256 // return (*env)->ForceEarlyReturnObject(env, thread, value); 257 // } 258 // static jvmtiError jvmtiForceEarlyReturnInt(jvmtiEnv* env, jthread thread, jint value) { 259 // return (*env)->ForceEarlyReturnInt(env, thread, value); 260 // } 261 // static jvmtiError jvmtiForceEarlyReturnLong(jvmtiEnv* env, jthread thread, jlong value) { 262 // return (*env)->ForceEarlyReturnLong(env, thread, value); 263 // } 264 // static jvmtiError jvmtiForceEarlyReturnFloat(jvmtiEnv* env, jthread thread, jfloat value) { 265 // return (*env)->ForceEarlyReturnFloat(env, thread, value); 266 // } 267 // static jvmtiError jvmtiForceEarlyReturnDouble(jvmtiEnv* env, jthread thread, jdouble value) { 268 // return (*env)->ForceEarlyReturnDouble(env, thread, value); 269 // } 270 // static jvmtiError jvmtiForceEarlyReturnVoid(jvmtiEnv* env, jthread thread) { 271 // return (*env)->ForceEarlyReturnVoid(env, thread); 272 // } 273 // static jvmtiError jvmtiRedefineClasses(jvmtiEnv* env, jint class_count, const jvmtiClassDefinition* class_definitions) { 274 // return (*env)->RedefineClasses(env, class_count, class_definitions); 275 // } 276 // static jvmtiError jvmtiGetVersionNumber(jvmtiEnv* env, jint* version_ptr) { 277 // return (*env)->GetVersionNumber(env, version_ptr); 278 // } 279 // static jvmtiError jvmtiGetCapabilities(jvmtiEnv* env, jvmtiCapabilities* capabilities_ptr) { 280 // return (*env)->GetCapabilities(env, capabilities_ptr); 281 // } 282 // static jvmtiError jvmtiGetSourceDebugExtension(jvmtiEnv* env, jclass klass, char** source_debug_extension_ptr) { 283 // return (*env)->GetSourceDebugExtension(env, klass, source_debug_extension_ptr); 284 // } 285 // static jvmtiError jvmtiIsMethodObsolete(jvmtiEnv* env, jmethodID method, jboolean* is_obsolete_ptr) { 286 // return (*env)->IsMethodObsolete(env, method, is_obsolete_ptr); 287 // } 288 // static jvmtiError jvmtiSuspendThreadList(jvmtiEnv* env, jint request_count, const jthread* request_list, jvmtiError* results) { 289 // return (*env)->SuspendThreadList(env, request_count, request_list, results); 290 // } 291 // static jvmtiError jvmtiResumeThreadList(jvmtiEnv* env, jint request_count, const jthread* request_list, jvmtiError* results) { 292 // return (*env)->ResumeThreadList(env, request_count, request_list, results); 293 // } 294 // static jvmtiError jvmtiAddModuleReads(jvmtiEnv* env, jobject module, jobject to_module) { 295 // return (*env)->AddModuleReads(env, module, to_module); 296 // } 297 // static jvmtiError jvmtiAddModuleExports(jvmtiEnv* env, jobject module, const char* pkg_name, jobject to_module) { 298 // return (*env)->AddModuleExports(env, module, pkg_name, to_module); 299 // } 300 // static jvmtiError jvmtiAddModuleOpens(jvmtiEnv* env, jobject module, const char* pkg_name, jobject to_module) { 301 // return (*env)->AddModuleOpens(env, module, pkg_name, to_module); 302 // } 303 // static jvmtiError jvmtiAddModuleUses(jvmtiEnv* env, jobject module, jclass service) { 304 // return (*env)->AddModuleUses(env, module, service); 305 // } 306 // static jvmtiError jvmtiAddModuleProvides(jvmtiEnv* env, jobject module, jclass service, jclass impl_class) { 307 // return (*env)->AddModuleProvides(env, module, service, impl_class); 308 // } 309 // static jvmtiError jvmtiIsModifiableModule(jvmtiEnv* env, jobject module, jboolean* is_modifiable_module_ptr) { 310 // return (*env)->IsModifiableModule(env, module, is_modifiable_module_ptr); 311 // } 312 // static jvmtiError jvmtiGetAllStackTraces(jvmtiEnv* env, jint max_frame_count, jvmtiStackInfo** stack_info_ptr, jint* thread_count_ptr) { 313 // return (*env)->GetAllStackTraces(env, max_frame_count, stack_info_ptr, thread_count_ptr); 314 // } 315 // static jvmtiError jvmtiGetThreadListStackTraces(jvmtiEnv* env, jint thread_count, const jthread* thread_list, jint max_frame_count, jvmtiStackInfo** stack_info_ptr) { 316 // return (*env)->GetThreadListStackTraces(env, thread_count, thread_list, max_frame_count, stack_info_ptr); 317 // } 318 // static jvmtiError jvmtiGetThreadLocalStorage(jvmtiEnv* env, jthread thread, void** data_ptr) { 319 // return (*env)->GetThreadLocalStorage(env, thread, data_ptr); 320 // } 321 // static jvmtiError jvmtiSetThreadLocalStorage(jvmtiEnv* env, jthread thread, const void* data) { 322 // return (*env)->SetThreadLocalStorage(env, thread, data); 323 // } 324 // static jvmtiError jvmtiGetStackTrace(jvmtiEnv* env, jthread thread, jint start_depth, jint max_frame_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr) { 325 // return (*env)->GetStackTrace(env, thread, start_depth, max_frame_count, frame_buffer, count_ptr); 326 // } 327 // static jvmtiError jvmtiGetTag(jvmtiEnv* env, jobject object, jlong* tag_ptr) { 328 // return (*env)->GetTag(env, object, tag_ptr); 329 // } 330 // static jvmtiError jvmtiSetTag(jvmtiEnv* env, jobject object, jlong tag) { 331 // return (*env)->SetTag(env, object, tag); 332 // } 333 // static jvmtiError jvmtiIterateOverObjectsReachableFromObject(jvmtiEnv* env, jobject object, jvmtiObjectReferenceCallback object_reference_callback, const void* user_data) { 334 // return (*env)->IterateOverObjectsReachableFromObject(env, object, object_reference_callback, user_data); 335 // } 336 // static jvmtiError jvmtiIterateOverReachableObjects(jvmtiEnv* env, jvmtiHeapRootCallback heap_root_callback, jvmtiStackReferenceCallback stack_ref_callback, jvmtiObjectReferenceCallback object_ref_callback, const void* user_data) { 337 // return (*env)->IterateOverReachableObjects(env, heap_root_callback, stack_ref_callback, object_ref_callback, user_data); 338 // } 339 // static jvmtiError jvmtiIterateOverHeap(jvmtiEnv* env, jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void* user_data) { 340 // return (*env)->IterateOverHeap(env, object_filter, heap_object_callback, user_data); 341 // } 342 // static jvmtiError jvmtiIterateOverInstancesOfClass(jvmtiEnv* env, jclass klass, jvmtiHeapObjectFilter object_filter, jvmtiHeapObjectCallback heap_object_callback, const void* user_data) { 343 // return (*env)->IterateOverInstancesOfClass(env, klass, object_filter, heap_object_callback, user_data); 344 // } 345 // static jvmtiError jvmtiGetObjectsWithTags(jvmtiEnv* env, jint tag_count, const jlong* tags, jint* count_ptr, jobject** object_result_ptr, jlong** tag_result_ptr) { 346 // return (*env)->GetObjectsWithTags(env, tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr); 347 // } 348 // static jvmtiError jvmtiFollowReferences(jvmtiEnv* env, jint heap_filter, jclass klass, jobject initial_object, const jvmtiHeapCallbacks* callbacks, const void* user_data) { 349 // return (*env)->FollowReferences(env, heap_filter, klass, initial_object, callbacks, user_data); 350 // } 351 // static jvmtiError jvmtiIterateThroughHeap(jvmtiEnv* env, jint heap_filter, jclass klass, const jvmtiHeapCallbacks* callbacks, const void* user_data) { 352 // return (*env)->IterateThroughHeap(env, heap_filter, klass, callbacks, user_data); 353 // } 354 // static jvmtiError jvmtiSetJNIFunctionTable(jvmtiEnv* env, const jniNativeInterface* function_table) { 355 // return (*env)->SetJNIFunctionTable(env, function_table); 356 // } 357 // static jvmtiError jvmtiGetJNIFunctionTable(jvmtiEnv* env, jniNativeInterface** function_table) { 358 // return (*env)->GetJNIFunctionTable(env, function_table); 359 // } 360 // static jvmtiError jvmtiSetEventCallbacks(jvmtiEnv* env, const jvmtiEventCallbacks* callbacks, jint size_of_callbacks) { 361 // return (*env)->SetEventCallbacks(env, callbacks, size_of_callbacks); 362 // } 363 // static jvmtiError jvmtiGenerateEvents(jvmtiEnv* env, jvmtiEvent event_type) { 364 // return (*env)->GenerateEvents(env, event_type); 365 // } 366 // static jvmtiError jvmtiGetExtensionFunctions(jvmtiEnv* env, jint* extension_count_ptr, jvmtiExtensionFunctionInfo** extensions) { 367 // return (*env)->GetExtensionFunctions(env, extension_count_ptr, extensions); 368 // } 369 // static jvmtiError jvmtiGetExtensionEvents(jvmtiEnv* env, jint* extension_count_ptr, jvmtiExtensionEventInfo** extensions) { 370 // return (*env)->GetExtensionEvents(env, extension_count_ptr, extensions); 371 // } 372 // static jvmtiError jvmtiSetExtensionEventCallback(jvmtiEnv* env, jint extension_event_index, jvmtiExtensionEvent callback) { 373 // return (*env)->SetExtensionEventCallback(env, extension_event_index, callback); 374 // } 375 // static jvmtiError jvmtiGetErrorName(jvmtiEnv* env, jvmtiError error, char** name_ptr) { 376 // return (*env)->GetErrorName(env, error, name_ptr); 377 // } 378 // static jvmtiError jvmtiGetJLocationFormat(jvmtiEnv* env, jvmtiJlocationFormat* format_ptr) { 379 // return (*env)->GetJLocationFormat(env, format_ptr); 380 // } 381 // static jvmtiError jvmtiGetSystemProperties(jvmtiEnv* env, jint* count_ptr, char*** property_ptr) { 382 // return (*env)->GetSystemProperties(env, count_ptr, property_ptr); 383 // } 384 // static jvmtiError jvmtiGetSystemProperty(jvmtiEnv* env, const char* property, char** value_ptr) { 385 // return (*env)->GetSystemProperty(env, property, value_ptr); 386 // } 387 // static jvmtiError jvmtiSetSystemProperty(jvmtiEnv* env, const char* property, const char* value_ptr) { 388 // return (*env)->SetSystemProperty(env, property, value_ptr); 389 // } 390 // static jvmtiError jvmtiGetPhase(jvmtiEnv* env, jvmtiPhase* phase_ptr) { 391 // return (*env)->GetPhase(env, phase_ptr); 392 // } 393 // static jvmtiError jvmtiGetCurrentThreadCpuTimerInfo(jvmtiEnv* env, jvmtiTimerInfo* info_ptr) { 394 // return (*env)->GetCurrentThreadCpuTimerInfo(env, info_ptr); 395 // } 396 // static jvmtiError jvmtiGetCurrentThreadCpuTime(jvmtiEnv* env, jlong* nanos_ptr) { 397 // return (*env)->GetCurrentThreadCpuTime(env, nanos_ptr); 398 // } 399 // static jvmtiError jvmtiGetThreadCpuTimerInfo(jvmtiEnv* env, jvmtiTimerInfo* info_ptr) { 400 // return (*env)->GetThreadCpuTimerInfo(env, info_ptr); 401 // } 402 // static jvmtiError jvmtiGetThreadCpuTime(jvmtiEnv* env, jthread thread, jlong* nanos_ptr) { 403 // return (*env)->GetThreadCpuTime(env, thread, nanos_ptr); 404 // } 405 // static jvmtiError jvmtiGetTimerInfo(jvmtiEnv* env, jvmtiTimerInfo* info_ptr) { 406 // return (*env)->GetTimerInfo(env, info_ptr); 407 // } 408 // static jvmtiError jvmtiGetTime(jvmtiEnv* env, jlong* nanos_ptr) { 409 // return (*env)->GetTime(env, nanos_ptr); 410 // } 411 // static jvmtiError jvmtiGetPotentialCapabilities(jvmtiEnv* env, jvmtiCapabilities* capabilities_ptr) { 412 // return (*env)->GetPotentialCapabilities(env, capabilities_ptr); 413 // } 414 // static jvmtiError jvmtiAddCapabilities(jvmtiEnv* env, const jvmtiCapabilities* capabilities_ptr) { 415 // return (*env)->AddCapabilities(env, capabilities_ptr); 416 // } 417 // static jvmtiError jvmtiRelinquishCapabilities(jvmtiEnv* env, const jvmtiCapabilities* capabilities_ptr) { 418 // return (*env)->RelinquishCapabilities(env, capabilities_ptr); 419 // } 420 // static jvmtiError jvmtiGetAvailableProcessors(jvmtiEnv* env, jint* processor_count_ptr) { 421 // return (*env)->GetAvailableProcessors(env, processor_count_ptr); 422 // } 423 // static jvmtiError jvmtiGetClassVersionNumbers(jvmtiEnv* env, jclass klass, jint* minor_version_ptr, jint* major_version_ptr) { 424 // return (*env)->GetClassVersionNumbers(env, klass, minor_version_ptr, major_version_ptr); 425 // } 426 // static jvmtiError jvmtiGetConstantPool(jvmtiEnv* env, jclass klass, jint* constant_pool_count_ptr, jint* constant_pool_byte_count_ptr, unsigned char** constant_pool_bytes_ptr) { 427 // return (*env)->GetConstantPool(env, klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr); 428 // } 429 // static jvmtiError jvmtiGetEnvironmentLocalStorage(jvmtiEnv* env, void** data_ptr) { 430 // return (*env)->GetEnvironmentLocalStorage(env, data_ptr); 431 // } 432 // static jvmtiError jvmtiSetEnvironmentLocalStorage(jvmtiEnv* env, const void* data) { 433 // return (*env)->SetEnvironmentLocalStorage(env, data); 434 // } 435 // static jvmtiError jvmtiAddToBootstrapClassLoaderSearch(jvmtiEnv* env, const char* segment) { 436 // return (*env)->AddToBootstrapClassLoaderSearch(env, segment); 437 // } 438 // static jvmtiError jvmtiSetVerboseFlag(jvmtiEnv* env, jvmtiVerboseFlag flag, jboolean value) { 439 // return (*env)->SetVerboseFlag(env, flag, value); 440 // } 441 // static jvmtiError jvmtiAddToSystemClassLoaderSearch(jvmtiEnv* env, const char* segment) { 442 // return (*env)->AddToSystemClassLoaderSearch(env, segment); 443 // } 444 // static jvmtiError jvmtiRetransformClasses(jvmtiEnv* env, jint class_count, const jclass* classes) { 445 // return (*env)->RetransformClasses(env, class_count, classes); 446 // } 447 // static jvmtiError jvmtiGetOwnedMonitorStackDepthInfo(jvmtiEnv* env, jthread thread, jint* monitor_info_count_ptr, jvmtiMonitorStackDepthInfo** monitor_info_ptr) { 448 // return (*env)->GetOwnedMonitorStackDepthInfo(env, thread, monitor_info_count_ptr, monitor_info_ptr); 449 // } 450 // static jvmtiError jvmtiGetObjectSize(jvmtiEnv* env, jobject object, jlong* size_ptr) { 451 // return (*env)->GetObjectSize(env, object, size_ptr); 452 // } 453 // static jvmtiError jvmtiGetLocalInstance(jvmtiEnv* env, jthread thread, jint depth, jobject* value_ptr) { 454 // return (*env)->GetLocalInstance(env, thread, depth, value_ptr); 455 // } 456 // static jvmtiError jvmtiSetHeapSamplingInterval(jvmtiEnv* env, jint sampling_interval) { 457 // return (*env)->SetHeapSamplingInterval(env, sampling_interval); 458 // } 459 import "C" 460 461 import ( 462 "fmt" 463 "unsafe" 464 ) 465 const ( 466 JVMTI_VERSION_1 = 0x30010000 467 JVMTI_VERSION_1_0 = 0x30010000 468 JVMTI_VERSION_1_1 = 0x30010100 469 JVMTI_VERSION_1_2 = 0x30010200 470 JVMTI_VERSION_9 = 0x30090000 471 JVMTI_VERSION_11 = 0x300B0000 472 473 JVMTI_VERSION = 0x30000000 + (14 * 0x10000) + ( 0 * 0x100) + 0 /* version: 14.0.0 */ 474 ) 475 476 const ( 477 JVMTI_THREAD_STATE_ALIVE = 0x0001 478 JVMTI_THREAD_STATE_TERMINATED = 0x0002 479 JVMTI_THREAD_STATE_RUNNABLE = 0x0004 480 JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400 481 JVMTI_THREAD_STATE_WAITING = 0x0080 482 JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010 483 JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020 484 JVMTI_THREAD_STATE_SLEEPING = 0x0040 485 JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100 486 JVMTI_THREAD_STATE_PARKED = 0x0200 487 JVMTI_THREAD_STATE_SUSPENDED = 0x100000 488 JVMTI_THREAD_STATE_INTERRUPTED = 0x200000 489 JVMTI_THREAD_STATE_IN_NATIVE = 0x400000 490 JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000 491 JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000 492 JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000 493 ) 494 495 const ( 496 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 497 JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0 498 JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED 499 JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE 500 JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER 501 JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY 502 JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT 503 ) 504 505 const ( 506 JVMTI_THREAD_MIN_PRIORITY = 1 507 JVMTI_THREAD_NORM_PRIORITY = 5 508 JVMTI_THREAD_MAX_PRIORITY = 10 509 ) 510 511 const ( 512 JVMTI_HEAP_FILTER_TAGGED = 0x4 513 JVMTI_HEAP_FILTER_UNTAGGED = 0x8 514 JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10 515 JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20 516 ) 517 518 const ( 519 JVMTI_VISIT_OBJECTS = 0x100 520 JVMTI_VISIT_ABORT = 0x8000 521 ) 522 523 const ( 524 JVMTI_HEAP_REFERENCE_CLASS = 1 525 JVMTI_HEAP_REFERENCE_FIELD = 2 526 JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3 527 JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4 528 JVMTI_HEAP_REFERENCE_SIGNERS = 5 529 JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6 530 JVMTI_HEAP_REFERENCE_INTERFACE = 7 531 JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8 532 JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9 533 JVMTI_HEAP_REFERENCE_SUPERCLASS = 10 534 JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21 535 JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22 536 JVMTI_HEAP_REFERENCE_MONITOR = 23 537 JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24 538 JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25 539 JVMTI_HEAP_REFERENCE_THREAD = 26 540 JVMTI_HEAP_REFERENCE_OTHER = 27 541 ) 542 543 const ( 544 JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90 545 JVMTI_PRIMITIVE_TYPE_BYTE = 66 546 JVMTI_PRIMITIVE_TYPE_CHAR = 67 547 JVMTI_PRIMITIVE_TYPE_SHORT = 83 548 JVMTI_PRIMITIVE_TYPE_INT = 73 549 JVMTI_PRIMITIVE_TYPE_LONG = 74 550 JVMTI_PRIMITIVE_TYPE_FLOAT = 70 551 JVMTI_PRIMITIVE_TYPE_DOUBLE = 68 552 ) 553 554 const ( 555 JVMTI_HEAP_OBJECT_TAGGED = 1 556 JVMTI_HEAP_OBJECT_UNTAGGED = 2 557 JVMTI_HEAP_OBJECT_EITHER = 3 558 ) 559 560 const ( 561 JVMTI_HEAP_ROOT_JNI_GLOBAL = 1 562 JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2 563 JVMTI_HEAP_ROOT_MONITOR = 3 564 JVMTI_HEAP_ROOT_STACK_LOCAL = 4 565 JVMTI_HEAP_ROOT_JNI_LOCAL = 5 566 JVMTI_HEAP_ROOT_THREAD = 6 567 JVMTI_HEAP_ROOT_OTHER = 7 568 ) 569 570 const ( 571 JVMTI_REFERENCE_CLASS = 1 572 JVMTI_REFERENCE_FIELD = 2 573 JVMTI_REFERENCE_ARRAY_ELEMENT = 3 574 JVMTI_REFERENCE_CLASS_LOADER = 4 575 JVMTI_REFERENCE_SIGNERS = 5 576 JVMTI_REFERENCE_PROTECTION_DOMAIN = 6 577 JVMTI_REFERENCE_INTERFACE = 7 578 JVMTI_REFERENCE_STATIC_FIELD = 8 579 JVMTI_REFERENCE_CONSTANT_POOL = 9 580 ) 581 582 const ( 583 JVMTI_ITERATION_CONTINUE = 1 584 JVMTI_ITERATION_IGNORE = 2 585 JVMTI_ITERATION_ABORT = 0 586 ) 587 588 const ( 589 JVMTI_CLASS_STATUS_VERIFIED = 1 590 JVMTI_CLASS_STATUS_PREPARED = 2 591 JVMTI_CLASS_STATUS_INITIALIZED = 4 592 JVMTI_CLASS_STATUS_ERROR = 8 593 JVMTI_CLASS_STATUS_ARRAY = 16 594 JVMTI_CLASS_STATUS_PRIMITIVE = 32 595 ) 596 597 const ( 598 JVMTI_ENABLE = 1 599 JVMTI_DISABLE = 0 600 ) 601 602 const ( 603 JVMTI_TYPE_JBYTE = 101 604 JVMTI_TYPE_JCHAR = 102 605 JVMTI_TYPE_JSHORT = 103 606 JVMTI_TYPE_JINT = 104 607 JVMTI_TYPE_JLONG = 105 608 JVMTI_TYPE_JFLOAT = 106 609 JVMTI_TYPE_JDOUBLE = 107 610 JVMTI_TYPE_JBOOLEAN = 108 611 JVMTI_TYPE_JOBJECT = 109 612 JVMTI_TYPE_JTHREAD = 110 613 JVMTI_TYPE_JCLASS = 111 614 JVMTI_TYPE_JVALUE = 112 615 JVMTI_TYPE_JFIELDID = 113 616 JVMTI_TYPE_JMETHODID = 114 617 JVMTI_TYPE_CCHAR = 115 618 JVMTI_TYPE_CVOID = 116 619 JVMTI_TYPE_JNIENV = 117 620 ) 621 622 const ( 623 JVMTI_KIND_IN = 91 624 JVMTI_KIND_IN_PTR = 92 625 JVMTI_KIND_IN_BUF = 93 626 JVMTI_KIND_ALLOC_BUF = 94 627 JVMTI_KIND_ALLOC_ALLOC_BUF = 95 628 JVMTI_KIND_OUT = 96 629 JVMTI_KIND_OUT_BUF = 97 630 ) 631 632 const ( 633 JVMTI_TIMER_USER_CPU = 30 634 JVMTI_TIMER_TOTAL_CPU = 31 635 JVMTI_TIMER_ELAPSED = 32 636 ) 637 638 const ( 639 JVMTI_PHASE_ONLOAD = 1 640 JVMTI_PHASE_PRIMORDIAL = 2 641 JVMTI_PHASE_START = 6 642 JVMTI_PHASE_LIVE = 4 643 JVMTI_PHASE_DEAD = 8 644 ) 645 646 const ( 647 JVMTI_VERSION_INTERFACE_JNI = 0x00000000 648 JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000 649 ) 650 651 const ( 652 JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000 653 JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000 654 JVMTI_VERSION_MASK_MINOR = 0x0000FF00 655 JVMTI_VERSION_MASK_MICRO = 0x000000FF 656 ) 657 658 const ( 659 JVMTI_VERSION_SHIFT_MAJOR = 16 660 JVMTI_VERSION_SHIFT_MINOR = 8 661 JVMTI_VERSION_SHIFT_MICRO = 0 662 ) 663 664 const ( 665 JVMTI_VERBOSE_OTHER = 0 666 JVMTI_VERBOSE_GC = 1 667 JVMTI_VERBOSE_CLASS = 2 668 JVMTI_VERBOSE_JNI = 4 669 ) 670 671 const ( 672 JVMTI_JLOCATION_JVMBCI = 1 673 JVMTI_JLOCATION_MACHINEPC = 2 674 JVMTI_JLOCATION_OTHER = 0 675 ) 676 677 const ( 678 JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001 679 JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002 680 JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004 681 ) 682 683 const ( 684 JVMTI_ERROR_NONE = 0 685 JVMTI_ERROR_INVALID_THREAD = 10 686 JVMTI_ERROR_INVALID_THREAD_GROUP = 11 687 JVMTI_ERROR_INVALID_PRIORITY = 12 688 JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13 689 JVMTI_ERROR_THREAD_SUSPENDED = 14 690 JVMTI_ERROR_THREAD_NOT_ALIVE = 15 691 JVMTI_ERROR_INVALID_OBJECT = 20 692 JVMTI_ERROR_INVALID_CLASS = 21 693 JVMTI_ERROR_CLASS_NOT_PREPARED = 22 694 JVMTI_ERROR_INVALID_METHODID = 23 695 JVMTI_ERROR_INVALID_LOCATION = 24 696 JVMTI_ERROR_INVALID_FIELDID = 25 697 JVMTI_ERROR_INVALID_MODULE = 26 698 JVMTI_ERROR_NO_MORE_FRAMES = 31 699 JVMTI_ERROR_OPAQUE_FRAME = 32 700 JVMTI_ERROR_TYPE_MISMATCH = 34 701 JVMTI_ERROR_INVALID_SLOT = 35 702 JVMTI_ERROR_DUPLICATE = 40 703 JVMTI_ERROR_NOT_FOUND = 41 704 JVMTI_ERROR_INVALID_MONITOR = 50 705 JVMTI_ERROR_NOT_MONITOR_OWNER = 51 706 JVMTI_ERROR_INTERRUPT = 52 707 JVMTI_ERROR_INVALID_CLASS_FORMAT = 60 708 JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61 709 JVMTI_ERROR_FAILS_VERIFICATION = 62 710 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63 711 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64 712 JVMTI_ERROR_INVALID_TYPESTATE = 65 713 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66 714 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67 715 JVMTI_ERROR_UNSUPPORTED_VERSION = 68 716 JVMTI_ERROR_NAMES_DONT_MATCH = 69 717 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70 718 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71 719 JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED = 72 720 JVMTI_ERROR_UNMODIFIABLE_CLASS = 79 721 JVMTI_ERROR_UNMODIFIABLE_MODULE = 80 722 JVMTI_ERROR_NOT_AVAILABLE = 98 723 JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99 724 JVMTI_ERROR_NULL_POINTER = 100 725 JVMTI_ERROR_ABSENT_INFORMATION = 101 726 JVMTI_ERROR_INVALID_EVENT_TYPE = 102 727 JVMTI_ERROR_ILLEGAL_ARGUMENT = 103 728 JVMTI_ERROR_NATIVE_METHOD = 104 729 JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106 730 JVMTI_ERROR_OUT_OF_MEMORY = 110 731 JVMTI_ERROR_ACCESS_DENIED = 111 732 JVMTI_ERROR_WRONG_PHASE = 112 733 JVMTI_ERROR_INTERNAL = 113 734 JVMTI_ERROR_UNATTACHED_THREAD = 115 735 JVMTI_ERROR_INVALID_ENVIRONMENT = 116 736 JVMTI_ERROR_MAX = 116 737 ) 738 739 const ( 740 JVMTI_MIN_EVENT_TYPE_VAL = 50 741 JVMTI_EVENT_VM_INIT = 50 742 JVMTI_EVENT_VM_DEATH = 51 743 JVMTI_EVENT_THREAD_START = 52 744 JVMTI_EVENT_THREAD_END = 53 745 JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54 746 JVMTI_EVENT_CLASS_LOAD = 55 747 JVMTI_EVENT_CLASS_PREPARE = 56 748 JVMTI_EVENT_VM_START = 57 749 JVMTI_EVENT_EXCEPTION = 58 750 JVMTI_EVENT_EXCEPTION_CATCH = 59 751 JVMTI_EVENT_SINGLE_STEP = 60 752 JVMTI_EVENT_FRAME_POP = 61 753 JVMTI_EVENT_BREAKPOINT = 62 754 JVMTI_EVENT_FIELD_ACCESS = 63 755 JVMTI_EVENT_FIELD_MODIFICATION = 64 756 JVMTI_EVENT_METHOD_ENTRY = 65 757 JVMTI_EVENT_METHOD_EXIT = 66 758 JVMTI_EVENT_NATIVE_METHOD_BIND = 67 759 JVMTI_EVENT_COMPILED_METHOD_LOAD = 68 760 JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69 761 JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70 762 JVMTI_EVENT_DATA_DUMP_REQUEST = 71 763 JVMTI_EVENT_MONITOR_WAIT = 73 764 JVMTI_EVENT_MONITOR_WAITED = 74 765 JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75 766 JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76 767 JVMTI_EVENT_RESOURCE_EXHAUSTED = 80 768 JVMTI_EVENT_GARBAGE_COLLECTION_START = 81 769 JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82 770 JVMTI_EVENT_OBJECT_FREE = 83 771 JVMTI_EVENT_VM_OBJECT_ALLOC = 84 772 JVMTI_EVENT_SAMPLED_OBJECT_ALLOC = 86 773 JVMTI_MAX_EVENT_TYPE_VAL = 86 774 ) 775 776 777 778 // jvmtiEnv corresponds to jvmtiEnv* 779 type jvmtiEnv uintptr 780 781 func (jvmti jvmtiEnv) raw() *C.jvmtiEnv { 782 return (*C.jvmtiEnv)(unsafe.Pointer(jvmti)) 783 } 784 785 func (jvmti jvmtiEnv) asPointer() unsafe.Pointer { 786 return unsafe.Pointer(jvmti) 787 } 788 789 790 func (jvmti jvmtiEnv) setEventNotificationMode(mode C.jvmtiEventMode, event_type C.jvmtiEvent, event_thread C.jthread) C.jvmtiError { 791 return C.jvmtiSetEventNotificationMode(jvmti.raw(), mode, event_type, event_thread) 792 } 793 794 func (jvmti jvmtiEnv) getAllModules(module_count_ptr *C.jint, modules_ptr **C.jobject) C.jvmtiError { 795 return C.jvmtiGetAllModules(jvmti.raw(), module_count_ptr, modules_ptr) 796 } 797 798 func (jvmti jvmtiEnv) getAllThreads(threads_count_ptr *C.jint, threads_ptr **C.jthread) C.jvmtiError { 799 return C.jvmtiGetAllThreads(jvmti.raw(), threads_count_ptr, threads_ptr) 800 } 801 802 func (jvmti jvmtiEnv) suspendThread(thread C.jthread) C.jvmtiError { 803 return C.jvmtiSuspendThread(jvmti.raw(), thread) 804 } 805 806 func (jvmti jvmtiEnv) resumeThread(thread C.jthread) C.jvmtiError { 807 return C.jvmtiResumeThread(jvmti.raw(), thread) 808 } 809 810 func (jvmti jvmtiEnv) stopThread(thread C.jthread, exception C.jobject) C.jvmtiError { 811 return C.jvmtiStopThread(jvmti.raw(), thread, exception) 812 } 813 814 func (jvmti jvmtiEnv) interruptThread(thread C.jthread) C.jvmtiError { 815 return C.jvmtiInterruptThread(jvmti.raw(), thread) 816 } 817 818 func (jvmti jvmtiEnv) getThreadInfo(thread C.jthread, info_ptr *C.jvmtiThreadInfo) C.jvmtiError { 819 return C.jvmtiGetThreadInfo(jvmti.raw(), thread, info_ptr) 820 } 821 822 func (jvmti jvmtiEnv) getOwnedMonitorInfo(thread C.jthread, owned_monitor_count_ptr *C.jint, owned_monitors_ptr **C.jobject) C.jvmtiError { 823 return C.jvmtiGetOwnedMonitorInfo(jvmti.raw(), thread, owned_monitor_count_ptr, owned_monitors_ptr) 824 } 825 826 func (jvmti jvmtiEnv) getCurrentContendedMonitor(thread C.jthread, monitor_ptr *C.jobject) C.jvmtiError { 827 return C.jvmtiGetCurrentContendedMonitor(jvmti.raw(), thread, monitor_ptr) 828 } 829 830 func (jvmti jvmtiEnv) runAgentThread(thread C.jthread, proc C.jvmtiStartFunction, arg unsafe.Pointer, priority C.jint) C.jvmtiError { 831 return C.jvmtiRunAgentThread(jvmti.raw(), thread, proc, arg, priority) 832 } 833 834 func (jvmti jvmtiEnv) getTopThreadGroups(group_count_ptr *C.jint, groups_ptr **C.jthreadGroup) C.jvmtiError { 835 return C.jvmtiGetTopThreadGroups(jvmti.raw(), group_count_ptr, groups_ptr) 836 } 837 838 func (jvmti jvmtiEnv) getThreadGroupInfo(group C.jthreadGroup, info_ptr *C.jvmtiThreadGroupInfo) C.jvmtiError { 839 return C.jvmtiGetThreadGroupInfo(jvmti.raw(), group, info_ptr) 840 } 841 842 func (jvmti jvmtiEnv) getThreadGroupChildren(group C.jthreadGroup, thread_count_ptr *C.jint, threads_ptr **C.jthread, group_count_ptr *C.jint, groups_ptr **C.jthreadGroup) C.jvmtiError { 843 return C.jvmtiGetThreadGroupChildren(jvmti.raw(), group, thread_count_ptr, threads_ptr, group_count_ptr, groups_ptr) 844 } 845 846 func (jvmti jvmtiEnv) getFrameCount(thread C.jthread, count_ptr *C.jint) C.jvmtiError { 847 return C.jvmtiGetFrameCount(jvmti.raw(), thread, count_ptr) 848 } 849 850 func (jvmti jvmtiEnv) getThreadState(thread C.jthread, thread_state_ptr *C.jint) C.jvmtiError { 851 return C.jvmtiGetThreadState(jvmti.raw(), thread, thread_state_ptr) 852 } 853 854 func (jvmti jvmtiEnv) getCurrentThread(thread_ptr *C.jthread) C.jvmtiError { 855 return C.jvmtiGetCurrentThread(jvmti.raw(), thread_ptr) 856 } 857 858 func (jvmti jvmtiEnv) getFrameLocation(thread C.jthread, depth C.jint, method_ptr *C.jmethodID, location_ptr *C.jlocation) C.jvmtiError { 859 return C.jvmtiGetFrameLocation(jvmti.raw(), thread, depth, method_ptr, location_ptr) 860 } 861 862 func (jvmti jvmtiEnv) notifyFramePop(thread C.jthread, depth C.jint) C.jvmtiError { 863 return C.jvmtiNotifyFramePop(jvmti.raw(), thread, depth) 864 } 865 866 func (jvmti jvmtiEnv) getLocalObject(thread C.jthread, depth C.jint, slot C.jint, value_ptr *C.jobject) C.jvmtiError { 867 return C.jvmtiGetLocalObject(jvmti.raw(), thread, depth, slot, value_ptr) 868 } 869 870 func (jvmti jvmtiEnv) getLocalInt(thread C.jthread, depth C.jint, slot C.jint, value_ptr *C.jint) C.jvmtiError { 871 return C.jvmtiGetLocalInt(jvmti.raw(), thread, depth, slot, value_ptr) 872 } 873 874 func (jvmti jvmtiEnv) getLocalLong(thread C.jthread, depth C.jint, slot C.jint, value_ptr *C.jlong) C.jvmtiError { 875 return C.jvmtiGetLocalLong(jvmti.raw(), thread, depth, slot, value_ptr) 876 } 877 878 func (jvmti jvmtiEnv) getLocalFloat(thread C.jthread, depth C.jint, slot C.jint, value_ptr *C.jfloat) C.jvmtiError { 879 return C.jvmtiGetLocalFloat(jvmti.raw(), thread, depth, slot, value_ptr) 880 } 881 882 func (jvmti jvmtiEnv) getLocalDouble(thread C.jthread, depth C.jint, slot C.jint, value_ptr *C.jdouble) C.jvmtiError { 883 return C.jvmtiGetLocalDouble(jvmti.raw(), thread, depth, slot, value_ptr) 884 } 885 886 func (jvmti jvmtiEnv) setLocalObject(thread C.jthread, depth C.jint, slot C.jint, value C.jobject) C.jvmtiError { 887 return C.jvmtiSetLocalObject(jvmti.raw(), thread, depth, slot, value) 888 } 889 890 func (jvmti jvmtiEnv) setLocalInt(thread C.jthread, depth C.jint, slot C.jint, value C.jint) C.jvmtiError { 891 return C.jvmtiSetLocalInt(jvmti.raw(), thread, depth, slot, value) 892 } 893 894 func (jvmti jvmtiEnv) setLocalLong(thread C.jthread, depth C.jint, slot C.jint, value C.jlong) C.jvmtiError { 895 return C.jvmtiSetLocalLong(jvmti.raw(), thread, depth, slot, value) 896 } 897 898 func (jvmti jvmtiEnv) setLocalFloat(thread C.jthread, depth C.jint, slot C.jint, value C.jfloat) C.jvmtiError { 899 return C.jvmtiSetLocalFloat(jvmti.raw(), thread, depth, slot, value) 900 } 901 902 func (jvmti jvmtiEnv) setLocalDouble(thread C.jthread, depth C.jint, slot C.jint, value C.jdouble) C.jvmtiError { 903 return C.jvmtiSetLocalDouble(jvmti.raw(), thread, depth, slot, value) 904 } 905 906 func (jvmti jvmtiEnv) createRawMonitor(name *C.char, monitor_ptr *C.jrawMonitorID) C.jvmtiError { 907 return C.jvmtiCreateRawMonitor(jvmti.raw(), name, monitor_ptr) 908 } 909 910 func (jvmti jvmtiEnv) destroyRawMonitor(monitor C.jrawMonitorID) C.jvmtiError { 911 return C.jvmtiDestroyRawMonitor(jvmti.raw(), monitor) 912 } 913 914 func (jvmti jvmtiEnv) rawMonitorEnter(monitor C.jrawMonitorID) C.jvmtiError { 915 return C.jvmtiRawMonitorEnter(jvmti.raw(), monitor) 916 } 917 918 func (jvmti jvmtiEnv) rawMonitorExit(monitor C.jrawMonitorID) C.jvmtiError { 919 return C.jvmtiRawMonitorExit(jvmti.raw(), monitor) 920 } 921 922 func (jvmti jvmtiEnv) rawMonitorWait(monitor C.jrawMonitorID, millis C.jlong) C.jvmtiError { 923 return C.jvmtiRawMonitorWait(jvmti.raw(), monitor, millis) 924 } 925 926 func (jvmti jvmtiEnv) rawMonitorNotify(monitor C.jrawMonitorID) C.jvmtiError { 927 return C.jvmtiRawMonitorNotify(jvmti.raw(), monitor) 928 } 929 930 func (jvmti jvmtiEnv) rawMonitorNotifyAll(monitor C.jrawMonitorID) C.jvmtiError { 931 return C.jvmtiRawMonitorNotifyAll(jvmti.raw(), monitor) 932 } 933 934 func (jvmti jvmtiEnv) setBreakpoint(method C.jmethodID, location C.jlocation) C.jvmtiError { 935 return C.jvmtiSetBreakpoint(jvmti.raw(), method, location) 936 } 937 938 func (jvmti jvmtiEnv) clearBreakpoint(method C.jmethodID, location C.jlocation) C.jvmtiError { 939 return C.jvmtiClearBreakpoint(jvmti.raw(), method, location) 940 } 941 942 func (jvmti jvmtiEnv) getNamedModule(class_loader C.jobject, package_name *C.char, module_ptr *C.jobject) C.jvmtiError { 943 return C.jvmtiGetNamedModule(jvmti.raw(), class_loader, package_name, module_ptr) 944 } 945 946 func (jvmti jvmtiEnv) setFieldAccessWatch(klass C.jclass, field C.jfieldID) C.jvmtiError { 947 return C.jvmtiSetFieldAccessWatch(jvmti.raw(), klass, field) 948 } 949 950 func (jvmti jvmtiEnv) clearFieldAccessWatch(klass C.jclass, field C.jfieldID) C.jvmtiError { 951 return C.jvmtiClearFieldAccessWatch(jvmti.raw(), klass, field) 952 } 953 954 func (jvmti jvmtiEnv) setFieldModificationWatch(klass C.jclass, field C.jfieldID) C.jvmtiError { 955 return C.jvmtiSetFieldModificationWatch(jvmti.raw(), klass, field) 956 } 957 958 func (jvmti jvmtiEnv) clearFieldModificationWatch(klass C.jclass, field C.jfieldID) C.jvmtiError { 959 return C.jvmtiClearFieldModificationWatch(jvmti.raw(), klass, field) 960 } 961 962 func (jvmti jvmtiEnv) isModifiableClass(klass C.jclass, is_modifiable_class_ptr *C.jboolean) C.jvmtiError { 963 return C.jvmtiIsModifiableClass(jvmti.raw(), klass, is_modifiable_class_ptr) 964 } 965 966 func (jvmti jvmtiEnv) allocate(size C.jlong, mem_ptr **C.uchar) C.jvmtiError { 967 return C.jvmtiAllocate(jvmti.raw(), size, mem_ptr) 968 } 969 970 func (jvmti jvmtiEnv) deallocate(mem *C.uchar) C.jvmtiError { 971 return C.jvmtiDeallocate(jvmti.raw(), mem) 972 } 973 974 func (jvmti jvmtiEnv) getClassSignature(klass C.jclass, signature_ptr **C.char, generic_ptr **C.char) C.jvmtiError { 975 return C.jvmtiGetClassSignature(jvmti.raw(), klass, signature_ptr, generic_ptr) 976 } 977 978 func (jvmti jvmtiEnv) getClassStatus(klass C.jclass, status_ptr *C.jint) C.jvmtiError { 979 return C.jvmtiGetClassStatus(jvmti.raw(), klass, status_ptr) 980 } 981 982 func (jvmti jvmtiEnv) getSourceFileName(klass C.jclass, source_name_ptr **C.char) C.jvmtiError { 983 return C.jvmtiGetSourceFileName(jvmti.raw(), klass, source_name_ptr) 984 } 985 986 func (jvmti jvmtiEnv) getClassModifiers(klass C.jclass, modifiers_ptr *C.jint) C.jvmtiError { 987 return C.jvmtiGetClassModifiers(jvmti.raw(), klass, modifiers_ptr) 988 } 989 990 func (jvmti jvmtiEnv) getClassMethods(klass C.jclass, method_count_ptr *C.jint, methods_ptr **C.jmethodID) C.jvmtiError { 991 return C.jvmtiGetClassMethods(jvmti.raw(), klass, method_count_ptr, methods_ptr) 992 } 993 994 func (jvmti jvmtiEnv) getClassFields(klass C.jclass, field_count_ptr *C.jint, fields_ptr **C.jfieldID) C.jvmtiError { 995 return C.jvmtiGetClassFields(jvmti.raw(), klass, field_count_ptr, fields_ptr) 996 } 997 998 func (jvmti jvmtiEnv) getImplementedInterfaces(klass C.jclass, interface_count_ptr *C.jint, interfaces_ptr **C.jclass) C.jvmtiError { 999 return C.jvmtiGetImplementedInterfaces(jvmti.raw(), klass, interface_count_ptr, interfaces_ptr) 1000 } 1001 1002 func (jvmti jvmtiEnv) isInterface(klass C.jclass, is_interface_ptr *C.jboolean) C.jvmtiError { 1003 return C.jvmtiIsInterface(jvmti.raw(), klass, is_interface_ptr) 1004 } 1005 1006 func (jvmti jvmtiEnv) isArrayClass(klass C.jclass, is_array_class_ptr *C.jboolean) C.jvmtiError { 1007 return C.jvmtiIsArrayClass(jvmti.raw(), klass, is_array_class_ptr) 1008 } 1009 1010 func (jvmti jvmtiEnv) getClassLoader(klass C.jclass, classloader_ptr *C.jobject) C.jvmtiError { 1011 return C.jvmtiGetClassLoader(jvmti.raw(), klass, classloader_ptr) 1012 } 1013 1014 func (jvmti jvmtiEnv) getObjectHashCode(object C.jobject, hash_code_ptr *C.jint) C.jvmtiError { 1015 return C.jvmtiGetObjectHashCode(jvmti.raw(), object, hash_code_ptr) 1016 } 1017 1018 func (jvmti jvmtiEnv) getObjectMonitorUsage(object C.jobject, info_ptr *C.jvmtiMonitorUsage) C.jvmtiError { 1019 return C.jvmtiGetObjectMonitorUsage(jvmti.raw(), object, info_ptr) 1020 } 1021 1022 func (jvmti jvmtiEnv) getFieldName(klass C.jclass, field C.jfieldID, name_ptr **C.char, signature_ptr **C.char, generic_ptr **C.char) C.jvmtiError { 1023 return C.jvmtiGetFieldName(jvmti.raw(), klass, field, name_ptr, signature_ptr, generic_ptr) 1024 } 1025 1026 func (jvmti jvmtiEnv) getFieldDeclaringClass(klass C.jclass, field C.jfieldID, declaring_class_ptr *C.jclass) C.jvmtiError { 1027 return C.jvmtiGetFieldDeclaringClass(jvmti.raw(), klass, field, declaring_class_ptr) 1028 } 1029 1030 func (jvmti jvmtiEnv) getFieldModifiers(klass C.jclass, field C.jfieldID, modifiers_ptr *C.jint) C.jvmtiError { 1031 return C.jvmtiGetFieldModifiers(jvmti.raw(), klass, field, modifiers_ptr) 1032 } 1033 1034 func (jvmti jvmtiEnv) isFieldSynthetic(klass C.jclass, field C.jfieldID, is_synthetic_ptr *C.jboolean) C.jvmtiError { 1035 return C.jvmtiIsFieldSynthetic(jvmti.raw(), klass, field, is_synthetic_ptr) 1036 } 1037 1038 func (jvmti jvmtiEnv) getMethodName(method C.jmethodID, name_ptr **C.char, signature_ptr **C.char, generic_ptr **C.char) C.jvmtiError { 1039 return C.jvmtiGetMethodName(jvmti.raw(), method, name_ptr, signature_ptr, generic_ptr) 1040 } 1041 1042 func (jvmti jvmtiEnv) getMethodDeclaringClass(method C.jmethodID, declaring_class_ptr *C.jclass) C.jvmtiError { 1043 return C.jvmtiGetMethodDeclaringClass(jvmti.raw(), method, declaring_class_ptr) 1044 } 1045 1046 func (jvmti jvmtiEnv) getMethodModifiers(method C.jmethodID, modifiers_ptr *C.jint) C.jvmtiError { 1047 return C.jvmtiGetMethodModifiers(jvmti.raw(), method, modifiers_ptr) 1048 } 1049 1050 func (jvmti jvmtiEnv) getMaxLocals(method C.jmethodID, max_ptr *C.jint) C.jvmtiError { 1051 return C.jvmtiGetMaxLocals(jvmti.raw(), method, max_ptr) 1052 } 1053 1054 func (jvmti jvmtiEnv) getArgumentsSize(method C.jmethodID, size_ptr *C.jint) C.jvmtiError { 1055 return C.jvmtiGetArgumentsSize(jvmti.raw(), method, size_ptr) 1056 } 1057 1058 func (jvmti jvmtiEnv) getLineNumberTable(method C.jmethodID, entry_count_ptr *C.jint, table_ptr **C.jvmtiLineNumberEntry) C.jvmtiError { 1059 return C.jvmtiGetLineNumberTable(jvmti.raw(), method, entry_count_ptr, table_ptr) 1060 } 1061 1062 func (jvmti jvmtiEnv) getMethodLocation(method C.jmethodID, start_location_ptr *C.jlocation, end_location_ptr *C.jlocation) C.jvmtiError { 1063 return C.jvmtiGetMethodLocation(jvmti.raw(), method, start_location_ptr, end_location_ptr) 1064 } 1065 1066 func (jvmti jvmtiEnv) getLocalVariableTable(method C.jmethodID, entry_count_ptr *C.jint, table_ptr **C.jvmtiLocalVariableEntry) C.jvmtiError { 1067 return C.jvmtiGetLocalVariableTable(jvmti.raw(), method, entry_count_ptr, table_ptr) 1068 } 1069 1070 func (jvmti jvmtiEnv) setNativeMethodPrefix(prefix *C.char) C.jvmtiError { 1071 return C.jvmtiSetNativeMethodPrefix(jvmti.raw(), prefix) 1072 } 1073 1074 func (jvmti jvmtiEnv) setNativeMethodPrefixes(prefix_count C.jint, prefixes **C.char) C.jvmtiError { 1075 return C.jvmtiSetNativeMethodPrefixes(jvmti.raw(), prefix_count, prefixes) 1076 } 1077 1078 func (jvmti jvmtiEnv) getBytecodes(method C.jmethodID, bytecode_count_ptr *C.jint, bytecodes_ptr **C.uchar) C.jvmtiError { 1079 return C.jvmtiGetBytecodes(jvmti.raw(), method, bytecode_count_ptr, bytecodes_ptr) 1080 } 1081 1082 func (jvmti jvmtiEnv) isMethodNative(method C.jmethodID, is_native_ptr *C.jboolean) C.jvmtiError { 1083 return C.jvmtiIsMethodNative(jvmti.raw(), method, is_native_ptr) 1084 } 1085 1086 func (jvmti jvmtiEnv) isMethodSynthetic(method C.jmethodID, is_synthetic_ptr *C.jboolean) C.jvmtiError { 1087 return C.jvmtiIsMethodSynthetic(jvmti.raw(), method, is_synthetic_ptr) 1088 } 1089 1090 func (jvmti jvmtiEnv) getLoadedClasses(class_count_ptr *C.jint, classes_ptr **C.jclass) C.jvmtiError { 1091 return C.jvmtiGetLoadedClasses(jvmti.raw(), class_count_ptr, classes_ptr) 1092 } 1093 1094 func (jvmti jvmtiEnv) getClassLoaderClasses(initiating_loader C.jobject, class_count_ptr *C.jint, classes_ptr **C.jclass) C.jvmtiError { 1095 return C.jvmtiGetClassLoaderClasses(jvmti.raw(), initiating_loader, class_count_ptr, classes_ptr) 1096 } 1097 1098 func (jvmti jvmtiEnv) popFrame(thread C.jthread) C.jvmtiError { 1099 return C.jvmtiPopFrame(jvmti.raw(), thread) 1100 } 1101 1102 func (jvmti jvmtiEnv) forceEarlyReturnObject(thread C.jthread, value C.jobject) C.jvmtiError { 1103 return C.jvmtiForceEarlyReturnObject(jvmti.raw(), thread, value) 1104 } 1105 1106 func (jvmti jvmtiEnv) forceEarlyReturnInt(thread C.jthread, value C.jint) C.jvmtiError { 1107 return C.jvmtiForceEarlyReturnInt(jvmti.raw(), thread, value) 1108 } 1109 1110 func (jvmti jvmtiEnv) forceEarlyReturnLong(thread C.jthread, value C.jlong) C.jvmtiError { 1111 return C.jvmtiForceEarlyReturnLong(jvmti.raw(), thread, value) 1112 } 1113 1114 func (jvmti jvmtiEnv) forceEarlyReturnFloat(thread C.jthread, value C.jfloat) C.jvmtiError { 1115 return C.jvmtiForceEarlyReturnFloat(jvmti.raw(), thread, value) 1116 } 1117 1118 func (jvmti jvmtiEnv) forceEarlyReturnDouble(thread C.jthread, value C.jdouble) C.jvmtiError { 1119 return C.jvmtiForceEarlyReturnDouble(jvmti.raw(), thread, value) 1120 } 1121 1122 func (jvmti jvmtiEnv) forceEarlyReturnVoid(thread C.jthread) C.jvmtiError { 1123 return C.jvmtiForceEarlyReturnVoid(jvmti.raw(), thread) 1124 } 1125 1126 func (jvmti jvmtiEnv) redefineClasses(class_count C.jint, class_definitions *C.jvmtiClassDefinition) C.jvmtiError { 1127 return C.jvmtiRedefineClasses(jvmti.raw(), class_count, class_definitions) 1128 } 1129 1130 func (jvmti jvmtiEnv) getVersionNumber(version_ptr *C.jint) C.jvmtiError { 1131 return C.jvmtiGetVersionNumber(jvmti.raw(), version_ptr) 1132 } 1133 1134 func (jvmti jvmtiEnv) getCapabilities(capabilities_ptr *C.jvmtiCapabilities) C.jvmtiError { 1135 return C.jvmtiGetCapabilities(jvmti.raw(), capabilities_ptr) 1136 } 1137 1138 func (jvmti jvmtiEnv) getSourceDebugExtension(klass C.jclass, source_debug_extension_ptr **C.char) C.jvmtiError { 1139 return C.jvmtiGetSourceDebugExtension(jvmti.raw(), klass, source_debug_extension_ptr) 1140 } 1141 1142 func (jvmti jvmtiEnv) isMethodObsolete(method C.jmethodID, is_obsolete_ptr *C.jboolean) C.jvmtiError { 1143 return C.jvmtiIsMethodObsolete(jvmti.raw(), method, is_obsolete_ptr) 1144 } 1145 1146 func (jvmti jvmtiEnv) suspendThreadList(request_count C.jint, request_list *C.jthread, results *C.jvmtiError) C.jvmtiError { 1147 return C.jvmtiSuspendThreadList(jvmti.raw(), request_count, request_list, results) 1148 } 1149 1150 func (jvmti jvmtiEnv) resumeThreadList(request_count C.jint, request_list *C.jthread, results *C.jvmtiError) C.jvmtiError { 1151 return C.jvmtiResumeThreadList(jvmti.raw(), request_count, request_list, results) 1152 } 1153 1154 func (jvmti jvmtiEnv) addModuleReads(module C.jobject, to_module C.jobject) C.jvmtiError { 1155 return C.jvmtiAddModuleReads(jvmti.raw(), module, to_module) 1156 } 1157 1158 func (jvmti jvmtiEnv) addModuleExports(module C.jobject, pkg_name *C.char, to_module C.jobject) C.jvmtiError { 1159 return C.jvmtiAddModuleExports(jvmti.raw(), module, pkg_name, to_module) 1160 } 1161 1162 func (jvmti jvmtiEnv) addModuleOpens(module C.jobject, pkg_name *C.char, to_module C.jobject) C.jvmtiError { 1163 return C.jvmtiAddModuleOpens(jvmti.raw(), module, pkg_name, to_module) 1164 } 1165 1166 func (jvmti jvmtiEnv) addModuleUses(module C.jobject, service C.jclass) C.jvmtiError { 1167 return C.jvmtiAddModuleUses(jvmti.raw(), module, service) 1168 } 1169 1170 func (jvmti jvmtiEnv) addModuleProvides(module C.jobject, service C.jclass, impl_class C.jclass) C.jvmtiError { 1171 return C.jvmtiAddModuleProvides(jvmti.raw(), module, service, impl_class) 1172 } 1173 1174 func (jvmti jvmtiEnv) isModifiableModule(module C.jobject, is_modifiable_module_ptr *C.jboolean) C.jvmtiError { 1175 return C.jvmtiIsModifiableModule(jvmti.raw(), module, is_modifiable_module_ptr) 1176 } 1177 1178 func (jvmti jvmtiEnv) getAllStackTraces(max_frame_count C.jint, stack_info_ptr **C.jvmtiStackInfo, thread_count_ptr *C.jint) C.jvmtiError { 1179 return C.jvmtiGetAllStackTraces(jvmti.raw(), max_frame_count, stack_info_ptr, thread_count_ptr) 1180 } 1181 1182 func (jvmti jvmtiEnv) getThreadListStackTraces(thread_count C.jint, thread_list *C.jthread, max_frame_count C.jint, stack_info_ptr **C.jvmtiStackInfo) C.jvmtiError { 1183 return C.jvmtiGetThreadListStackTraces(jvmti.raw(), thread_count, thread_list, max_frame_count, stack_info_ptr) 1184 } 1185 1186 func (jvmti jvmtiEnv) getThreadLocalStorage(thread C.jthread, data_ptr *unsafe.Pointer) C.jvmtiError { 1187 return C.jvmtiGetThreadLocalStorage(jvmti.raw(), thread, data_ptr) 1188 } 1189 1190 func (jvmti jvmtiEnv) setThreadLocalStorage(thread C.jthread, data unsafe.Pointer) C.jvmtiError { 1191 return C.jvmtiSetThreadLocalStorage(jvmti.raw(), thread, data) 1192 } 1193 1194 func (jvmti jvmtiEnv) getStackTrace(thread C.jthread, start_depth C.jint, max_frame_count C.jint, frame_buffer *C.jvmtiFrameInfo, count_ptr *C.jint) C.jvmtiError { 1195 return C.jvmtiGetStackTrace(jvmti.raw(), thread, start_depth, max_frame_count, frame_buffer, count_ptr) 1196 } 1197 1198 func (jvmti jvmtiEnv) getTag(object C.jobject, tag_ptr *C.jlong) C.jvmtiError { 1199 return C.jvmtiGetTag(jvmti.raw(), object, tag_ptr) 1200 } 1201 1202 func (jvmti jvmtiEnv) setTag(object C.jobject, tag C.jlong) C.jvmtiError { 1203 return C.jvmtiSetTag(jvmti.raw(), object, tag) 1204 } 1205 1206 func (jvmti jvmtiEnv) iterateOverObjectsReachableFromObject(object C.jobject, object_reference_callback C.jvmtiObjectReferenceCallback, user_data unsafe.Pointer) C.jvmtiError { 1207 return C.jvmtiIterateOverObjectsReachableFromObject(jvmti.raw(), object, object_reference_callback, user_data) 1208 } 1209 1210 func (jvmti jvmtiEnv) iterateOverReachableObjects(heap_root_callback C.jvmtiHeapRootCallback, stack_ref_callback C.jvmtiStackReferenceCallback, object_ref_callback C.jvmtiObjectReferenceCallback, user_data unsafe.Pointer) C.jvmtiError { 1211 return C.jvmtiIterateOverReachableObjects(jvmti.raw(), heap_root_callback, stack_ref_callback, object_ref_callback, user_data) 1212 } 1213 1214 func (jvmti jvmtiEnv) iterateOverHeap(object_filter C.jvmtiHeapObjectFilter, heap_object_callback C.jvmtiHeapObjectCallback, user_data unsafe.Pointer) C.jvmtiError { 1215 return C.jvmtiIterateOverHeap(jvmti.raw(), object_filter, heap_object_callback, user_data) 1216 } 1217 1218 func (jvmti jvmtiEnv) iterateOverInstancesOfClass(klass C.jclass, object_filter C.jvmtiHeapObjectFilter, heap_object_callback C.jvmtiHeapObjectCallback, user_data unsafe.Pointer) C.jvmtiError { 1219 return C.jvmtiIterateOverInstancesOfClass(jvmti.raw(), klass, object_filter, heap_object_callback, user_data) 1220 } 1221 1222 func (jvmti jvmtiEnv) getObjectsWithTags(tag_count C.jint, tags *C.jlong, count_ptr *C.jint, object_result_ptr **C.jobject, tag_result_ptr **C.jlong) C.jvmtiError { 1223 return C.jvmtiGetObjectsWithTags(jvmti.raw(), tag_count, tags, count_ptr, object_result_ptr, tag_result_ptr) 1224 } 1225 1226 func (jvmti jvmtiEnv) followReferences(heap_filter C.jint, klass C.jclass, initial_object C.jobject, callbacks *C.jvmtiHeapCallbacks, user_data unsafe.Pointer) C.jvmtiError { 1227 return C.jvmtiFollowReferences(jvmti.raw(), heap_filter, klass, initial_object, callbacks, user_data) 1228 } 1229 1230 func (jvmti jvmtiEnv) iterateThroughHeap(heap_filter C.jint, klass C.jclass, callbacks *C.jvmtiHeapCallbacks, user_data unsafe.Pointer) C.jvmtiError { 1231 return C.jvmtiIterateThroughHeap(jvmti.raw(), heap_filter, klass, callbacks, user_data) 1232 } 1233 1234 func (jvmti jvmtiEnv) setJNIFunctionTable(function_table *C.jniNativeInterface) C.jvmtiError { 1235 return C.jvmtiSetJNIFunctionTable(jvmti.raw(), function_table) 1236 } 1237 1238 func (jvmti jvmtiEnv) getJNIFunctionTable(function_table **C.jniNativeInterface) C.jvmtiError { 1239 return C.jvmtiGetJNIFunctionTable(jvmti.raw(), function_table) 1240 } 1241 1242 func (jvmti jvmtiEnv) setEventCallbacks(callbacks *C.jvmtiEventCallbacks, size_of_callbacks C.jint) C.jvmtiError { 1243 return C.jvmtiSetEventCallbacks(jvmti.raw(), callbacks, size_of_callbacks) 1244 } 1245 1246 func (jvmti jvmtiEnv) generateEvents(event_type C.jvmtiEvent) C.jvmtiError { 1247 return C.jvmtiGenerateEvents(jvmti.raw(), event_type) 1248 } 1249 1250 func (jvmti jvmtiEnv) getExtensionFunctions(extension_count_ptr *C.jint, extensions **C.jvmtiExtensionFunctionInfo) C.jvmtiError { 1251 return C.jvmtiGetExtensionFunctions(jvmti.raw(), extension_count_ptr, extensions) 1252 } 1253 1254 func (jvmti jvmtiEnv) getExtensionEvents(extension_count_ptr *C.jint, extensions **C.jvmtiExtensionEventInfo) C.jvmtiError { 1255 return C.jvmtiGetExtensionEvents(jvmti.raw(), extension_count_ptr, extensions) 1256 } 1257 1258 func (jvmti jvmtiEnv) setExtensionEventCallback(extension_event_index C.jint, callback C.jvmtiExtensionEvent) C.jvmtiError { 1259 return C.jvmtiSetExtensionEventCallback(jvmti.raw(), extension_event_index, callback) 1260 } 1261 1262 func (jvmti jvmtiEnv) getErrorName(error C.jvmtiError, name_ptr **C.char) C.jvmtiError { 1263 return C.jvmtiGetErrorName(jvmti.raw(), error, name_ptr) 1264 } 1265 1266 func (jvmti jvmtiEnv) getJLocationFormat(format_ptr *C.jvmtiJlocationFormat) C.jvmtiError { 1267 return C.jvmtiGetJLocationFormat(jvmti.raw(), format_ptr) 1268 } 1269 1270 func (jvmti jvmtiEnv) getSystemProperties(count_ptr *C.jint, property_ptr ***C.char) C.jvmtiError { 1271 return C.jvmtiGetSystemProperties(jvmti.raw(), count_ptr, property_ptr) 1272 } 1273 1274 func (jvmti jvmtiEnv) getSystemProperty(property *C.char, value_ptr **C.char) C.jvmtiError { 1275 return C.jvmtiGetSystemProperty(jvmti.raw(), property, value_ptr) 1276 } 1277 1278 func (jvmti jvmtiEnv) setSystemProperty(property *C.char, value_ptr *C.char) C.jvmtiError { 1279 return C.jvmtiSetSystemProperty(jvmti.raw(), property, value_ptr) 1280 } 1281 1282 func (jvmti jvmtiEnv) getPhase(phase_ptr *C.jvmtiPhase) C.jvmtiError { 1283 return C.jvmtiGetPhase(jvmti.raw(), phase_ptr) 1284 } 1285 1286 func (jvmti jvmtiEnv) getCurrentThreadCpuTimerInfo(info_ptr *C.jvmtiTimerInfo) C.jvmtiError { 1287 return C.jvmtiGetCurrentThreadCpuTimerInfo(jvmti.raw(), info_ptr) 1288 } 1289 1290 func (jvmti jvmtiEnv) getCurrentThreadCpuTime(nanos_ptr *C.jlong) C.jvmtiError { 1291 return C.jvmtiGetCurrentThreadCpuTime(jvmti.raw(), nanos_ptr) 1292 } 1293 1294 func (jvmti jvmtiEnv) getThreadCpuTimerInfo(info_ptr *C.jvmtiTimerInfo) C.jvmtiError { 1295 return C.jvmtiGetThreadCpuTimerInfo(jvmti.raw(), info_ptr) 1296 } 1297 1298 func (jvmti jvmtiEnv) getThreadCpuTime(thread C.jthread, nanos_ptr *C.jlong) C.jvmtiError { 1299 return C.jvmtiGetThreadCpuTime(jvmti.raw(), thread, nanos_ptr) 1300 } 1301 1302 func (jvmti jvmtiEnv) getTimerInfo(info_ptr *C.jvmtiTimerInfo) C.jvmtiError { 1303 return C.jvmtiGetTimerInfo(jvmti.raw(), info_ptr) 1304 } 1305 1306 func (jvmti jvmtiEnv) getTime(nanos_ptr *C.jlong) C.jvmtiError { 1307 return C.jvmtiGetTime(jvmti.raw(), nanos_ptr) 1308 } 1309 1310 func (jvmti jvmtiEnv) getPotentialCapabilities(capabilities_ptr *C.jvmtiCapabilities) C.jvmtiError { 1311 return C.jvmtiGetPotentialCapabilities(jvmti.raw(), capabilities_ptr) 1312 } 1313 1314 func (jvmti jvmtiEnv) addCapabilities(capabilities_ptr *C.jvmtiCapabilities) C.jvmtiError { 1315 return C.jvmtiAddCapabilities(jvmti.raw(), capabilities_ptr) 1316 } 1317 1318 func (jvmti jvmtiEnv) relinquishCapabilities(capabilities_ptr *C.jvmtiCapabilities) C.jvmtiError { 1319 return C.jvmtiRelinquishCapabilities(jvmti.raw(), capabilities_ptr) 1320 } 1321 1322 func (jvmti jvmtiEnv) getAvailableProcessors(processor_count_ptr *C.jint) C.jvmtiError { 1323 return C.jvmtiGetAvailableProcessors(jvmti.raw(), processor_count_ptr) 1324 } 1325 1326 func (jvmti jvmtiEnv) getClassVersionNumbers(klass C.jclass, minor_version_ptr *C.jint, major_version_ptr *C.jint) C.jvmtiError { 1327 return C.jvmtiGetClassVersionNumbers(jvmti.raw(), klass, minor_version_ptr, major_version_ptr) 1328 } 1329 1330 func (jvmti jvmtiEnv) getConstantPool(klass C.jclass, constant_pool_count_ptr *C.jint, constant_pool_byte_count_ptr *C.jint, constant_pool_bytes_ptr **C.uchar) C.jvmtiError { 1331 return C.jvmtiGetConstantPool(jvmti.raw(), klass, constant_pool_count_ptr, constant_pool_byte_count_ptr, constant_pool_bytes_ptr) 1332 } 1333 1334 func (jvmti jvmtiEnv) getEnvironmentLocalStorage(data_ptr *unsafe.Pointer) C.jvmtiError { 1335 return C.jvmtiGetEnvironmentLocalStorage(jvmti.raw(), data_ptr) 1336 } 1337 1338 func (jvmti jvmtiEnv) setEnvironmentLocalStorage(data unsafe.Pointer) C.jvmtiError { 1339 return C.jvmtiSetEnvironmentLocalStorage(jvmti.raw(), data) 1340 } 1341 1342 func (jvmti jvmtiEnv) addToBootstrapClassLoaderSearch(segment *C.char) C.jvmtiError { 1343 return C.jvmtiAddToBootstrapClassLoaderSearch(jvmti.raw(), segment) 1344 } 1345 1346 func (jvmti jvmtiEnv) setVerboseFlag(flag C.jvmtiVerboseFlag, value C.jboolean) C.jvmtiError { 1347 return C.jvmtiSetVerboseFlag(jvmti.raw(), flag, value) 1348 } 1349 1350 func (jvmti jvmtiEnv) addToSystemClassLoaderSearch(segment *C.char) C.jvmtiError { 1351 return C.jvmtiAddToSystemClassLoaderSearch(jvmti.raw(), segment) 1352 } 1353 1354 func (jvmti jvmtiEnv) retransformClasses(class_count C.jint, classes *C.jclass) C.jvmtiError { 1355 return C.jvmtiRetransformClasses(jvmti.raw(), class_count, classes) 1356 } 1357 1358 func (jvmti jvmtiEnv) getOwnedMonitorStackDepthInfo(thread C.jthread, monitor_info_count_ptr *C.jint, monitor_info_ptr **C.jvmtiMonitorStackDepthInfo) C.jvmtiError { 1359 return C.jvmtiGetOwnedMonitorStackDepthInfo(jvmti.raw(), thread, monitor_info_count_ptr, monitor_info_ptr) 1360 } 1361 1362 func (jvmti jvmtiEnv) getObjectSize(object C.jobject, size_ptr *C.jlong) C.jvmtiError { 1363 return C.jvmtiGetObjectSize(jvmti.raw(), object, size_ptr) 1364 } 1365 1366 func (jvmti jvmtiEnv) getLocalInstance(thread C.jthread, depth C.jint, value_ptr *C.jobject) C.jvmtiError { 1367 return C.jvmtiGetLocalInstance(jvmti.raw(), thread, depth, value_ptr) 1368 } 1369 1370 func (jvmti jvmtiEnv) setHeapSamplingInterval(sampling_interval C.jint) C.jvmtiError { 1371 return C.jvmtiSetHeapSamplingInterval(jvmti.raw(), sampling_interval) 1372 } 1373 1374 func describeJvmtiError(err int) string { 1375 switch (err) { 1376 1377 case JVMTI_ERROR_NONE: 1378 return "JVMTI_ERROR_NONE" 1379 1380 case JVMTI_ERROR_INVALID_THREAD: 1381 return "JVMTI_ERROR_INVALID_THREAD" 1382 1383 case JVMTI_ERROR_INVALID_THREAD_GROUP: 1384 return "JVMTI_ERROR_INVALID_THREAD_GROUP" 1385 1386 case JVMTI_ERROR_INVALID_PRIORITY: 1387 return "JVMTI_ERROR_INVALID_PRIORITY" 1388 1389 case JVMTI_ERROR_THREAD_NOT_SUSPENDED: 1390 return "JVMTI_ERROR_THREAD_NOT_SUSPENDED" 1391 1392 case JVMTI_ERROR_THREAD_SUSPENDED: 1393 return "JVMTI_ERROR_THREAD_SUSPENDED" 1394 1395 case JVMTI_ERROR_THREAD_NOT_ALIVE: 1396 return "JVMTI_ERROR_THREAD_NOT_ALIVE" 1397 1398 case JVMTI_ERROR_INVALID_OBJECT: 1399 return "JVMTI_ERROR_INVALID_OBJECT" 1400 1401 case JVMTI_ERROR_INVALID_CLASS: 1402 return "JVMTI_ERROR_INVALID_CLASS" 1403 1404 case JVMTI_ERROR_CLASS_NOT_PREPARED: 1405 return "JVMTI_ERROR_CLASS_NOT_PREPARED" 1406 1407 case JVMTI_ERROR_INVALID_METHODID: 1408 return "JVMTI_ERROR_INVALID_METHODID" 1409 1410 case JVMTI_ERROR_INVALID_LOCATION: 1411 return "JVMTI_ERROR_INVALID_LOCATION" 1412 1413 case JVMTI_ERROR_INVALID_FIELDID: 1414 return "JVMTI_ERROR_INVALID_FIELDID" 1415 1416 case JVMTI_ERROR_INVALID_MODULE: 1417 return "JVMTI_ERROR_INVALID_MODULE" 1418 1419 case JVMTI_ERROR_NO_MORE_FRAMES: 1420 return "JVMTI_ERROR_NO_MORE_FRAMES" 1421 1422 case JVMTI_ERROR_OPAQUE_FRAME: 1423 return "JVMTI_ERROR_OPAQUE_FRAME" 1424 1425 case JVMTI_ERROR_TYPE_MISMATCH: 1426 return "JVMTI_ERROR_TYPE_MISMATCH" 1427 1428 case JVMTI_ERROR_INVALID_SLOT: 1429 return "JVMTI_ERROR_INVALID_SLOT" 1430 1431 case JVMTI_ERROR_DUPLICATE: 1432 return "JVMTI_ERROR_DUPLICATE" 1433 1434 case JVMTI_ERROR_NOT_FOUND: 1435 return "JVMTI_ERROR_NOT_FOUND" 1436 1437 case JVMTI_ERROR_INVALID_MONITOR: 1438 return "JVMTI_ERROR_INVALID_MONITOR" 1439 1440 case JVMTI_ERROR_NOT_MONITOR_OWNER: 1441 return "JVMTI_ERROR_NOT_MONITOR_OWNER" 1442 1443 case JVMTI_ERROR_INTERRUPT: 1444 return "JVMTI_ERROR_INTERRUPT" 1445 1446 case JVMTI_ERROR_INVALID_CLASS_FORMAT: 1447 return "JVMTI_ERROR_INVALID_CLASS_FORMAT" 1448 1449 case JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION: 1450 return "JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION" 1451 1452 case JVMTI_ERROR_FAILS_VERIFICATION: 1453 return "JVMTI_ERROR_FAILS_VERIFICATION" 1454 1455 case JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED: 1456 return "JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED" 1457 1458 case JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED: 1459 return "JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED" 1460 1461 case JVMTI_ERROR_INVALID_TYPESTATE: 1462 return "JVMTI_ERROR_INVALID_TYPESTATE" 1463 1464 case JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED: 1465 return "JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED" 1466 1467 case JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED: 1468 return "JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED" 1469 1470 case JVMTI_ERROR_UNSUPPORTED_VERSION: 1471 return "JVMTI_ERROR_UNSUPPORTED_VERSION" 1472 1473 case JVMTI_ERROR_NAMES_DONT_MATCH: 1474 return "JVMTI_ERROR_NAMES_DONT_MATCH" 1475 1476 case JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED: 1477 return "JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED" 1478 1479 case JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED: 1480 return "JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED" 1481 1482 case JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED: 1483 return "JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_ATTRIBUTE_CHANGED" 1484 1485 case JVMTI_ERROR_UNMODIFIABLE_CLASS: 1486 return "JVMTI_ERROR_UNMODIFIABLE_CLASS" 1487 1488 case JVMTI_ERROR_UNMODIFIABLE_MODULE: 1489 return "JVMTI_ERROR_UNMODIFIABLE_MODULE" 1490 1491 case JVMTI_ERROR_NOT_AVAILABLE: 1492 return "JVMTI_ERROR_NOT_AVAILABLE" 1493 1494 case JVMTI_ERROR_MUST_POSSESS_CAPABILITY: 1495 return "JVMTI_ERROR_MUST_POSSESS_CAPABILITY" 1496 1497 case JVMTI_ERROR_NULL_POINTER: 1498 return "JVMTI_ERROR_NULL_POINTER" 1499 1500 case JVMTI_ERROR_ABSENT_INFORMATION: 1501 return "JVMTI_ERROR_ABSENT_INFORMATION" 1502 1503 case JVMTI_ERROR_INVALID_EVENT_TYPE: 1504 return "JVMTI_ERROR_INVALID_EVENT_TYPE" 1505 1506 case JVMTI_ERROR_ILLEGAL_ARGUMENT: 1507 return "JVMTI_ERROR_ILLEGAL_ARGUMENT" 1508 1509 case JVMTI_ERROR_NATIVE_METHOD: 1510 return "JVMTI_ERROR_NATIVE_METHOD" 1511 1512 case JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED: 1513 return "JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED" 1514 1515 case JVMTI_ERROR_OUT_OF_MEMORY: 1516 return "JVMTI_ERROR_OUT_OF_MEMORY" 1517 1518 case JVMTI_ERROR_ACCESS_DENIED: 1519 return "JVMTI_ERROR_ACCESS_DENIED" 1520 1521 case JVMTI_ERROR_WRONG_PHASE: 1522 return "JVMTI_ERROR_WRONG_PHASE" 1523 1524 case JVMTI_ERROR_INTERNAL: 1525 return "JVMTI_ERROR_INTERNAL" 1526 1527 case JVMTI_ERROR_UNATTACHED_THREAD: 1528 return "JVMTI_ERROR_UNATTACHED_THREAD" 1529 1530 case JVMTI_ERROR_INVALID_ENVIRONMENT: 1531 return "JVMTI_ERROR_INVALID_ENVIRONMENT" 1532 default: 1533 panic(fmt.Sprintf("Unknown JVMTI error code: %d", err)) 1534 } 1535 return "" 1536 }