From: Mathieu Desnoyers Date: Fri, 12 Sep 2014 18:39:50 +0000 (-0400) Subject: Allow events with same name to be enabled for each channel X-Git-Tag: v2.6.0-rc1~31 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f046a95d1c0f66297332962fb5fd1b715367b69d;p=lttng-modules.git Allow events with same name to be enabled for each channel 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 --- diff --git a/lttng-events.c b/lttng-events.c index b2d0d754..135c8c52 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -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);