X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-kernel.c;h=ab3282a17f189b9c7b288fab65a5dd224f38fe2b;hb=d0ae4ea864f84fa2456563abb20fe42e5cc29625;hp=8e074fd91b0dcbe829f8c053d32ac6e92766d32c;hpb=645328ae989e5f50a3a49c1ac34b2fee287a3d7b;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 8e074fd91..ab3282a17 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -16,6 +16,7 @@ */ #define _GNU_SOURCE +#define _LGPL_SOURCE #include #include #include @@ -61,7 +62,8 @@ struct ltt_kernel_channel *trace_kernel_get_channel_by_name( * Find the event name for the given channel. */ struct ltt_kernel_event *trace_kernel_get_event_by_name( - char *name, struct ltt_kernel_channel *channel) + char *name, struct ltt_kernel_channel *channel, + enum lttng_event_type type) { struct ltt_kernel_event *ev; @@ -69,6 +71,8 @@ struct ltt_kernel_event *trace_kernel_get_event_by_name( assert(channel); cds_list_for_each_entry(ev, &channel->events_list.head, list) { + if (type != LTTNG_EVENT_ALL && ev->type != type) + continue; if (strcmp(name, ev->event->name) == 0) { DBG("Found event by name %s for channel %s", name, channel->channel->name); @@ -196,6 +200,8 @@ struct ltt_kernel_context *trace_kernel_create_context( memcpy(&kctx->ctx, ctx, sizeof(kctx->ctx)); } + CDS_INIT_LIST_HEAD(&kctx->list); + error: return kctx; }