Tracepoint list ABI: fix initialization of anonymous file
[deliverable/lttng-modules.git] / ltt-events.c
index 46da159117bc27be766f1eebc97fac5f421e01d8..c08079b5840654f7977477c61f0c8a032f4ec08d 100644 (file)
@@ -170,6 +170,11 @@ struct ltt_channel *ltt_channel_create(struct ltt_session *session,
        chan->session = session;
        init_waitqueue_head(&chan->notify_wait);
        chan->id = session->free_chan_id++;
+       /*
+        * Note: the channel creation op already writes into the packet
+        * headers. Therefore the "chan" information used as input
+        * should be already accessible.
+        */
        chan->chan = transport->ops.channel_create("[lttng]", chan, buf_addr,
                        subbuf_size, num_subbuf, switch_timer_interval,
                        read_timer_interval);
@@ -230,7 +235,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan,
        /* Populate ltt_event structure before tracepoint registration. */
        smp_wmb();
        switch (event_param->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINTS:
+       case LTTNG_KERNEL_TRACEPOINT:
                event->desc = ltt_event_get(event_param->name);
                if (!event->desc)
                        goto register_error;
@@ -240,7 +245,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan,
                if (ret)
                        goto register_error;
                break;
-       case LTTNG_KERNEL_KPROBES:
+       case LTTNG_KERNEL_KPROBE:
                ret = lttng_kprobes_register(event_param->name,
                                event_param->u.kprobe.symbol_name,
                                event_param->u.kprobe.offset,
@@ -249,7 +254,7 @@ struct ltt_event *ltt_event_create(struct ltt_channel *chan,
                if (ret)
                        goto register_error;
                break;
-       case LTTNG_KERNEL_FUNCTION_TRACER:
+       case LTTNG_KERNEL_FUNCTION:
                ret = lttng_ftrace_register(event_param->name,
                                event_param->u.ftrace.symbol_name,
                                event);
@@ -288,7 +293,7 @@ int _ltt_event_unregister(struct ltt_event *event)
        int ret = -EINVAL;
 
        switch (event->instrumentation) {
-       case LTTNG_KERNEL_TRACEPOINTS:
+       case LTTNG_KERNEL_TRACEPOINT:
                ret = tracepoint_probe_unregister(event->desc->name,
                                                  event->desc->probe_callback,
                                                  event);
@@ -296,11 +301,11 @@ int _ltt_event_unregister(struct ltt_event *event)
                        return ret;
                ltt_event_put(event->desc);
                break;
-       case LTTNG_KERNEL_KPROBES:
+       case LTTNG_KERNEL_KPROBE:
                lttng_kprobes_unregister(event);
                ret = 0;
                break;
-       case LTTNG_KERNEL_FUNCTION_TRACER:
+       case LTTNG_KERNEL_FUNCTION:
                lttng_ftrace_unregister(event);
                ret = 0;
                break;
This page took 0.0248 seconds and 5 git commands to generate.