From: Pierre-Marc Fournier Date: Fri, 25 Sep 2009 15:55:48 +0000 (-0400) Subject: Add ust java bindings X-Git-Tag: v0.1~131 X-Git-Url: http://git.lttng.org/?p=ust.git;a=commitdiff_plain;h=378fa1c78cea8fb56bf759fe3110bbdb1422fac7 Add ust java bindings This first version is less efficient than the native ust. Moreover, all java events share the same native event name. --- diff --git a/configure.ac b/configure.ac index 88266f5..9137366 100644 --- a/configure.ac +++ b/configure.ac @@ -88,5 +88,6 @@ AC_CONFIG_FILES([ libinterfork/Makefile ustd/Makefile ust/Makefile + java/Makefile ]) AC_OUTPUT diff --git a/java/Makefile.am b/java/Makefile.am new file mode 100644 index 0000000..e818b81 --- /dev/null +++ b/java/Makefile.am @@ -0,0 +1,15 @@ +INCLUDES = -I$(top_builddir)/share -I$(top_builddir)/libust $(KCOMPAT_CFLAGS) $(URCU_CFLAGS) + +lib_LTLIBRARIES = libustjava.la +libustjava_la_SOURCES = UST.c UST.h +noinst_DATA = UST.java +libustjava_la_LIBADD = -lc -L$(top_builddir)/libust/.libs -lust + +all: UST.class + +clean-local: + rm -rf UST.h UST.class + +UST.class: UST.java + javac UST.java + diff --git a/java/UST.java b/java/UST.java new file mode 100644 index 0000000..be5f7c7 --- /dev/null +++ b/java/UST.java @@ -0,0 +1,9 @@ +import java.util.*; + +class UST { + public static native void ust_java_event(String name, String arg); + static { + System.loadLibrary("ustjava"); + } +} +