java: fixes
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 27 Oct 2009 23:14:55 +0000 (19:14 -0400)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 27 Oct 2009 23:14:55 +0000 (19:14 -0400)
java/Makefile.am
java/UST.c [new file with mode: 0644]

index fa536287827edd13db88a8bc8d0209309a92ba7e..82199f98783ac1530c4ffe9c80dec801d9b3a422 100644 (file)
@@ -5,7 +5,7 @@ libustjava_la_SOURCES = UST.c UST.h
 noinst_DATA = UST.java
 libustjava_la_LIBADD = -lc -L$(top_builddir)/libust/.libs -lust
 
-all: UST.class
+all: UST.class UST.h
 
 clean-local:
        rm -rf UST.h UST.class
@@ -13,3 +13,5 @@ clean-local:
 UST.class: UST.java
        javac UST.java
 
+UST.h:
+       javah -jni UST
diff --git a/java/UST.c b/java/UST.c
new file mode 100644 (file)
index 0000000..7c80772
--- /dev/null
@@ -0,0 +1,13 @@
+#include <jni.h>
+#include <ust/marker.h>
+
+JNIEXPORT void JNICALL Java_UST_ust_1java_1event (JNIEnv *env, jobject jobj, jstring ev_name, jstring args)
+{
+       jboolean iscopy;
+       const char *ev_name_cstr = (*env)->GetStringUTFChars(env, ev_name, &iscopy);
+       const char *args_cstr = (*env)->GetStringUTFChars(env, args, &iscopy);
+
+       trace_mark(ust, java_event, "name %s args %s", ev_name_cstr, args_cstr);
+}
+
+MARKER_LIB
This page took 0.025444 seconds and 4 git commands to generate.