move probe stuff to probe.h, to have it available in system wide headers
authorPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 8 Dec 2009 19:51:55 +0000 (14:51 -0500)
committerPierre-Marc Fournier <pierre-marc.fournier@polymtl.ca>
Tue, 8 Dec 2009 19:51:55 +0000 (14:51 -0500)
include/Makefile.am
include/ust/probe.h [new file with mode: 0644]
include/ust/ust.h
libust/tracer.h

index 3f6ca1e13533bc4dee6127a717d7998f5166ff0e..ea66be86e5b53b1d33e6c3201b0f2cd10aa1bd36 100644 (file)
@@ -1,4 +1,4 @@
 nobase_include_HEADERS = ust/immediate.h ust/kernelcompat.h ust/marker.h \
-       ust/tracepoint.h ust/processor.h ust/ust.h
+       ust/tracepoint.h ust/processor.h ust/probe.h ust/ust.h
 
 noinst_HEADERS = share.h usterr.h
diff --git a/include/ust/probe.h b/include/ust/probe.h
new file mode 100644 (file)
index 0000000..740f7ee
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef _UST_PROBE_H
+#define _UST_PROBE_H
+
+/*
+ * Copyright (C) 2009 Pierre-Marc Fournier
+ *
+ * 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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
+ *
+ */
+
+/* Maximum number of callbacks per marker */
+#define LTT_NR_CALLBACKS        10
+
+struct ltt_serialize_closure;
+
+typedef size_t (*ltt_serialize_cb)(struct ust_buffer *buf, size_t buf_offset,
+                        struct ltt_serialize_closure *closure,
+                        void *serialize_private, int *largest_align,
+                        const char *fmt, va_list *args);
+
+struct ltt_available_probe {
+        const char *name;               /* probe name */
+        const char *format;
+        marker_probe_func *probe_func;
+        ltt_serialize_cb callbacks[LTT_NR_CALLBACKS];
+        struct list_head node;          /* registered probes list */
+};
+
+extern int ltt_probe_register(struct ltt_available_probe *pdata); 
+extern int ltt_probe_unregister(struct ltt_available_probe *pdata); 
+extern int ltt_marker_connect(const char *channel, const char *mname, 
+                const char *pname); 
+extern int ltt_marker_disconnect(const char *channel, const char *mname, 
+                const char *pname);
+
+#endif /* _UST_PROBE_H */
index df2a7aeeae9d72fa5a25654fb9efd854585a996c..f3303a0a2ab96a2c75fcd0b7e556e9fcda5c5140 100644 (file)
@@ -7,5 +7,6 @@
 #include <ust/marker.h>
 #include <ust/processor.h>
 #include <ust/tracepoint.h>
+#include <ust/probe.h>
 
 #endif /* UST_H */
index 58aae583c6aa67d34684f5c8f896ce5116c214ab..880affa262afd383515ab001d4c3473c30b68555 100644 (file)
@@ -32,6 +32,7 @@
 #include "channels.h"
 #include "tracercore.h"
 #include <ust/marker.h>
+#include <ust/probe.h>
 
 /* Number of bytes to log with a read/write event */
 #define LTT_LOG_RW_SIZE                        32L
@@ -55,12 +56,6 @@ struct ltt_active_marker;
 struct ltt_serialize_closure;
 struct ltt_probe_private_data;
 
-/* Serialization callback '%k' */
-typedef size_t (*ltt_serialize_cb)(struct ust_buffer *buf, size_t buf_offset,
-                       struct ltt_serialize_closure *closure,
-                       void *serialize_private, int *largest_align,
-                       const char *fmt, va_list *args);
-
 struct ltt_serialize_closure {
        ltt_serialize_cb *callbacks;
        long cb_args[LTT_NR_CALLBACKS];
@@ -72,14 +67,6 @@ extern size_t ltt_serialize_data(struct ust_buffer *buf, size_t buf_offset,
                        void *serialize_private,
                        int *largest_align, const char *fmt, va_list *args);
 
-struct ltt_available_probe {
-       const char *name;               /* probe name */
-       const char *format;
-       marker_probe_func *probe_func;
-       ltt_serialize_cb callbacks[LTT_NR_CALLBACKS];
-       struct list_head node;          /* registered probes list */
-};
-
 struct ltt_probe_private_data {
        struct ltt_trace_struct *trace; /*
                                         * Target trace, for metadata
@@ -605,12 +592,6 @@ extern void ltt_core_unregister(void);
 extern void ltt_release_trace(struct kref *kref);
 extern void ltt_release_transport(struct kref *kref);
 
-extern int ltt_probe_register(struct ltt_available_probe *pdata);
-extern int ltt_probe_unregister(struct ltt_available_probe *pdata);
-extern int ltt_marker_connect(const char *channel, const char *mname,
-               const char *pname);
-extern int ltt_marker_disconnect(const char *channel, const char *mname,
-               const char *pname);
 extern void ltt_dump_marker_state(struct ltt_trace_struct *trace);
 
 extern void ltt_lock_traces(void);
This page took 0.025541 seconds and 4 git commands to generate.