-#ifndef JVMTI_H
-#define JVMTI_H
+/* src/native/jvmti.c - implementation of the Java Virtual Machine Tool
+ Interface functions
-#include "native/jni.h"
+ Copyright (C) 1996-2005, 2006, 2008
+ CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+ This file is part of CACAO.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at
+ your option) any later version.
+
+ This program 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 for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+*/
+
+
+#ifndef _JVMTI_H
+#define _JVMTI_H
+
+#include "config.h"
+
+#include "native/jni.hpp"
+
+
+#define JVMTI_VERSION_INTERFACE_JNI 0x00000000
+#define JVMTI_VERSION_INTERFACE_JVMTI 0x30000000
+#define JVMTI_VERSION_MASK_INTERFACE_TYPE 0x70000000
#define JVMTI_VERSION_1_0 0x30010000
+#define JVMTI_VERSION JVMTI_VERSION_1_0
+
typedef jobject jthread;
typedef jobject jthreadGroup;
typedef jlong jlocation;
struct _jrawMonitorID;
typedef struct _jrawMonitorID *jrawMonitorID;
-typedef struct jvmtiEnv_struct jvmtiEnv;
+typedef struct jvmtiEnv_struct *jvmtiEnv;
typedef enum {
JVMTI_ERROR_NONE = 0, /* No error has occurred. This is the error code that is
} jvmtiEventMode;
typedef enum {
- JVMTI_MIN_EVENT_TYPE_VAL = 50,
+ JVMTI_EVENT_START_ENUM = 50,
JVMTI_EVENT_VM_INIT = 50,
JVMTI_EVENT_VM_DEATH = 51,
JVMTI_EVENT_THREAD_START = 52,
JVMTI_EVENT_GARBAGE_COLLECTION_FINISH = 82,
JVMTI_EVENT_OBJECT_FREE = 83,
JVMTI_EVENT_VM_OBJECT_ALLOC = 84,
- JVMTI_MAX_EVENT_TYPE_VAL = 84
+ JVMTI_EVENT_END_ENUM = 84
} jvmtiEvent;
jlong* size_ptr);
};
-/* cacao specific */
-jvmtiEnv* new_jvmtienv();
-void set_jvmti_phase(jvmtiPhase p);
+
+#define JVMTI_THREAD_STATE_ALIVE 0x0001
+#define JVMTI_THREAD_STATE_TERMINATED 0x0002
+#define JVMTI_THREAD_STATE_RUNNABLE 0x0004
+#define JVMTI_THREAD_STATE_BLOCKED_ON_MONITOR_ENTER 0x0400
+#define JVMTI_THREAD_STATE_WAITING 0x0080
+#define JVMTI_THREAD_STATE_WAITING_INDEFINITELY 0x0010
+#define JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT 0x0020
+#define JVMTI_THREAD_STATE_SLEEPING 0x0040
+#define JVMTI_THREAD_STATE_IN_OBJECT_WAIT 0x0100
+#define JVMTI_THREAD_STATE_PARKED 0x0200
+#define JVMTI_THREAD_STATE_SUSPENDED 0x100000
+#define JVMTI_THREAD_STATE_INTERRUPTED 0x200000
+#define JVMTI_THREAD_STATE_IN_NATIVE 0x400000
+#define JVMTI_THREAD_STATE_VENDOR_1 0x10000000
+#define JVMTI_THREAD_STATE_VENDOR_2 0x20000000
+#define JVMTI_THREAD_STATE_VENDOR_3 0x40000000
+
+#define JVMTI_THREAD_MIN_PRIORITY 1
+#define JVMTI_THREAD_NORM_PRIORITY 5
+#define JVMTI_THREAD_MAX_PRIORITY 10
+
+#define JVMTI_CLASS_STATUS_VERIFIED 1
+#define JVMTI_CLASS_STATUS_PREPARED 2
+#define JVMTI_CLASS_STATUS_INITIALIZED 4
+#define JVMTI_CLASS_STATUS_ERROR 8
+#define JVMTI_CLASS_STATUS_ARRAY 16
+#define JVMTI_CLASS_STATUS_PRIMITIVE 32
#endif