Fix: tracepoint name remapping
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 25 Jan 2014 00:16:08 +0000 (19:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 25 Jan 2014 00:16:28 +0000 (19:16 -0500)
Commit

  "Introduce API to remap event names exposed by LTTng"

failed to map the event names enabled by the user to tracepoint names
known to the kernel. For instance, tracing with the kmem_kmalloc event
enabled is not gathering any event. This issue applies to all tracepoint
events declared with a different name within LTTng than within the Linux
kernel.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-events.c
lttng-events.h
probes/lttng-events.h

index 054489c7737eeef4065ba37be77eb104725db2f4..f47e9dcfcebbf9f62c488eac3b339e0d497c1499 100644 (file)
@@ -400,7 +400,7 @@ struct lttng_event *lttng_event_create(struct lttng_channel *chan,
                        ret = -ENOENT;
                        goto register_error;
                }
-               ret = kabi_2635_tracepoint_probe_register(event_param->name,
+               ret = kabi_2635_tracepoint_probe_register(event->desc->kname,
                                event->desc->probe_callback,
                                event);
                if (ret) {
index f0628c4cd7a9582e7f2a271c8ddd0b092edd7a54..6b39304f8d114e92387308cac22d74c72e0f5a98 100644 (file)
@@ -170,7 +170,8 @@ struct lttng_ctx {
 };
 
 struct lttng_event_desc {
-       const char *name;
+       const char *name;               /* lttng-modules name */
+       const char *kname;              /* Linux kernel name (tracepoints) */
        void *probe_callback;
        const struct lttng_event_ctx *ctx;      /* context */
        const struct lttng_event_field *fields; /* event payload */
index bf2e2b9d1df5364cc3213fc70345c38f21d7fd5a..680f466f9a2b40531e3214ef551d7296bf024ba1 100644 (file)
@@ -327,6 +327,7 @@ static void __event_probe__##_name(void *__data);
 static const struct lttng_event_desc __event_desc___##_map = {         \
        .fields = __event_fields___##_template,                         \
        .name = #_map,                                                  \
+       .kname = #_name,                                                \
        .probe_callback = (void *) TP_PROBE_CB(_template),              \
        .nr_fields = ARRAY_SIZE(__event_fields___##_template),          \
        .owner = THIS_MODULE,                                           \
This page took 0.027979 seconds and 4 git commands to generate.