Allow events with same name to be enabled for each channel
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 12 Sep 2014 18:39:50 +0000 (14:39 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Sep 2014 16:10:00 +0000 (12:10 -0400)
Before, we refused to enable an event with the same name in two
different channels at the same time within a session.

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

index b2d0d754907d863903566921d0ac3521619978df..135c8c527123acd43266c7191148d9bc314121a8 100644 (file)
@@ -379,8 +379,14 @@ struct lttng_event *lttng_event_create(struct lttng_channel *chan,
         */
        list_for_each_entry(event, &chan->session->events, list) {
                if (!strcmp(event->desc->name, event_param->name)) {
-                       ret = -EEXIST;
-                       goto exist;
+                       /*
+                        * Allow events with the same name to appear in
+                        * different channels.
+                        */
+                       if (event->chan == chan) {
+                               ret = -EEXIST;
+                               goto exist;
+                       }
                }
        }
        event = kmem_cache_zalloc(event_cache, GFP_KERNEL);
This page took 0.025972 seconds and 4 git commands to generate.