From 5ab4c5cbc13fe373def19dbfcbf669a60b7c71a9 Mon Sep 17 00:00:00 2001 From: Pierre-Marc Fournier Date: Tue, 27 Oct 2009 19:14:55 -0400 Subject: [PATCH] java: fixes --- java/Makefile.am | 4 +++- java/UST.c | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 java/UST.c diff --git a/java/Makefile.am b/java/Makefile.am index fa536287..82199f98 100644 --- a/java/Makefile.am +++ b/java/Makefile.am @@ -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 index 00000000..7c807726 --- /dev/null +++ b/java/UST.c @@ -0,0 +1,13 @@ +#include +#include + +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 -- 2.34.1