Move liblttng-ust-python-agent to 'src/lib/'
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 9 Apr 2021 18:04:28 +0000 (14:04 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 13 Apr 2021 18:04:42 +0000 (14:04 -0400)
Move all public libraries under 'src/lib/'.

This is part of an effort to standardize our autotools setup across
projects to simplify maintenance.

Change-Id: If0eb731cc8f7faa860153f163b57f14292b7f522
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
.gitignore
configure.ac
src/Makefile.am
src/lib/Makefile.am [new file with mode: 0644]
src/lib/lttng-ust-python-agent/Makefile.am [new file with mode: 0644]
src/lib/lttng-ust-python-agent/lttng_ust_python.c [new file with mode: 0644]
src/lib/lttng-ust-python-agent/lttng_ust_python.h [new file with mode: 0644]
src/liblttng-ust-python-agent/Makefile.am [deleted file]
src/liblttng-ust-python-agent/lttng_ust_python.c [deleted file]
src/liblttng-ust-python-agent/lttng_ust_python.h [deleted file]

index bb9079bf24c6d784de626fbe977d18f220a649c4..e0cbc8cbc870df131f21d2e953d259003efb780e 100644 (file)
@@ -144,7 +144,8 @@ cscope.*
 /src/liblttng-ust-java-agent/jni/log4j/Makefile
 /src/liblttng-ust-java/Makefile
 /src/liblttng-ust-libc-wrapper/Makefile
-/src/liblttng-ust-python-agent/Makefile
+/src/lib/lttng-ust-python-agent/Makefile
+/src/lib/Makefile
 /src/liblttng-ust/Makefile
 /src/libringbuffer/Makefile
 /src/python-lttngust/Makefile
index c9bf1e866032458e55a6452b5b7dacfb7cb8b865..2b03cee369c9f21fe4f383e8eba08da4843a198b 100644 (file)
@@ -539,7 +539,8 @@ AC_CONFIG_FILES([
   src/liblttng-ust-java/Makefile
   src/liblttng-ust-libc-wrapper/Makefile
   src/liblttng-ust/Makefile
-  src/liblttng-ust-python-agent/Makefile
+  src/lib/lttng-ust-python-agent/Makefile
+  src/lib/Makefile
   src/libringbuffer/Makefile
   src/lttng-ust-ctl.pc
   src/lttng-ust.pc
index a5e8ac94decb2071c0b37711479401aa8e1bd211..881eea2660341ad3d82672d53fb461cd66c87e92 100644 (file)
@@ -7,6 +7,7 @@ SUBDIRS = \
        libcounter \
        liblttng-ust \
        liblttng-ust-ctl \
+       lib \
        liblttng-ust-fd \
        liblttng-ust-fork \
        liblttng-ust-libc-wrapper \
@@ -25,9 +26,7 @@ SUBDIRS += liblttng-ust-java-agent
 endif
 
 if ENABLE_PYTHON_AGENT
-SUBDIRS += \
-       python-lttngust \
-       liblttng-ust-python-agent
+SUBDIRS += python-lttngust
 endif
 
 pkgconfigdir = $(libdir)/pkgconfig
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
new file mode 100644 (file)
index 0000000..1b70e53
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: LGPL-2.1-only
+
+SUBDIRS =
+
+if ENABLE_PYTHON_AGENT
+SUBDIRS += lttng-ust-python-agent
+endif
diff --git a/src/lib/lttng-ust-python-agent/Makefile.am b/src/lib/lttng-ust-python-agent/Makefile.am
new file mode 100644 (file)
index 0000000..f0ce589
--- /dev/null
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: LGPL-2.1-only
+
+# tracepoint provider: always built/installed (does not depend on Python per se)
+AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing
+
+lib_LTLIBRARIES = liblttng-ust-python-agent.la
+
+liblttng_ust_python_agent_la_SOURCES = lttng_ust_python.c lttng_ust_python.h
+liblttng_ust_python_agent_la_LIBADD = \
+       -lc \
+       $(top_builddir)/src/liblttng-ust/liblttng-ust.la
+
+# Follow the main library soname for co-installability
+liblttng_ust_python_agent_la_LDFLAGS = -version-info $(LTTNG_UST_LIBRARY_VERSION)
diff --git a/src/lib/lttng-ust-python-agent/lttng_ust_python.c b/src/lib/lttng-ust-python-agent/lttng_ust_python.c
new file mode 100644 (file)
index 0000000..f2efb4e
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
+ */
+
+#define _LGPL_SOURCE
+#define TRACEPOINT_DEFINE
+#define TRACEPOINT_CREATE_PROBES
+#include "lttng_ust_python.h"
+
+/*
+ * The tracepoint fired by the agent.
+ */
+
+void py_tracepoint(const char *asctime, const char *msg,
+               const char *logger_name, const char *funcName, unsigned int lineno,
+               unsigned int int_loglevel, unsigned int thread, const char *threadName);
+void py_tracepoint(const char *asctime, const char *msg,
+               const char *logger_name, const char *funcName, unsigned int lineno,
+               unsigned int int_loglevel, unsigned int thread, const char *threadName)
+{
+       tracepoint(lttng_python, event, asctime, msg, logger_name, funcName,
+                       lineno, int_loglevel, thread, threadName);
+}
diff --git a/src/lib/lttng-ust-python-agent/lttng_ust_python.h b/src/lib/lttng-ust-python-agent/lttng_ust_python.h
new file mode 100644 (file)
index 0000000..29440e2
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * SPDX-License-Identifier: LGPL-2.1-only
+ *
+ * Copyright (C) 2014 - David Goulet <dgoulet@efficios.com>
+ */
+
+#undef TRACEPOINT_PROVIDER
+#define TRACEPOINT_PROVIDER lttng_python
+
+#if !defined(_TRACEPOINT_LTTNG_UST_PYTHON_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
+#define _TRACEPOINT_LTTNG_UST_PYTHON_H
+
+#include <lttng/tracepoint.h>
+#include <stdbool.h>
+
+TRACEPOINT_EVENT(lttng_python, event,
+       TP_ARGS(
+               const char *, asctime,
+               const char *, msg,
+               const char *, logger_name,
+               const char *, funcName,
+               int, lineno,
+               int, int_loglevel,
+               int, thread,
+               const char *, threadName
+       ),
+       TP_FIELDS(
+               ctf_string(asctime, asctime)
+               ctf_string(msg, msg)
+               ctf_string(logger_name, logger_name)
+               ctf_string(funcName, funcName)
+               ctf_integer(unsigned int, lineno, lineno)
+               ctf_integer(unsigned int, int_loglevel, int_loglevel)
+               ctf_integer(unsigned int, thread, thread)
+               ctf_string(threadName, threadName)
+       )
+)
+
+#endif /* _TRACEPOINT_LTTNG_UST_PYTHON_H */
+
+#undef TRACEPOINT_INCLUDE
+#define TRACEPOINT_INCLUDE "./lttng_ust_python.h"
+
+/* This part must be outside ifdef protection */
+#include <lttng/tracepoint-event.h>
diff --git a/src/liblttng-ust-python-agent/Makefile.am b/src/liblttng-ust-python-agent/Makefile.am
deleted file mode 100644 (file)
index f0ce589..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# SPDX-License-Identifier: LGPL-2.1-only
-
-# tracepoint provider: always built/installed (does not depend on Python per se)
-AM_CFLAGS += -I$(srcdir) -fno-strict-aliasing
-
-lib_LTLIBRARIES = liblttng-ust-python-agent.la
-
-liblttng_ust_python_agent_la_SOURCES = lttng_ust_python.c lttng_ust_python.h
-liblttng_ust_python_agent_la_LIBADD = \
-       -lc \
-       $(top_builddir)/src/liblttng-ust/liblttng-ust.la
-
-# Follow the main library soname for co-installability
-liblttng_ust_python_agent_la_LDFLAGS = -version-info $(LTTNG_UST_LIBRARY_VERSION)
diff --git a/src/liblttng-ust-python-agent/lttng_ust_python.c b/src/liblttng-ust-python-agent/lttng_ust_python.c
deleted file mode 100644 (file)
index f2efb4e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * SPDX-License-Identifier: LGPL-2.1-only
- *
- * Copyright (C) 2014 David Goulet <dgoulet@efficios.com>
- */
-
-#define _LGPL_SOURCE
-#define TRACEPOINT_DEFINE
-#define TRACEPOINT_CREATE_PROBES
-#include "lttng_ust_python.h"
-
-/*
- * The tracepoint fired by the agent.
- */
-
-void py_tracepoint(const char *asctime, const char *msg,
-               const char *logger_name, const char *funcName, unsigned int lineno,
-               unsigned int int_loglevel, unsigned int thread, const char *threadName);
-void py_tracepoint(const char *asctime, const char *msg,
-               const char *logger_name, const char *funcName, unsigned int lineno,
-               unsigned int int_loglevel, unsigned int thread, const char *threadName)
-{
-       tracepoint(lttng_python, event, asctime, msg, logger_name, funcName,
-                       lineno, int_loglevel, thread, threadName);
-}
diff --git a/src/liblttng-ust-python-agent/lttng_ust_python.h b/src/liblttng-ust-python-agent/lttng_ust_python.h
deleted file mode 100644 (file)
index 29440e2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * SPDX-License-Identifier: LGPL-2.1-only
- *
- * Copyright (C) 2014 - David Goulet <dgoulet@efficios.com>
- */
-
-#undef TRACEPOINT_PROVIDER
-#define TRACEPOINT_PROVIDER lttng_python
-
-#if !defined(_TRACEPOINT_LTTNG_UST_PYTHON_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
-#define _TRACEPOINT_LTTNG_UST_PYTHON_H
-
-#include <lttng/tracepoint.h>
-#include <stdbool.h>
-
-TRACEPOINT_EVENT(lttng_python, event,
-       TP_ARGS(
-               const char *, asctime,
-               const char *, msg,
-               const char *, logger_name,
-               const char *, funcName,
-               int, lineno,
-               int, int_loglevel,
-               int, thread,
-               const char *, threadName
-       ),
-       TP_FIELDS(
-               ctf_string(asctime, asctime)
-               ctf_string(msg, msg)
-               ctf_string(logger_name, logger_name)
-               ctf_string(funcName, funcName)
-               ctf_integer(unsigned int, lineno, lineno)
-               ctf_integer(unsigned int, int_loglevel, int_loglevel)
-               ctf_integer(unsigned int, thread, thread)
-               ctf_string(threadName, threadName)
-       )
-)
-
-#endif /* _TRACEPOINT_LTTNG_UST_PYTHON_H */
-
-#undef TRACEPOINT_INCLUDE
-#define TRACEPOINT_INCLUDE "./lttng_ust_python.h"
-
-/* This part must be outside ifdef protection */
-#include <lttng/tracepoint-event.h>
This page took 0.029501 seconds and 4 git commands to generate.