Allow events with same name to be enabled for each channel
[lttng-modules.git] / 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.022671 seconds and 4 git commands to generate.