Implement tracepoint-internal.h as LGPLv2.1 (not exported)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Nov 2011 18:30:00 +0000 (13:30 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 17 Nov 2011 18:30:00 +0000 (13:30 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/Makefile.am
include/lttng/ust-events.h
liblttng-ust/Makefile.am
liblttng-ust/lttng-ust-abi.c
liblttng-ust/tracepoint-internal.h [new file with mode: 0644]

index cd4619deb176665bcb563d820b37e87cfab71820..9c1a72285857623beeb186d4eeb33518f69401f0 100644 (file)
@@ -34,7 +34,6 @@ noinst_HEADERS = \
        lttng/ust-comm.h \
        lttng/compat.h \
        lttng/marker-internal.h \
-       lttng/tracepoint-internal.h \
        lttng/clock.h \
        lttng/probe-internal.h \
        lttng/stringify.h \
index 6c272172a3a40dc61fe6a52eca601500d6f5dd41..1c7140ff69ef528baf148af2fab14c0faeb5bbf1 100644 (file)
@@ -25,7 +25,6 @@
 #include <lttng/ust-tracer.h>
 #include <endian.h>
 #include <float.h>
-#include <lttng/tracepoint-internal.h>
 
 struct ltt_channel;
 struct ltt_session;
@@ -303,11 +302,6 @@ struct ltt_transport {
        struct ltt_channel_ops ops;
 };
 
-struct ltt_tracepoint_list {
-       struct tracepoint_iter iter;
-       int got_first;
-};
-
 struct ltt_session *ltt_session_create(void);
 int ltt_session_enable(struct ltt_session *session);
 int ltt_session_disable(struct ltt_session *session);
index d98b3f021e8df05187d006277ac4e99fac936aca..9acd241bee515b1ca0ae812a8f3a84a3c25ae95d 100644 (file)
@@ -17,7 +17,8 @@ liblttng_ust_runtime_la_SOURCES = \
        lttng-context-procname.c \
        ltt-context.c \
        ltt-events.c \
-       tracepoint.c
+       tracepoint.c \
+       tracepoint-internal.h
 
 liblttng_ust_support_la_SOURCES = \
        ltt-tracer.h \
index 435c86a673c8cb2652d6b992974b7846ae119108..e03024f49d2bade05e0b5472ddfb50f373e20ae4 100644 (file)
 #include <lttng/usterr-signal-safe.h>
 #include "lttng/core.h"
 #include "ltt-tracer.h"
+#include "tracepoint-internal.h"
+
+struct ltt_tracepoint_list {
+       struct tracepoint_iter iter;
+       int got_first;
+};
 
 static int lttng_ust_abi_close_in_progress;
 
diff --git a/liblttng-ust/tracepoint-internal.h b/liblttng-ust/tracepoint-internal.h
new file mode 100644 (file)
index 0000000..c883c7b
--- /dev/null
@@ -0,0 +1,58 @@
+#ifndef _LTTNG_TRACEPOINT_INTERNAL_H
+#define _LTTNG_TRACEPOINT_INTERNAL_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 <urcu/list.h>
+#include <lttng/tracepoint-types.h>
+
+struct tracepoint_lib {
+       struct cds_list_head list;
+       struct tracepoint tracepoints_start;
+       int tracepoints_count;
+};
+
+struct tracepoint_iter {
+       struct tracepoint_lib *lib;
+       struct tracepoint * const *tracepoint;
+
+extern int tracepoint_probe_register_noupdate(const char *name, void *callback, void *priv);
+extern int tracepoint_probe_unregister_noupdate(const char *name, void *callback, void *priv);
+extern int tracepoint_probe_update_all(void);
+
+extern void tracepoint_iter_start(struct tracepoint_iter *iter);
+extern void tracepoint_iter_next(struct tracepoint_iter *iter);
+extern void tracepoint_iter_stop(struct tracepoint_iter *iter);
+extern void tracepoint_iter_reset(struct tracepoint_iter *iter);
+extern int tracepoint_get_iter_range(struct tracepoint * const **tracepoint,
+       struct tracepoint * const *begin, struct tracepoint * const *end);
+
+/*
+ * call after disconnection of last probe implemented within a
+ * shared object before unmapping the library that contains the probe.
+ */
+static inline void tracepoint_synchronize_unregister(void)
+{
+       synchronize_rcu();
+}
+
+extern void init_tracepoint(void);
+extern void exit_tracepoint(void);
+
+#endif /* _LTTNG_TRACEPOINT_INTERNAL_H */
This page took 0.028034 seconds and 4 git commands to generate.