tracepoint API change: rename TP_ARGS to TP_VARS
[lttng-ust.git] / include / lttng / tracepoint.h
index dc7d62bde54789d57bc02ba9173b6b6fd307364e..e44c0331212158fd255c61056ac2c240c607669d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _UST_TRACEPOINT_H
-#define _UST_TRACEPOINT_H
+#ifndef _LTTNG_TRACEPOINT_H
+#define _LTTNG_TRACEPOINT_H
 
 /*
  * Copyright (C) 2008-2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  *
  * Heavily inspired from the Linux Kernel Markers.
- *
- * Ported to userspace by Pierre-Marc Fournier.
  */
 
 #include <urcu-bp.h>
 #include <urcu/list.h>
+#include <lttng/tracepoint-types.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-struct tracepoint_probe {
-       void *func;
-       void *data;
-};
-
-struct tracepoint {
-       const char *name;               /* Tracepoint name */
-       char state;                     /* State. */
-       struct tracepoint_probe *probes;
-};
-
 /*
  * Tracepoints should be added to the instrumented code using the
  * "tracepoint()" macro.
@@ -74,13 +62,13 @@ struct tracepoint {
 
 #define TP_PARAMS(args...)     args
 #define TP_PROTO(args...)      args
-#define TP_ARGS(args...)       args
+#define TP_VARS(args...)       args
 
 #define __CHECK_TRACE(provider, name, proto, args)                     \
        do {                                                            \
                if (caa_unlikely(__tracepoint_##provider##___##name.state))     \
                        __DO_TRACE(&__tracepoint_##provider##___##name, \
-                               TP_PROTO(proto), TP_ARGS(args));        \
+                               TP_PROTO(proto), TP_VARS(args));        \
        } while (0)
 
 /*
@@ -93,7 +81,7 @@ struct tracepoint {
        static inline void __trace_##provider##___##name(proto)         \
        {                                                               \
                __CHECK_TRACE(provider, name, TP_PROTO(data_proto),     \
-                             TP_ARGS(data_args));                      \
+                             TP_VARS(data_args));                      \
        }                                                               \
        static inline int                                               \
        __register_trace_##provider##___##name(void (*probe)(data_proto), void *data)   \
@@ -208,7 +196,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  * TRACEPOINT_EVENT(< [com_company_]project[_component] >, < event >,
  *     TP_PROTO(int arg0, void *arg1, char *string, size_t strlen,
  *              long *arg4, size_t arg4_len),
- *     TP_ARGS(arg0, arg1, string, strlen, arg4, arg4_len),
+ *     TP_VARS(arg0, arg1, string, strlen, arg4, arg4_len),
  *     TP_FIELDS(
  *
  *         * Integer, printed in base 10 * 
@@ -274,8 +262,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  *       (optional),
  *       "event" is the name of the tracepoint event.
  *
- * the provider identifier is limited to 127 characters.
- * the "event" identifier is limited to 127 characters.
+ * the provider:event identifier is limited to 127 characters.
  *
  * As an example, let's consider a user-space application "someproject"
  * that would have an internal thread scheduler:
@@ -296,7 +283,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  *     *  TP_PROTO1/TP_PROTO2/TP_PROTO3 ugliness.)
  *     *
  *
- *     TP_ARGS(rq, prev, next),
+ *     TP_VARS(rq, prev, next),
  *
  *     *
  *     * Fast binary tracing: define the trace record via
@@ -424,4 +411,4 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
 }
 #endif
 
-#endif /* _UST_TRACEPOINT_H */
+#endif /* _LTTNG_TRACEPOINT_H */
This page took 0.024736 seconds and 4 git commands to generate.