[kaffe] CVS kaffe (jserv): Fix some internal API changes in JVMPI.

Kaffe CVS cvs-commits at kaffe.org
Fri Jan 14 08:57:46 PST 2005


PatchSet 5857 
Date: 2005/01/14 16:52:02
Author: jserv
Branch: HEAD
Tag: (none) 
Log:
Fix some internal API changes in JVMPI.

2005-01-14  Jim Huang  <jserv at kaffe.org>

	* include/jvmpi.h:
	Add missing JVMPI version numbers.

	* kaffe/jvmpi/jvmpi_kaffe.c
	(jvmpiFillObjectAlloc):
	Use KGC_getObjectSize instead of GC_getObjectSize since the
	internal API changes.
	Retrive thread ID with vmThread with the directions from Guilhem
	Lavaux <guilhem at kaffe.org>.

	* kaffe/kaffevm/jit3/machine.c
	(translate):
	Add casting in subtraction between ncode_end and ncode_start.

	* kaffe/kaffevm/jni/jni-base.c:
	Add JVMPI specific header.

Members: 
	ChangeLog:1.3401->1.3402 
	include/jvmpi.h:1.5->1.6 
	kaffe/jvmpi/jvmpi_kaffe.c:1.8->1.9 
	kaffe/kaffevm/jit3/machine.c:1.70->1.71 
	kaffe/kaffevm/jni/jni-base.c:1.10->1.11 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3401 kaffe/ChangeLog:1.3402
--- kaffe/ChangeLog:1.3401	Fri Jan 14 16:00:17 2005
+++ kaffe/ChangeLog	Fri Jan 14 16:52:02 2005
@@ -1,10 +1,29 @@
+2005-01-14  Jim Huang  <jserv at kaffe.org>
+
+	* include/jvmpi.h:
+	Add missing JVMPI version numbers.
+
+	* kaffe/jvmpi/jvmpi_kaffe.c
+	(jvmpiFillObjectAlloc):
+	Use KGC_getObjectSize instead of GC_getObjectSize since the
+	internal API changes.
+	Retrive thread ID with vmThread with the directions from Guilhem
+	Lavaux <guilhem at kaffe.org>.
+
+	* kaffe/kaffevm/jit3/machine.c
+	(translate):
+	Add casting in subtraction between ncode_end and ncode_start.
+
+	* kaffe/kaffevm/jni/jni-base.c:
+	Add JVMPI specific header.
+
 2005-01-14  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* kaffe/jvmpi/jvmpi_kaffe.c
 	(jvmpiFillThreadStart): Updated to follow the new threadData
 	structure.
 
-	Reported by Jim Huang <jserv at linux2.cc.ntu.edu.tw>
+	Reported by Jim Huang <jserv at kaffe.org>
 
 2005-01-14  Guilhem Lavaux  <guilhem at kaffe.org>
 
@@ -12,7 +31,7 @@
 	(VMThread.wait): Use vmThread and not sleeper to check whether we are
 	sleeping.
 
-	Reported by Jim Huang <jserv at linux2.cc.ntu.edu.tw>
+	Reported by Jim Huang <jserv at kaffe.org>
 
 2005-01-13  Dalibor Topic  <robilad at kaffe.org>
 
Index: kaffe/include/jvmpi.h
diff -u kaffe/include/jvmpi.h:1.5 kaffe/include/jvmpi.h:1.6
--- kaffe/include/jvmpi.h:1.5	Mon Jul  5 16:40:11 2004
+++ kaffe/include/jvmpi.h	Fri Jan 14 16:51:59 2005
@@ -8,6 +8,10 @@
 
 #include <jni.h>
 
+/* JVMPI version numbers. */
+#define JVMPI_VERSION_1	0x10000001
+#define JVMPI_VERSION_1_1	0x10000002
+
 typedef void *jobjectID;
 
 enum {
Index: kaffe/kaffe/jvmpi/jvmpi_kaffe.c
diff -u kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.8 kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.9
--- kaffe/kaffe/jvmpi/jvmpi_kaffe.c:1.8	Fri Jan 14 16:00:22 2005
+++ kaffe/kaffe/jvmpi/jvmpi_kaffe.c	Fri Jan 14 16:52:00 2005
@@ -170,7 +170,7 @@
 	{
 		ev->u.obj_alloc.is_array = JVMPI_NORMAL_OBJECT;
 	}
-	ev->u.obj_alloc.size = GC_getObjectSize(main_collector, obj);
+	ev->u.obj_alloc.size = KGC_getObjectSize(main_collector, obj);
 	ev->u.obj_alloc.obj_id = obj;
 }
 
@@ -194,8 +194,8 @@
 	ev->u.thread_start.group_name = stringJava2C(tid->group->name);
 	ev->u.thread_start.parent_name = NULL;
 	ev->u.thread_start.thread_id = tid;
-	ev->u.thread_start.thread_env_id =
-		&KTHREAD(get_data)->jniEnv;
+	ev->u.thread_start.thread_env_id = 
+		&KTHREAD(get_data)((jthread_t)tid->vmThread->jthreadID)->jniEnv;
 }
 
 void jvmpiFillClassLoad(JVMPI_Event *ev, struct Hjava_lang_Class *cl)
Index: kaffe/kaffe/kaffevm/jit3/machine.c
diff -u kaffe/kaffe/kaffevm/jit3/machine.c:1.70 kaffe/kaffe/kaffevm/jit3/machine.c:1.71
--- kaffe/kaffe/kaffevm/jit3/machine.c:1.70	Mon Jan 10 10:30:19 2005
+++ kaffe/kaffe/kaffevm/jit3/machine.c	Fri Jan 14 16:52:00 2005
@@ -440,7 +440,7 @@
 		ev.u.compiled_method_load.code_addr =
 			METHOD_NATIVECODE(xmeth);
 		ev.u.compiled_method_load.code_size =
-			xmeth->c.ncode.ncode_end - xmeth->c.ncode.ncode_start;
+			(uintp)xmeth->c.ncode.ncode_end - (uintp)xmeth->c.ncode.ncode_start;
 		if( xmeth->lines )
 		{
 			JVMPI_Lineno *jvmpi_lineno = NULL;
Index: kaffe/kaffe/kaffevm/jni/jni-base.c
diff -u kaffe/kaffe/kaffevm/jni/jni-base.c:1.10 kaffe/kaffe/kaffevm/jni/jni-base.c:1.11
--- kaffe/kaffe/kaffevm/jni/jni-base.c:1.10	Mon Dec 27 16:09:48 2004
+++ kaffe/kaffe/kaffevm/jni/jni-base.c	Fri Jan 14 16:52:01 2005
@@ -23,6 +23,8 @@
 #include "baseClasses.h"
 #include "kaffe_jni.h"
 #include "support.h"
+#include "classMethod.h"
+#include "jvmpi_kaffe.h"
 
 /*
  * Keep track of how many VM's are active. Right now




More information about the kaffe mailing list