Fix java build
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Aug 2011 11:31:32 +0000 (07:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Aug 2011 11:31:32 +0000 (07:31 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
14 files changed:
Makefile.am
configure.ac
java/.gitignore [deleted file]
java/Makefile.am [deleted file]
java/README [deleted file]
java/UST.c [deleted file]
java/UST.java [deleted file]
java/ust_java.h [deleted file]
libustjava/.gitignore [new file with mode: 0644]
libustjava/Makefile.am [new file with mode: 0644]
libustjava/README [new file with mode: 0644]
libustjava/UST.c [new file with mode: 0644]
libustjava/UST.java [new file with mode: 0644]
libustjava/ust_java.h [new file with mode: 0644]

index f294cf35abd24a53bd73abc4ea0e32a318dcd4c9..79ff75359e62eb7991cb4d701c715f03c0186041 100644 (file)
@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I config
 # must be installed after libust so it can overwrite libust.so with
 # the linker script.
 SUBDIRS = snprintf liblttng-ust-comm libringbuffer libust include doc tests \
-               java
+               libustjava
 
 #temporarily disabled
 # . libustinstr-malloc libustfork
index dbfdecdecaaf4f5ee3d4219ffc0200d175b975e8..9002159344b3bc089ed81b70fbcc5815157c2f87 100644 (file)
@@ -160,7 +160,7 @@ fi
 if test "$with_jni_interface" = "yes"; then
         AC_CHECK_HEADERS([jni.h],,AC_MSG_ERROR([
 missing jni.h
-Make sure Sun Java, OpenJDK or GCJ is installed and that this header file exists in the system path.
+Make sure Sun Java or OpenJDK or GCJ is installed and that this header file exists in the system path.
 Use --with-java-jdk=DIR flag to point to your java include files or desactivate the JNI interface.]))
 fi
 AM_CONDITIONAL(BUILD_JNI_INTERFACE, test "$with_jni_interface" = "yes")
@@ -197,6 +197,6 @@ AC_CONFIG_FILES([
        snprintf/Makefile
        ust.pc
        include/ust/version.h
-       java/Makefile
+       libustjava/Makefile
 ])
 AC_OUTPUT
diff --git a/java/.gitignore b/java/.gitignore
deleted file mode 100644 (file)
index ab97d04..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-UST.class
-UST.h
diff --git a/java/Makefile.am b/java/Makefile.am
deleted file mode 100644 (file)
index cb2c1b8..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-if BUILD_JNI_INTERFACE
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-lib_LTLIBRARIES = libustjava.la
-libustjava_la_SOURCES = UST.c UST.h ust_java.h
-dist_noinst_DATA = UST.java
-libustjava_la_LIBADD = -lc -L$(top_builddir)/libust/.libs -lust
-
-all: UST.class UST.h
-
-clean-local:
-       rm -rf UST.h UST.class
-
-UST.class: UST.java
-       javac -d "$(builddir)" "$(srcdir)/UST.java"
-
-UST.h: UST.class
-       javah -jni UST
-
-endif
diff --git a/java/README b/java/README
deleted file mode 100644 (file)
index ecc27ef..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-This directory contains a simple API for instrumenting java applications.
-
-Configuration examples to build this library:
-
-dependency: sun-java6-jdk
-./configure --with-java-jdk=/usr/lib/jvm/java-6-sun --with-jni-interface
-
-dependency: openjdk-6-jdk
-./configure --with-java-jdk=/usr/lib/jvm/java-6-openjdk --with-jni-interface
-
-dependency: gcj-4.4-jdk
-./configure --with-java-jdk=/usr/lib/jvm/java-gcj --with-jni-interface
-
-Our testing shows that sun java6 and openjdk 6 build fine, but not gcj
-4.4.
diff --git a/java/UST.c b/java/UST.c
deleted file mode 100644 (file)
index 84b7393..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <jni.h>
-
-#define TRACEPOINT_CREATE_PROBES
-#include "ust_java.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);
-
-       tracepoint(ust_java_event, ev_name_cstr, args_cstr);
-}
-
-TRACEPOINT_LIB
diff --git a/java/UST.java b/java/UST.java
deleted file mode 100644 (file)
index be5f7c7..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-import java.util.*;
-
-class UST {
-       public static native void ust_java_event(String name, String arg);
-       static {
-               System.loadLibrary("ustjava");
-       }
-}
-
diff --git a/java/ust_java.h b/java/ust_java.h
deleted file mode 100644 (file)
index 366b373..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#undef TRACEPOINT_SYSTEM
-#define TRACEPOINT_SYSTEM ust_java
-
-#if !defined(_TRACEPOINT_UST_JAVA_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TRACEPOINT_UST_JAVA_H
-
-/*
- * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; version 2.1 of
- * the License.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#include <ust/tracepoint.h>
-
-TRACEPOINT_EVENT(ust_java_event,
-       TP_PROTO(const char *name, const char *args),
-       TP_ARGS(name, args),
-       TP_FIELDS(
-               ctf_string(name, name)
-               ctf_string(args, args)
-       )
-)
-
-#endif /* _TRACEPOINT_UST_JAVA_H */
-
-#undef TRACEPOINT_INCLUDE_PATH
-#define TRACEPOINT_INCLUDE_PATH .
-#undef TRACEPOINT_INCLUDE_FILE
-#define TRACEPOINT_INCLUDE_FILE ust_java
-
-/* This part must be outside protection */
-#include <ust/tracepoint-event.h>
diff --git a/libustjava/.gitignore b/libustjava/.gitignore
new file mode 100644 (file)
index 0000000..ab97d04
--- /dev/null
@@ -0,0 +1,2 @@
+UST.class
+UST.h
diff --git a/libustjava/Makefile.am b/libustjava/Makefile.am
new file mode 100644 (file)
index 0000000..cb2c1b8
--- /dev/null
@@ -0,0 +1,21 @@
+if BUILD_JNI_INTERFACE
+
+AM_CPPFLAGS = -I$(top_srcdir)/include
+
+lib_LTLIBRARIES = libustjava.la
+libustjava_la_SOURCES = UST.c UST.h ust_java.h
+dist_noinst_DATA = UST.java
+libustjava_la_LIBADD = -lc -L$(top_builddir)/libust/.libs -lust
+
+all: UST.class UST.h
+
+clean-local:
+       rm -rf UST.h UST.class
+
+UST.class: UST.java
+       javac -d "$(builddir)" "$(srcdir)/UST.java"
+
+UST.h: UST.class
+       javah -jni UST
+
+endif
diff --git a/libustjava/README b/libustjava/README
new file mode 100644 (file)
index 0000000..37834e6
--- /dev/null
@@ -0,0 +1,12 @@
+This directory contains a simple API for instrumenting java applications.
+
+Configuration examples to build this library:
+
+dependency: sun-java6-jdk
+./configure --with-java-jdk=/usr/lib/jvm/java-6-sun --with-jni-interface
+
+dependency: openjdk-6-jdk
+./configure --with-java-jdk=/usr/lib/jvm/java-6-openjdk --with-jni-interface
+
+dependency: gcj-4.4-jdk
+./configure --with-java-jdk=/usr/lib/jvm/java-gcj --with-jni-interface
diff --git a/libustjava/UST.c b/libustjava/UST.c
new file mode 100644 (file)
index 0000000..84b7393
--- /dev/null
@@ -0,0 +1,17 @@
+#include <jni.h>
+
+#define TRACEPOINT_CREATE_PROBES
+#include "ust_java.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);
+
+       tracepoint(ust_java_event, ev_name_cstr, args_cstr);
+}
+
+TRACEPOINT_LIB
diff --git a/libustjava/UST.java b/libustjava/UST.java
new file mode 100644 (file)
index 0000000..be5f7c7
--- /dev/null
@@ -0,0 +1,9 @@
+import java.util.*;
+
+class UST {
+       public static native void ust_java_event(String name, String arg);
+       static {
+               System.loadLibrary("ustjava");
+       }
+}
+
diff --git a/libustjava/ust_java.h b/libustjava/ust_java.h
new file mode 100644 (file)
index 0000000..366b373
--- /dev/null
@@ -0,0 +1,44 @@
+#undef TRACEPOINT_SYSTEM
+#define TRACEPOINT_SYSTEM ust_java
+
+#if !defined(_TRACEPOINT_UST_JAVA_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_UST_JAVA_H
+
+/*
+ * Copyright (C) 2011  Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1 of
+ * the License.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#include <ust/tracepoint.h>
+
+TRACEPOINT_EVENT(ust_java_event,
+       TP_PROTO(const char *name, const char *args),
+       TP_ARGS(name, args),
+       TP_FIELDS(
+               ctf_string(name, name)
+               ctf_string(args, args)
+       )
+)
+
+#endif /* _TRACEPOINT_UST_JAVA_H */
+
+#undef TRACEPOINT_INCLUDE_PATH
+#define TRACEPOINT_INCLUDE_PATH .
+#undef TRACEPOINT_INCLUDE_FILE
+#define TRACEPOINT_INCLUDE_FILE ust_java
+
+/* This part must be outside protection */
+#include <ust/tracepoint-event.h>
This page took 0.03104 seconds and 4 git commands to generate.