Tracepoint API change: add provider field
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 8 Nov 2011 15:56:28 +0000 (10:56 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 8 Nov 2011 15:56:28 +0000 (10:56 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint-event.h
include/lttng/tracepoint.h
include/lttng/ust-tracepoint-event-reset.h
include/lttng/ust-tracepoint-event.h
liblttng-ust/ltt-events.c
liblttng-ust/probes/lttng-probe-ust.h
tests/fork/fork.c
tests/fork/fork2.c
tests/fork/ust_tests_fork.h
tests/hello/hello.c
tests/hello/ust_tests_hello.h

index 65120d4b80d04523950e2e19b24f681ee47d7b26..a102ce74bfa982ae2aec25522581b769de4bc6f0 100644 (file)
@@ -52,20 +52,20 @@ extern "C" {
 #endif
 
 #undef TRACEPOINT_EVENT
-#define TRACEPOINT_EVENT(name, proto, args, fields)            \
-       _DEFINE_TRACEPOINT(name)
+#define TRACEPOINT_EVENT(provider, name, proto, args, fields)          \
+       _DEFINE_TRACEPOINT(provider, name)
 
 #undef TRACEPOINT_EVENT_INSTANCE
-#define TRACEPOINT_EVENT_INSTANCE(template, name, proto, args) \
-       _DEFINE_TRACEPOINT(name)
+#define TRACEPOINT_EVENT_INSTANCE(provider, template, name, proto, args)       \
+       _DEFINE_TRACEPOINT(provider, name)
 
 #undef TRACEPOINT_EVENT_NOARGS
-#define TRACEPOINT_EVENT_NOARGS(name, fields)                  \
-       _DEFINE_TRACEPOINT(name)
+#define TRACEPOINT_EVENT_NOARGS(provider, name, fields)                        \
+       _DEFINE_TRACEPOINT(provider, name)
 
 #undef TRACEPOINT_EVENT_INSTANCE_NOARGS
-#define TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name)       \
-       _DEFINE_TRACEPOINT(name)
+#define TRACEPOINT_EVENT_INSTANCE_NOARGS(provider, template, name)     \
+       _DEFINE_TRACEPOINT(provider, name)
 
 #undef TRACEPOINT_INCLUDE
 #undef __TRACEPOINT_INCLUDE
index e39a3849bc8b928bc7aaff2e5d4f5192eb300a5b..dc7d62bde54789d57bc02ba9173b6b6fd307364e 100644 (file)
@@ -47,7 +47,8 @@ struct tracepoint {
  * Tracepoints should be added to the instrumented code using the
  * "tracepoint()" macro.
  */
-#define tracepoint(name, args...)      __trace_##name(args)
+#define tracepoint(provider, name, args...)    \
+               __trace_##provider##___##name(args)
 
 /*
  * it_func[0] is never NULL because there is at least one element in the array
@@ -75,10 +76,10 @@ struct tracepoint {
 #define TP_PROTO(args...)      args
 #define TP_ARGS(args...)       args
 
-#define __CHECK_TRACE(name, proto, args)                               \
+#define __CHECK_TRACE(provider, name, proto, args)                     \
        do {                                                            \
-               if (caa_unlikely(__tracepoint_##name.state))            \
-                       __DO_TRACE(&__tracepoint_##name,                \
+               if (caa_unlikely(__tracepoint_##provider##___##name.state))     \
+                       __DO_TRACE(&__tracepoint_##provider##___##name, \
                                TP_PROTO(proto), TP_ARGS(args));        \
        } while (0)
 
@@ -87,23 +88,23 @@ struct tracepoint {
  * not add unwanted padding between the beginning of the section and the
  * structure. Force alignment to the same alignment as the section start.
  */
-#define __DECLARE_TRACEPOINT(name, proto, args, data_proto, data_args) \
-       extern struct tracepoint __tracepoint_##name;                   \
-       static inline void __trace_##name(proto)                        \
+#define __DECLARE_TRACEPOINT(provider, name, proto, args, data_proto, data_args)       \
+       extern struct tracepoint __tracepoint_##provider##___##name;    \
+       static inline void __trace_##provider##___##name(proto)         \
        {                                                               \
-               __CHECK_TRACE(name, TP_PROTO(data_proto),               \
+               __CHECK_TRACE(provider, name, TP_PROTO(data_proto),     \
                              TP_ARGS(data_args));                      \
        }                                                               \
        static inline int                                               \
-       __register_trace_##name(void (*probe)(data_proto), void *data)  \
+       __register_trace_##provider##___##name(void (*probe)(data_proto), void *data)   \
        {                                                               \
-               return __tracepoint_probe_register(#name, (void *)probe,\
+               return __tracepoint_probe_register(#provider ":" #name, (void *) probe, \
                                                 data);                 \
        }                                                               \
        static inline int                                               \
-       __unregister_trace_##name(void (*probe)(data_proto), void *data)\
+       __unregister_trace_##provider##___##name(void (*probe)(data_proto), void *data) \
        {                                                               \
-               return __tracepoint_probe_unregister(#name, (void *)probe, \
+               return __tracepoint_probe_unregister(#provider ":" #name, (void *) probe, \
                                                   data);               \
        }
 
@@ -121,11 +122,11 @@ struct tracepoint {
  * DECLARE_TRACEPOINT() passes "proto" as the tracepoint protoype and
  * "void *__tp_cb_data, proto" as the callback prototype.
  */
-#define _DECLARE_TRACEPOINT_NOARGS(name)                               \
-       __DECLARE_TRACEPOINT(name, void, , void *__tp_cb_data, __tp_cb_data)
+#define _DECLARE_TRACEPOINT_NOARGS(provider, name)                     \
+       __DECLARE_TRACEPOINT(provider, name, void, , void *__tp_cb_data, __tp_cb_data)
 
-#define _DECLARE_TRACEPOINT(name, proto, args)                         \
-       __DECLARE_TRACEPOINT(name, TP_PARAMS(proto), TP_PARAMS(args),   \
+#define _DECLARE_TRACEPOINT(provider, name, proto, args)               \
+       __DECLARE_TRACEPOINT(provider, name, TP_PARAMS(proto), TP_PARAMS(args), \
                        TP_PARAMS(void *__tp_cb_data, proto),           \
                        TP_PARAMS(__tp_cb_data, args))
 
@@ -133,21 +134,22 @@ struct tracepoint {
  * __tracepoints_ptrs section is not const (read-only) to let the linker update
  * the pointer, allowing PIC code.
  */
-#define _DEFINE_TRACEPOINT(name)                                       \
-       static const char __tpstrtab_##name[]                           \
-       __attribute__((section("__tracepoints_strings"))) = #name;      \
-       struct tracepoint __tracepoint_##name                           \
+#define _DEFINE_TRACEPOINT(provider, name)                             \
+       static const char __tpstrtab_##provider##___##name[]            \
+       __attribute__((section("__tracepoints_strings"))) =             \
+               #provider ":" #name;                                    \
+       struct tracepoint __tracepoint_##provider##___##name            \
        __attribute__((section("__tracepoints"))) =                     \
-               { __tpstrtab_##name, 0, NULL };                         \
-       static struct tracepoint * __tracepoint_ptr_##name              \
+               { __tpstrtab_##provider##___##name, 0, NULL };          \
+       static struct tracepoint * __tracepoint_ptr_##provider##___##name       \
        __attribute__((used, section("__tracepoints_ptrs"))) =          \
-               &__tracepoint_##name;
+               &__tracepoint_##provider##___##name;
 
 
-#define __register_tracepoint(name, probe, data)                       \
-               __register_trace_##name(probe, data)
-#define __unregister_tracepoint(name, probe, data)                     \
-               __unregister_trace_##name(probe, data)
+#define __register_tracepoint(provider, name, probe, data)             \
+               __register_trace_##provider##___##name(probe, data)
+#define __unregister_tracepoint(provider, name, probe, data)           \
+               __unregister_trace_##provider##___##name(probe, data)
 
 /*
  * Connect a probe to a tracepoint.
@@ -203,7 +205,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  *
  * In short, an example:
  *
- * TRACEPOINT_EVENT(< [com_company_]project_[component_]event >,
+ * 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),
@@ -233,20 +235,20 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  * We define a tracepoint, its arguments, and its 'fast binary record'
  * layout.
  *
- * Firstly, name your tracepoint via TRACEPOINT_EVENT(name,
+ * Firstly, name your tracepoint via TRACEPOINT_EVENT(provider, name,
  *
- * The name should be a proper C99 identifier.
- * The "name" MUST follow these rules to ensure no namespace clash
- * occurs:
+ * The provider and name should be a proper C99 identifier.
+ * The "provider" and "name" MUST follow these rules to ensure no
+ * namespace clash occurs:
  *
  * For projects (applications and libraries) for which an entity
  * specific to the project controls the source code and thus its
  * tracepoints (typically with a scope larger than a single company):
  *
  * either:
- *   project_component_event
+ *   project_componentevent
  * or:
- *   project_event
+ *   projectevent
  *
  * Where "project" is the name of the project,
  *       "component" is the name of the project component (which may
@@ -260,9 +262,9 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  * "com_" prefix should be used:
  *
  * either:
- *   com_company_project_component_event
+ *   com_company_project_componentevent
  * or:
- *   com_company_project_event
+ *   com_company_projectevent
  *
  * Where "company" is the name of the company,
  *       "project" is the name of the project,
@@ -272,11 +274,13 @@ 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.
  *
  * As an example, let's consider a user-space application "someproject"
  * that would have an internal thread scheduler:
  *
- *  TRACEPOINT_EVENT(someproject_sched_switch,
+ *  TRACEPOINT_EVENT(someproject_schedswitch,
  *
  *     *
  *     * A function has a regular function arguments
@@ -340,22 +344,22 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  * usage of other macros controlling TRACEPOINT_EVENT.
  */
 
-#define TRACEPOINT_EVENT(name, proto, args, fields)                    \
-       _DECLARE_TRACEPOINT(name, TP_PARAMS(proto), TP_PARAMS(args))
+#define TRACEPOINT_EVENT(provider, name, proto, args, fields)          \
+       _DECLARE_TRACEPOINT(provider, name, TP_PARAMS(proto), TP_PARAMS(args))
 
-#define TRACEPOINT_EVENT_CLASS(name, proto, args, fields)
-#define TRACEPOINT_EVENT_INSTANCE(template, name, proto, args)         \
-       _DECLARE_TRACEPOINT(name, TP_PARAMS(proto), TP_PARAMS(args))
+#define TRACEPOINT_EVENT_CLASS(provider, name, proto, args, fields)
+#define TRACEPOINT_EVENT_INSTANCE(provider, template, name, proto, args)\
+       _DECLARE_TRACEPOINT(provider, name, TP_PARAMS(proto), TP_PARAMS(args))
 
 /*
  * Declaration of tracepoints that take 0 argument.
  */
-#define TRACEPOINT_EVENT_NOARGS(name, fields)                          \
-       _DECLARE_TRACEPOINT_NOARGS(name)
+#define TRACEPOINT_EVENT_NOARGS(provider, name, fields)                        \
+       _DECLARE_TRACEPOINT_NOARGS(provider, name)
 
-#define TRACEPOINT_EVENT_CLASS_NOARGS(name, fields)
-#define TRACEPOINT_EVENT_INSTANCE_NOARGS(template, name)               \
-       _DECLARE_TRACEPOINT_NOARGS(name)
+#define TRACEPOINT_EVENT_CLASS_NOARGS(provider, name, fields)
+#define TRACEPOINT_EVENT_INSTANCE_NOARGS(provider, template, name)     \
+       _DECLARE_TRACEPOINT_NOARGS(provider, name)
 
 #endif /* #ifndef TRACEPOINT_EVENT */
 
@@ -401,7 +405,7 @@ static void __attribute__((destructor)) __tracepoints__destroy(void)
  *    is the name of the tracepoint, the second field is the loglevel
  *    name.
  *
- *      TRACEPOINT_LOGLEVEL(< [com_company_]project_[component_]event >,
+ *      TRACEPOINT_LOGLEVEL(< [com_company_]project[_component] >, < event >,
  *              < loglevel_name >)
  *
  * The TRACEPOINT_SYSTEM must be defined when declaring a
index 9485ee0eb467f1dba1c8896872bbaa87d9ab1f90..43044ac9020b001601381070be12b65b01082558 100644 (file)
 #define TP_FIELDS(args...)
 
 #undef TRACEPOINT_EVENT_CLASS
-#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields)
+#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields)
 
 #undef TRACEPOINT_EVENT_CLASS_NOARGS
-#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields)
+#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields)
 
 #undef TRACEPOINT_EVENT_INSTANCE
-#define TRACEPOINT_EVENT_INSTANCE(_template, _name, _proto, _args)
+#define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _proto, _args)
 
 #undef TRACEPOINT_EVENT_INSTANCE_NOARGS
-#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name)
+#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_provider, _template, _name)
index b9abbd31fab08fc66f8cb08df417b44e0ab78ebf..90e58e09319674ddd62b82d1c44e4bb516b9d216 100644 (file)
  */
 
 #undef TRACEPOINT_EVENT
-#define TRACEPOINT_EVENT(name, proto, args, fields)    \
-       TRACEPOINT_EVENT_CLASS(name,                    \
+#define TRACEPOINT_EVENT(provider, name, proto, args, fields)  \
+       TRACEPOINT_EVENT_CLASS(provider, name,          \
                             TP_PARAMS(proto),          \
                             TP_PARAMS(args),           \
                             TP_PARAMS(fields))         \
-       TRACEPOINT_EVENT_INSTANCE(name, name, TP_PARAMS(proto), TP_PARAMS(args))
+       TRACEPOINT_EVENT_INSTANCE(provider, name, name, TP_PARAMS(proto), TP_PARAMS(args))
 
 #undef TRACEPOINT_EVENT_NOARGS
-#define TRACEPOINT_EVENT_NOARGS(name, fields)          \
-       TRACEPOINT_EVENT_CLASS_NOARGS(name,             \
+#define TRACEPOINT_EVENT_NOARGS(provider, name, fields)        \
+       TRACEPOINT_EVENT_CLASS_NOARGS(provider, name,   \
                             TP_PARAMS(fields))         \
-       TRACEPOINT_EVENT_INSTANCE_NOARGS(name, name)
+       TRACEPOINT_EVENT_INSTANCE_NOARGS(provider, name, name)
 
 /* Helpers */
 #define _TP_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 #define TP_FIELDS(args...) args        /* Only one used in this phase */
 
 #undef TRACEPOINT_EVENT_CLASS_NOARGS
-#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields)                       \
-       static const struct lttng_event_field __event_fields___##_name[] = { \
+#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields)                            \
+       static const struct lttng_event_field __event_fields___##_provider##___##_name[] = { \
                _fields                                                      \
        };
 
 #undef TRACEPOINT_EVENT_CLASS
-#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields)               \
-       TRACEPOINT_EVENT_CLASS_NOARGS(_name, TP_PARAMS(_fields))
+#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields)                    \
+       TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, TP_PARAMS(_fields))
 
 #include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE)
 
 #define TP_PROTO(args...) args
 
 #undef TRACEPOINT_EVENT_CLASS
-#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields)               \
-static void __event_probe__##_name(void *__data, _proto);
+#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields)                    \
+static void __event_probe__##_provider##___##_name(void *__data, _proto);
 
 #undef TRACEPOINT_EVENT_CLASS_NOARGS
-#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields)                       \
-static void __event_probe__##_name(void *__data);
+#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields)                            \
+static void __event_probe__##_provider##___##_name(void *__data);
 
 #include TRACEPOINT_INCLUDE(TRACEPOINT_INCLUDE_FILE)
 
@@ -214,17 +214,17 @@ static void __event_probe__##_name(void *__data);
 #include <lttng/ust-tracepoint-event-reset.h>
 
 #undef TRACEPOINT_EVENT_INSTANCE_NOARGS
-#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name)                    \
+#define TRACEPOINT_EVENT_INSTANCE_NOARGS(_provider, _template, _name)         \
                {                                                              \
-                       .fields = __event_fields___##_template,                \
-                       .name = #_name,                                        \
-                       .probe_callback = (void *) &__event_probe__##_template,\
-                       .nr_fields = _TP_ARRAY_SIZE(__event_fields___##_template), \
+                       .fields = __event_fields___##_provider##___##_template,\
+                       .name = #_provider ":" #_name,                         \
+                       .probe_callback = (void *) &__event_probe__##_provider##___##_template,\
+                       .nr_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_template), \
                },
 
 #undef TRACEPOINT_EVENT_INSTANCE
-#define TRACEPOINT_EVENT_INSTANCE(_template, _name, _proto, _args)            \
-       TRACEPOINT_EVENT_INSTANCE_NOARGS(_template, _name)
+#define TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _proto, _args)         \
+       TRACEPOINT_EVENT_INSTANCE_NOARGS(_provider, _template, _name)
 
 #define TP_ID1(_token, _system)        _token##_system
 #define TP_ID(_token, _system) TP_ID1(_token, _system)
@@ -300,8 +300,8 @@ static struct lttng_probe_desc TP_ID(__probe_desc___, TRACEPOINT_SYSTEM) = {
 #define TP_FIELDS(args...) args
 
 #undef TRACEPOINT_EVENT_CLASS
-#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields)                \
-static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
+#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields)      \
+static inline size_t __event_get_size__##_provider##___##_name(size_t *__dynamic_len, _proto) \
 {                                                                            \
        size_t __event_len = 0;                                               \
        unsigned int __dynamic_len_idx = 0;                                   \
@@ -351,8 +351,8 @@ static inline size_t __event_get_size__##_name(size_t *__dynamic_len, _proto) \
 #define TP_FIELDS(args...) args
 
 #undef TRACEPOINT_EVENT_CLASS
-#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields)                \
-static inline size_t __event_get_align__##_name(_proto)                              \
+#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields)      \
+static inline size_t __event_get_align__##_provider##___##_name(_proto)              \
 {                                                                            \
        size_t __event_align = 1;                                             \
        _fields                                                               \
@@ -428,15 +428,15 @@ static inline size_t __event_get_align__##_name(_proto)                         \
 #define TP_FIELDS(args...) args
 
 #undef TRACEPOINT_EVENT_CLASS
-#define TRACEPOINT_EVENT_CLASS(_name, _proto, _args, _fields)                \
-static void __event_probe__##_name(void *__data, _proto)                     \
+#define TRACEPOINT_EVENT_CLASS(_provider, _name, _proto, _args, _fields)      \
+static void __event_probe__##_provider##___##_name(void *__data, _proto)      \
 {                                                                            \
        struct ltt_event *__event = __data;                                   \
        struct ltt_channel *__chan = __event->chan;                           \
        struct lttng_ust_lib_ring_buffer_ctx __ctx;                                   \
        size_t __event_len, __event_align;                                    \
        size_t __dynamic_len_idx = 0;                                         \
-       size_t __dynamic_len[_TP_ARRAY_SIZE(__event_fields___##_name)];       \
+       size_t __dynamic_len[_TP_ARRAY_SIZE(__event_fields___##_provider##___##_name)];       \
        int __ret;                                                            \
                                                                              \
        if (0)                                                                \
@@ -447,8 +447,8 @@ static void __event_probe__##_name(void *__data, _proto)                  \
                return;                                                       \
        if (caa_unlikely(!CMM_ACCESS_ONCE(__event->enabled)))                 \
                return;                                                       \
-       __event_len = __event_get_size__##_name(__dynamic_len, _args);        \
-       __event_align = __event_get_align__##_name(_args);                    \
+       __event_len = __event_get_size__##_provider##___##_name(__dynamic_len, _args);        \
+       __event_align = __event_get_align__##_provider##___##_name(_args);                    \
        lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len,  \
                                 __event_align, -1, __chan->handle);          \
        __ret = __chan->ops->event_reserve(&__ctx, __event->id);              \
@@ -459,8 +459,8 @@ static void __event_probe__##_name(void *__data, _proto)                  \
 }
 
 #undef TRACEPOINT_EVENT_CLASS_NOARGS
-#define TRACEPOINT_EVENT_CLASS_NOARGS(_name, _fields)                        \
-static void __event_probe__##_name(void *__data)                             \
+#define TRACEPOINT_EVENT_CLASS_NOARGS(_provider, _name, _fields)             \
+static void __event_probe__##_provider##___##_name(void *__data)             \
 {                                                                            \
        struct ltt_event *__event = __data;                                   \
        struct ltt_channel *__chan = __event->chan;                           \
index 4c41531a6519c05d1373c53c43de738bbc98b952..18b257b3938aef4532603ad3acdfae358c9eece4 100644 (file)
@@ -718,7 +718,7 @@ int _ltt_event_metadata_statedump(struct ltt_session *session,
 
        ret = lttng_metadata_printf(session,
                "event {\n"
-               "       name = %s;\n"
+               "       name = \"%s\";\n"
                "       id = %u;\n"
                "       stream_id = %u;\n",
                event->desc->name,
index 3394d086d59b7bee7504f397700d8212f69a2933..8835dba67e2e29ce6347d558e47903418a9e107a 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <lttng/tracepoint.h>
 
-TRACEPOINT_EVENT(lttng_metadata,
+TRACEPOINT_EVENT(lttngmetadata,
 
        TP_PROTO(const char *str),
 
index 17162574195a9f89853ea35f7138cc61b5df0536..f15a692535d165a1d0ecb7c914e3f18b5d3e7120 100644 (file)
@@ -35,7 +35,7 @@ int main(int argc, char **argv, char *env[])
        }
 
        printf("Fork test program, parent pid is %d\n", getpid());
-       tracepoint(ust_tests_fork_before_fork);
+       tracepoint(ust_tests_forkbefore_fork);
 
        result = fork();
        if (result == -1) {
@@ -47,7 +47,7 @@ int main(int argc, char **argv, char *env[])
 
                printf("Child pid is %d\n", getpid());
 
-               tracepoint(ust_tests_fork_after_fork_child, getpid());
+               tracepoint(ust_tests_forkafter_fork_child, getpid());
 
                result = execve(argv[1], args, env);
                if (result == -1) {
@@ -55,7 +55,7 @@ int main(int argc, char **argv, char *env[])
                        return 1;
                }
        } else {
-               tracepoint(ust_tests_fork_after_fork_parent);
+               tracepoint(ust_tests_forkafter_fork_parent);
        }
 
        return 0;
index 187b7a1cecd50f66c56d7f450dc6c8ae2a377834..5727f3f4751cd83112eb1e2a482e0fa8dbcc1820 100644 (file)
@@ -25,7 +25,7 @@ int main()
 {
        printf("IN FORK2\n");
 
-       tracepoint(ust_tests_fork_after_exec);
+       tracepoint(ust_tests_forkafter_exec);
 
        return 0;
 }
index 27e6b47e737ad9fb939f5708d6fb5b56a17f2656..4bd105bddd790b93aafdb6e0d5b176a80fe072b5 100644 (file)
 #include <lttng/tracepoint.h>
 #include <sys/types.h>
 
-TRACEPOINT_EVENT_NOARGS(ust_tests_fork_before_fork,
+TRACEPOINT_EVENT_NOARGS(ust_tests_forkbefore_fork,
        TP_FIELDS()
 )
 
-TRACEPOINT_EVENT(ust_tests_fork_after_fork_child,
+TRACEPOINT_EVENT(ust_tests_forkafter_fork_child,
        TP_PROTO(pid_t pid),
        TP_ARGS(pid),
        TP_FIELDS(
@@ -37,11 +37,11 @@ TRACEPOINT_EVENT(ust_tests_fork_after_fork_child,
        )
 )
 
-TRACEPOINT_EVENT_NOARGS(ust_tests_fork_after_fork_parent,
+TRACEPOINT_EVENT_NOARGS(ust_tests_forkafter_fork_parent,
        TP_FIELDS()
 )
 
-TRACEPOINT_EVENT_NOARGS(ust_tests_fork_after_exec,
+TRACEPOINT_EVENT_NOARGS(ust_tests_forkafter_exec,
        TP_FIELDS()
 )
 
index 661ed40862dcb3ea5811a8d455703ad042f40566..cc23a577de3bf32a153fac9ebf053839a12ee22d 100644 (file)
@@ -33,7 +33,7 @@
 void inthandler(int sig)
 {
        printf("in SIGUSR1 handler\n");
-       tracepoint(ust_tests_hello_tptest_sighandler);
+       tracepoint(ust_tests_hellotptest_sighandler);
 }
 
 int init_int_handler(void)
@@ -80,7 +80,7 @@ int main(int argc, char **argv)
        //for (i = 0; i < 50; i++) {
        for (i = 0; i < 1000000; i++) {
                netint = htonl(i);
-               tracepoint(ust_tests_hello_tptest, i, netint, values,
+               tracepoint(ust_tests_hellotptest, i, netint, values,
                           text, strlen(text), dbl, flt);
                //usleep(100000);
        }
index 5ad67f48076aa851233b670523de5728e11e2cca..40f2cc19b966fdaccaf2159c0d57a9ff63ca89ed 100644 (file)
@@ -28,7 +28,7 @@ extern "C" {
 
 #include <lttng/tracepoint.h>
 
-TRACEPOINT_EVENT(ust_tests_hello_tptest,
+TRACEPOINT_EVENT(ust_tests_hellotptest,
        TP_PROTO(int anint, int netint, long *values,
                 char *text, size_t textlen,
                 double doublearg, float floatarg),
@@ -52,7 +52,7 @@ TRACEPOINT_EVENT(ust_tests_hello_tptest,
        )
 )
 
-TRACEPOINT_EVENT_NOARGS(ust_tests_hello_tptest_sighandler,
+TRACEPOINT_EVENT_NOARGS(ust_tests_hellotptest_sighandler,
        TP_FIELDS()
 )
 
This page took 0.040359 seconds and 4 git commands to generate.