* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
/* AUTOMATICALLY GENERATED FILE - DO NOT EDIT */
/* Include file for the Java(tm) Virtual Machine Tool Interface */
JVMTI_VERSION_1 = 0x30010000,
JVMTI_VERSION_1_0 = 0x30010000,
JVMTI_VERSION_1_1 = 0x30010100,
JVMTI_VERSION_1_2 = 0x30010200,
JVMTI_VERSION = 0x30000000 + (1 * 0x10000) + (2 * 0x100) + 1 /* version: 1.2.1 */
Agent_OnLoad(JavaVM *vm, char *options, void *reserved);
Agent_OnAttach(JavaVM* vm, char* options, void* reserved);
Agent_OnUnload(JavaVM *vm);
/* Forward declaration of the environment */
struct jvmtiInterface_1_;
typedef _jvmtiEnv jvmtiEnv;
typedef const struct jvmtiInterface_1_ *jvmtiEnv;
typedef jobject jthreadGroup;
typedef struct _jrawMonitorID *jrawMonitorID;
typedef struct JNINativeInterface_ jniNativeInterface;
JVMTI_THREAD_STATE_ALIVE = 0x0001,
JVMTI_THREAD_STATE_TERMINATED = 0x0002,
JVMTI_THREAD_STATE_RUNNABLE = 0x0004,
JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER = 0x0400,
JVMTI_THREAD_STATE_WAITING = 0x0080,
JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010,
JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020,
JVMTI_THREAD_STATE_SLEEPING = 0x0040,
JVMTI_THREAD_STATE_IN_OBJECT_WAIT = 0x0100,
JVMTI_THREAD_STATE_PARKED = 0x0200,
JVMTI_THREAD_STATE_SUSPENDED = 0x100000,
JVMTI_THREAD_STATE_INTERRUPTED = 0x200000,
JVMTI_THREAD_STATE_IN_NATIVE = 0x400000,
JVMTI_THREAD_STATE_VENDOR_1 = 0x10000000,
JVMTI_THREAD_STATE_VENDOR_2 = 0x20000000,
JVMTI_THREAD_STATE_VENDOR_3 = 0x40000000
/* java.lang.Thread.State Conversion Masks */
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,
JVMTI_JAVA_LANG_THREAD_STATE_NEW = 0,
JVMTI_JAVA_LANG_THREAD_STATE_TERMINATED = JVMTI_THREAD_STATE_TERMINATED,
JVMTI_JAVA_LANG_THREAD_STATE_RUNNABLE = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_RUNNABLE,
JVMTI_JAVA_LANG_THREAD_STATE_BLOCKED = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER,
JVMTI_JAVA_LANG_THREAD_STATE_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_INDEFINITELY,
JVMTI_JAVA_LANG_THREAD_STATE_TIMED_WAITING = JVMTI_THREAD_STATE_ALIVE | JVMTI_THREAD_STATE_WAITING | JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT
/* Thread Priority Constants */
JVMTI_THREAD_MIN_PRIORITY = 1,
JVMTI_THREAD_NORM_PRIORITY = 5,
JVMTI_THREAD_MAX_PRIORITY = 10
JVMTI_HEAP_FILTER_TAGGED = 0x4,
JVMTI_HEAP_FILTER_UNTAGGED = 0x8,
JVMTI_HEAP_FILTER_CLASS_TAGGED = 0x10,
JVMTI_HEAP_FILTER_CLASS_UNTAGGED = 0x20
/* Heap Visit Control Flags */
JVMTI_VISIT_OBJECTS = 0x100,
JVMTI_VISIT_ABORT = 0x8000
/* Heap Reference Enumeration */
JVMTI_HEAP_REFERENCE_CLASS = 1,
JVMTI_HEAP_REFERENCE_FIELD = 2,
JVMTI_HEAP_REFERENCE_ARRAY_ELEMENT = 3,
JVMTI_HEAP_REFERENCE_CLASS_LOADER = 4,
JVMTI_HEAP_REFERENCE_SIGNERS = 5,
JVMTI_HEAP_REFERENCE_PROTECTION_DOMAIN = 6,
JVMTI_HEAP_REFERENCE_INTERFACE = 7,
JVMTI_HEAP_REFERENCE_STATIC_FIELD = 8,
JVMTI_HEAP_REFERENCE_CONSTANT_POOL = 9,
JVMTI_HEAP_REFERENCE_SUPERCLASS = 10,
JVMTI_HEAP_REFERENCE_JNI_GLOBAL = 21,
JVMTI_HEAP_REFERENCE_SYSTEM_CLASS = 22,
JVMTI_HEAP_REFERENCE_MONITOR = 23,
JVMTI_HEAP_REFERENCE_STACK_LOCAL = 24,
JVMTI_HEAP_REFERENCE_JNI_LOCAL = 25,
JVMTI_HEAP_REFERENCE_THREAD = 26,
JVMTI_HEAP_REFERENCE_OTHER = 27
} jvmtiHeapReferenceKind;
/* Primitive Type Enumeration */
JVMTI_PRIMITIVE_TYPE_BOOLEAN = 90,
JVMTI_PRIMITIVE_TYPE_BYTE = 66,
JVMTI_PRIMITIVE_TYPE_CHAR = 67,
JVMTI_PRIMITIVE_TYPE_SHORT = 83,
JVMTI_PRIMITIVE_TYPE_INT = 73,
JVMTI_PRIMITIVE_TYPE_LONG = 74,
JVMTI_PRIMITIVE_TYPE_FLOAT = 70,
JVMTI_PRIMITIVE_TYPE_DOUBLE = 68
/* Heap Object Filter Enumeration */
JVMTI_HEAP_OBJECT_TAGGED = 1,
JVMTI_HEAP_OBJECT_UNTAGGED = 2,
JVMTI_HEAP_OBJECT_EITHER = 3
/* Heap Root Kind Enumeration */
JVMTI_HEAP_ROOT_JNI_GLOBAL = 1,
JVMTI_HEAP_ROOT_SYSTEM_CLASS = 2,
JVMTI_HEAP_ROOT_MONITOR = 3,
JVMTI_HEAP_ROOT_STACK_LOCAL = 4,
JVMTI_HEAP_ROOT_JNI_LOCAL = 5,
JVMTI_HEAP_ROOT_THREAD = 6,
JVMTI_HEAP_ROOT_OTHER = 7
/* Object Reference Enumeration */
JVMTI_REFERENCE_CLASS = 1,
JVMTI_REFERENCE_FIELD = 2,
JVMTI_REFERENCE_ARRAY_ELEMENT = 3,
JVMTI_REFERENCE_CLASS_LOADER = 4,
JVMTI_REFERENCE_SIGNERS = 5,
JVMTI_REFERENCE_PROTECTION_DOMAIN = 6,
JVMTI_REFERENCE_INTERFACE = 7,
JVMTI_REFERENCE_STATIC_FIELD = 8,
JVMTI_REFERENCE_CONSTANT_POOL = 9
} jvmtiObjectReferenceKind;
/* Iteration Control Enumeration */
JVMTI_ITERATION_CONTINUE = 1,
JVMTI_ITERATION_IGNORE = 2,
JVMTI_ITERATION_ABORT = 0
JVMTI_CLASS_STATUS_VERIFIED = 1,
JVMTI_CLASS_STATUS_PREPARED = 2,
JVMTI_CLASS_STATUS_INITIALIZED = 4,
JVMTI_CLASS_STATUS_ERROR = 8,
JVMTI_CLASS_STATUS_ARRAY = 16,
JVMTI_CLASS_STATUS_PRIMITIVE = 32
/* Event Enable/Disable */
/* Extension Function/Event Parameter Types */
JVMTI_TYPE_JDOUBLE = 107,
JVMTI_TYPE_JBOOLEAN = 108,
JVMTI_TYPE_JOBJECT = 109,
JVMTI_TYPE_JTHREAD = 110,
JVMTI_TYPE_JFIELDID = 113,
JVMTI_TYPE_JMETHODID = 114,
/* Extension Function/Event Parameter Kinds */
JVMTI_KIND_ALLOC_BUF = 94,
JVMTI_KIND_ALLOC_ALLOC_BUF = 95,
JVMTI_TIMER_USER_CPU = 30,
JVMTI_TIMER_TOTAL_CPU = 31,
/* Phases of execution */
JVMTI_PHASE_PRIMORDIAL = 2,
/* Version Interface Types */
JVMTI_VERSION_INTERFACE_JNI = 0x00000000,
JVMTI_VERSION_INTERFACE_JVMTI = 0x30000000
JVMTI_VERSION_MASK_INTERFACE_TYPE = 0x70000000,
JVMTI_VERSION_MASK_MAJOR = 0x0FFF0000,
JVMTI_VERSION_MASK_MINOR = 0x0000FF00,
JVMTI_VERSION_MASK_MICRO = 0x000000FF
JVMTI_VERSION_SHIFT_MAJOR = 16,
JVMTI_VERSION_SHIFT_MINOR = 8,
JVMTI_VERSION_SHIFT_MICRO = 0
/* Verbose Flag Enumeration */
/* JLocation Format Enumeration */
JVMTI_JLOCATION_JVMBCI = 1,
JVMTI_JLOCATION_MACHINEPC = 2,
JVMTI_JLOCATION_OTHER = 0
/* Resource Exhaustion Flags */
JVMTI_RESOURCE_EXHAUSTED_OOM_ERROR = 0x0001,
JVMTI_RESOURCE_EXHAUSTED_JAVA_HEAP = 0x0002,
JVMTI_RESOURCE_EXHAUSTED_THREADS = 0x0004
JVMTI_ERROR_INVALID_THREAD = 10,
JVMTI_ERROR_INVALID_THREAD_GROUP = 11,
JVMTI_ERROR_INVALID_PRIORITY = 12,
JVMTI_ERROR_THREAD_NOT_SUSPENDED = 13,
JVMTI_ERROR_THREAD_SUSPENDED = 14,
JVMTI_ERROR_THREAD_NOT_ALIVE = 15,
JVMTI_ERROR_INVALID_OBJECT = 20,
JVMTI_ERROR_INVALID_CLASS = 21,
JVMTI_ERROR_CLASS_NOT_PREPARED = 22,
JVMTI_ERROR_INVALID_METHODID = 23,
JVMTI_ERROR_INVALID_LOCATION = 24,
JVMTI_ERROR_INVALID_FIELDID = 25,
JVMTI_ERROR_NO_MORE_FRAMES = 31,
JVMTI_ERROR_OPAQUE_FRAME = 32,
JVMTI_ERROR_TYPE_MISMATCH = 34,
JVMTI_ERROR_INVALID_SLOT = 35,
JVMTI_ERROR_DUPLICATE = 40,
JVMTI_ERROR_NOT_FOUND = 41,
JVMTI_ERROR_INVALID_MONITOR = 50,
JVMTI_ERROR_NOT_MONITOR_OWNER = 51,
JVMTI_ERROR_INTERRUPT = 52,
JVMTI_ERROR_INVALID_CLASS_FORMAT = 60,
JVMTI_ERROR_CIRCULAR_CLASS_DEFINITION = 61,
JVMTI_ERROR_FAILS_VERIFICATION = 62,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_ADDED = 63,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_SCHEMA_CHANGED = 64,
JVMTI_ERROR_INVALID_TYPESTATE = 65,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED = 66,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_DELETED = 67,
JVMTI_ERROR_UNSUPPORTED_VERSION = 68,
JVMTI_ERROR_NAMES_DONT_MATCH = 69,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_CLASS_MODIFIERS_CHANGED = 70,
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_METHOD_MODIFIERS_CHANGED = 71,
JVMTI_ERROR_UNMODIFIABLE_CLASS = 79,
JVMTI_ERROR_NOT_AVAILABLE = 98,
JVMTI_ERROR_MUST_POSSESS_CAPABILITY = 99,
JVMTI_ERROR_NULL_POINTER = 100,
JVMTI_ERROR_ABSENT_INFORMATION = 101,
JVMTI_ERROR_INVALID_EVENT_TYPE = 102,
JVMTI_ERROR_ILLEGAL_ARGUMENT = 103,
JVMTI_ERROR_NATIVE_METHOD = 104,
JVMTI_ERROR_CLASS_LOADER_UNSUPPORTED = 106,
JVMTI_ERROR_OUT_OF_MEMORY = 110,
JVMTI_ERROR_ACCESS_DENIED = 111,
JVMTI_ERROR_WRONG_PHASE = 112,
JVMTI_ERROR_INTERNAL = 113,
JVMTI_ERROR_UNATTACHED_THREAD = 115,
JVMTI_ERROR_INVALID_ENVIRONMENT = 116,
JVMTI_MIN_EVENT_TYPE_VAL = 50,
JVMTI_EVENT_VM_INIT = 50,
JVMTI_EVENT_VM_DEATH = 51,
JVMTI_EVENT_THREAD_START = 52,
JVMTI_EVENT_THREAD_END = 53,
JVMTI_EVENT_CLASS_FILE_LOAD_HOOK = 54,
JVMTI_EVENT_CLASS_LOAD = 55,
JVMTI_EVENT_CLASS_PREPARE = 56,
JVMTI_EVENT_VM_START = 57,
JVMTI_EVENT_EXCEPTION = 58,
JVMTI_EVENT_EXCEPTION_CATCH = 59,
JVMTI_EVENT_SINGLE_STEP = 60,
JVMTI_EVENT_FRAME_POP = 61,
JVMTI_EVENT_BREAKPOINT = 62,
JVMTI_EVENT_FIELD_ACCESS = 63,
JVMTI_EVENT_FIELD_MODIFICATION = 64,
JVMTI_EVENT_METHOD_ENTRY = 65,
JVMTI_EVENT_METHOD_EXIT = 66,
JVMTI_EVENT_NATIVE_METHOD_BIND = 67,
JVMTI_EVENT_COMPILED_METHOD_LOAD = 68,
JVMTI_EVENT_COMPILED_METHOD_UNLOAD = 69,
JVMTI_EVENT_DYNAMIC_CODE_GENERATED = 70,
JVMTI_EVENT_DATA_DUMP_REQUEST = 71,
JVMTI_EVENT_MONITOR_WAIT = 73,
JVMTI_EVENT_MONITOR_WAITED = 74,
JVMTI_EVENT_MONITOR_CONTENDED_ENTER = 75,
JVMTI_EVENT_MONITOR_CONTENDED_ENTERED = 76,
JVMTI_EVENT_RESOURCE_EXHAUSTED = 80,
JVMTI_EVENT_GARBAGE_COLLECTION_START = 81,
JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
JVMTI_EVENT_OBJECT_FREE = 83,
JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
JVMTI_MAX_EVENT_TYPE_VAL = 84
typedef struct _jvmtiThreadInfo jvmtiThreadInfo;
struct _jvmtiMonitorStackDepthInfo;
typedef struct _jvmtiMonitorStackDepthInfo jvmtiMonitorStackDepthInfo;
struct _jvmtiThreadGroupInfo;
typedef struct _jvmtiThreadGroupInfo jvmtiThreadGroupInfo;
typedef struct _jvmtiFrameInfo jvmtiFrameInfo;
typedef struct _jvmtiStackInfo jvmtiStackInfo;
struct _jvmtiHeapReferenceInfoField;
typedef struct _jvmtiHeapReferenceInfoField jvmtiHeapReferenceInfoField;
struct _jvmtiHeapReferenceInfoArray;
typedef struct _jvmtiHeapReferenceInfoArray jvmtiHeapReferenceInfoArray;
struct _jvmtiHeapReferenceInfoConstantPool;
typedef struct _jvmtiHeapReferenceInfoConstantPool jvmtiHeapReferenceInfoConstantPool;
struct _jvmtiHeapReferenceInfoStackLocal;
typedef struct _jvmtiHeapReferenceInfoStackLocal jvmtiHeapReferenceInfoStackLocal;
struct _jvmtiHeapReferenceInfoJniLocal;
typedef struct _jvmtiHeapReferenceInfoJniLocal jvmtiHeapReferenceInfoJniLocal;
struct _jvmtiHeapReferenceInfoReserved;
typedef struct _jvmtiHeapReferenceInfoReserved jvmtiHeapReferenceInfoReserved;
union _jvmtiHeapReferenceInfo;
typedef union _jvmtiHeapReferenceInfo jvmtiHeapReferenceInfo;
struct _jvmtiHeapCallbacks;
typedef struct _jvmtiHeapCallbacks jvmtiHeapCallbacks;
struct _jvmtiClassDefinition;
typedef struct _jvmtiClassDefinition jvmtiClassDefinition;
struct _jvmtiMonitorUsage;
typedef struct _jvmtiMonitorUsage jvmtiMonitorUsage;
struct _jvmtiLineNumberEntry;
typedef struct _jvmtiLineNumberEntry jvmtiLineNumberEntry;
struct _jvmtiLocalVariableEntry;
typedef struct _jvmtiLocalVariableEntry jvmtiLocalVariableEntry;
typedef struct _jvmtiParamInfo jvmtiParamInfo;
struct _jvmtiExtensionFunctionInfo;
typedef struct _jvmtiExtensionFunctionInfo jvmtiExtensionFunctionInfo;
struct _jvmtiExtensionEventInfo;
typedef struct _jvmtiExtensionEventInfo jvmtiExtensionEventInfo;
typedef struct _jvmtiTimerInfo jvmtiTimerInfo;
struct _jvmtiAddrLocationMap;
typedef struct _jvmtiAddrLocationMap jvmtiAddrLocationMap;
typedef void (JNICALL *jvmtiStartFunction)
(jvmtiEnv* jvmti_env, JNIEnv* jni_env, void* arg);
typedef jint (JNICALL *jvmtiHeapIterationCallback)
(jlong class_tag, jlong size, jlong* tag_ptr, jint length, void* user_data);
typedef jint (JNICALL *jvmtiHeapReferenceCallback)
(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);
typedef jint (JNICALL *jvmtiPrimitiveFieldCallback)
(jvmtiHeapReferenceKind kind, const jvmtiHeapReferenceInfo* info, jlong object_class_tag, jlong* object_tag_ptr, jvalue value, jvmtiPrimitiveType value_type, void* user_data);
typedef jint (JNICALL *jvmtiArrayPrimitiveValueCallback)
(jlong class_tag, jlong size, jlong* tag_ptr, jint element_count, jvmtiPrimitiveType element_type, const void* elements, void* user_data);
typedef jint (JNICALL *jvmtiStringPrimitiveValueCallback)
(jlong class_tag, jlong size, jlong* tag_ptr, const jchar* value, jint value_length, void* user_data);
typedef jint (JNICALL *jvmtiReservedCallback)
typedef jvmtiIterationControl (JNICALL *jvmtiHeapObjectCallback)
(jlong class_tag, jlong size, jlong* tag_ptr, void* user_data);