Fix: check for java .class in package subfolders
authorMichael Jeanson <mjeanson@gmail.com>
Wed, 13 Nov 2013 17:16:18 +0000 (12:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 13 Nov 2013 19:09:22 +0000 (14:09 -0500)
Signed-off-by: Michael Jeanson <mjeanson@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-java/LTTngUst.java [deleted file]
liblttng-ust-java/Makefile.am
liblttng-ust-java/org/lttng/ust/LTTngUst.java [new file with mode: 0644]

diff --git a/liblttng-ust-java/LTTngUst.java b/liblttng-ust-java/LTTngUst.java
deleted file mode 100644 (file)
index 79ad97a..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/**
- * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- * Copyright (C) 2012 Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
- *
- * 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; only
- * 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
- */
-
-package org.lttng.ust;
-
-/**
- * This class implements the the Java side of the LTTng-UST Java interface.
- *
- * First, make sure you have installed "liblttng-ust-java.so" where the linker
- * can find it. You can then call LTTngUst.init() from your Java program to
- * connect the methods exposed here to the native library.
- *
- * Because of limitations in the probe declaration, all trace events generated
- * by this library will have "lttng_ust_java" for domain, and "<type>_event" for
- * event name in the CTF trace files. The "name" parameter will instead appear
- * as the first element of the event's payload.
- *
- * @author Mathieu Desnoyers
- * @author Alexandre Montplaisir
- *
- */
-public abstract class LTTngUst {
-
-    /**
-     * Initialize the UST tracer. This should always be called first, before any
-     * tracepoint* method.
-     */
-    public static void init() {
-        System.loadLibrary("lttng-ust-java"); //$NON-NLS-1$
-    }
-
-    /**
-     * Insert a tracepoint with a payload of type Integer.
-     *
-     * @param name
-     *            The name assigned to this event. For best performance, this
-     *            should be a statically-defined String, or a literal.
-     * @param payload
-     *            The int payload
-     */
-    public static native void tracepointInt(String name, int payload);
-
-    /**
-     * Insert a tracepoint with a payload consisting of two integers.
-     *
-     * @param name
-     *            The name assigned to this event. For best performance, this
-     *            should be a statically-defined String, or a literal.
-     * @param payload1
-     *            The first int payload
-     * @param payload2
-     *            The second int payload
-     */
-    public static native void
-    tracepointIntInt(String name, int payload1, int payload2);
-
-    /**
-     * Insert a tracepoint with a payload of type Long
-     *
-     * @param name
-     *            The name assigned to this event. For best performance, this
-     *            should be a statically-defined String, or a literal.
-     * @param payload
-     *            The long payload
-     */
-    public static native void tracepointLong(String name, long payload);
-
-    /**
-     * Insert a tracepoint with a payload consisting of two longs.
-     *
-     * @param name
-     *            The name assigned to this event. For best performance, this
-     *            should be a statically-defined String, or a literal.
-     * @param payload1
-     *            The first long payload
-     * @param payload2
-     *            The second long payload
-     */
-    public static native void
-    tracepointLongLong(String name, long payload1, long payload2);
-
-    /**
-     * Insert a tracepoint with a String payload.
-     *
-     * @param name
-     *            The name assigned to this event. For best performance, this
-     *            should be a statically-defined String, or a literal.
-     * @param payload
-     *            The String payload
-     */
-    public static native void tracepointString(String name, String payload);
-
-}
-
index 8bf63499ec144ccf226e0c86cb0013f18e4168c5..e52bf0e2a27937b9c5bf5ab6c28a696790d4c740 100644 (file)
@@ -5,31 +5,34 @@ AM_CPPFLAGS = -I$(top_srcdir)/include
 lib_LTLIBRARIES = liblttng-ust-java.la
 liblttng_ust_java_la_SOURCES = LTTngUst.c lttng_ust_java.h
 nodist_liblttng_ust_java_la_SOURCES = org_lttng_ust_LTTngUst.h
-dist_noinst_DATA = LTTngUst.java
+dist_noinst_DATA = $(LTTNG_JUST_SRCDIR)/LTTngUst.java
 liblttng_ust_java_la_LIBADD = -lc -L$(top_builddir)/liblttng-ust/.libs -llttng-ust
 
+LTTNG_JUST_SRCDIR = $(srcdir)/org/lttng/ust
+LTTNG_JUST_DESTDIR = $(builddir)/org/lttng/ust
+
 if HAVE_JAVA_JDK
 JCC=$(JAVA_JDK)/bin
 else
 JCC=javac
 endif
 
-all: LTTngUst.class org_lttng_ust_LTTngUst.h liblttng-ust-java.jar
+all: $(LTTNG_JUST_DESTDIR)/LTTngUst.class org_lttng_ust_LTTngUst.h liblttng-ust-java.jar
 
 clean-local:
        rm -f org_lttng_ust_LTTngUst.h
        rm -f liblttng-ust-java.jar
-       rm -rf org/
+       rm -rf org/lttng/ust/*.class
 
 LTTngUst.c: org_lttng_ust_LTTngUst.h
 
-LTTngUst.class: LTTngUst.java
-       $(JCC)/javac -d "$(builddir)" "$(srcdir)/LTTngUst.java"
+$(LTTNG_JUST_DESTDIR)/LTTngUst.class: $(LTTNG_JUST_DESTDIR)/LTTngUst.java
+       $(JCC)/javac -d "$(builddir)" "$(LTTNG_JUST_DESTDIR)/LTTngUst.java"
 
-org_lttng_ust_LTTngUst.h: LTTngUst.class
+org_lttng_ust_LTTngUst.h: $(LTTNG_JUST_DESTDIR)/LTTngUst.class
        $(JCC)/javah org.lttng.ust.LTTngUst
 
-liblttng-ust-java.jar: LTTngUst.class
-       $(JCC)/jar cf liblttng-ust-java.jar org/*
+liblttng-ust-java.jar: $(LTTNG_JUST_DESTDIR)/LTTngUst.class
+       $(JCC)/jar cf liblttng-ust-java.jar $(LTTNG_JUST_DESTDIR)/*.class
 
 endif
diff --git a/liblttng-ust-java/org/lttng/ust/LTTngUst.java b/liblttng-ust-java/org/lttng/ust/LTTngUst.java
new file mode 100644 (file)
index 0000000..79ad97a
--- /dev/null
@@ -0,0 +1,110 @@
+/**
+ * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2012 Alexandre Montplaisir <alexandre.montplaisir@polymtl.ca>
+ *
+ * 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; only
+ * 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
+ */
+
+package org.lttng.ust;
+
+/**
+ * This class implements the the Java side of the LTTng-UST Java interface.
+ *
+ * First, make sure you have installed "liblttng-ust-java.so" where the linker
+ * can find it. You can then call LTTngUst.init() from your Java program to
+ * connect the methods exposed here to the native library.
+ *
+ * Because of limitations in the probe declaration, all trace events generated
+ * by this library will have "lttng_ust_java" for domain, and "<type>_event" for
+ * event name in the CTF trace files. The "name" parameter will instead appear
+ * as the first element of the event's payload.
+ *
+ * @author Mathieu Desnoyers
+ * @author Alexandre Montplaisir
+ *
+ */
+public abstract class LTTngUst {
+
+    /**
+     * Initialize the UST tracer. This should always be called first, before any
+     * tracepoint* method.
+     */
+    public static void init() {
+        System.loadLibrary("lttng-ust-java"); //$NON-NLS-1$
+    }
+
+    /**
+     * Insert a tracepoint with a payload of type Integer.
+     *
+     * @param name
+     *            The name assigned to this event. For best performance, this
+     *            should be a statically-defined String, or a literal.
+     * @param payload
+     *            The int payload
+     */
+    public static native void tracepointInt(String name, int payload);
+
+    /**
+     * Insert a tracepoint with a payload consisting of two integers.
+     *
+     * @param name
+     *            The name assigned to this event. For best performance, this
+     *            should be a statically-defined String, or a literal.
+     * @param payload1
+     *            The first int payload
+     * @param payload2
+     *            The second int payload
+     */
+    public static native void
+    tracepointIntInt(String name, int payload1, int payload2);
+
+    /**
+     * Insert a tracepoint with a payload of type Long
+     *
+     * @param name
+     *            The name assigned to this event. For best performance, this
+     *            should be a statically-defined String, or a literal.
+     * @param payload
+     *            The long payload
+     */
+    public static native void tracepointLong(String name, long payload);
+
+    /**
+     * Insert a tracepoint with a payload consisting of two longs.
+     *
+     * @param name
+     *            The name assigned to this event. For best performance, this
+     *            should be a statically-defined String, or a literal.
+     * @param payload1
+     *            The first long payload
+     * @param payload2
+     *            The second long payload
+     */
+    public static native void
+    tracepointLongLong(String name, long payload1, long payload2);
+
+    /**
+     * Insert a tracepoint with a String payload.
+     *
+     * @param name
+     *            The name assigned to this event. For best performance, this
+     *            should be a statically-defined String, or a literal.
+     * @param payload
+     *            The String payload
+     */
+    public static native void tracepointString(String name, String payload);
+
+}
+
This page took 0.027712 seconds and 4 git commands to generate.