From: David Goulet Date: Wed, 27 Jul 2011 20:15:24 +0000 (-0400) Subject: Add event count in channel structure X-Git-Tag: v2.0-pre4~2 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;ds=sidebyside;h=cbbbb2757f90ecfc8bc2f51ba5bad8ed614577bb;p=lttng-tools.git Add event count in channel structure Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/kernel-ctl.c b/ltt-sessiond/kernel-ctl.c index 1af82d9de..ef3afb714 100644 --- a/ltt-sessiond/kernel-ctl.c +++ b/ltt-sessiond/kernel-ctl.c @@ -209,6 +209,8 @@ int kernel_create_event(struct lttng_event *ev, struct ltt_kernel_channel *chann /* Add event to event list */ cds_list_add(&event->list, &channel->events_list.head); + channel->event_count++; + DBG("Event %s created (fd: %d)", ev->name, event->fd); return 0; diff --git a/ltt-sessiond/trace.c b/ltt-sessiond/trace.c index 1509edacd..41c4355e9 100644 --- a/ltt-sessiond/trace.c +++ b/ltt-sessiond/trace.c @@ -138,6 +138,7 @@ struct ltt_kernel_channel *trace_create_kernel_channel(struct lttng_channel *cha lkc->fd = 0; lkc->stream_count = 0; + lkc->event_count = 0; lkc->enabled = 1; lkc->ctx = NULL; /* Init linked list */ diff --git a/ltt-sessiond/trace.h b/ltt-sessiond/trace.h index 29e1b92aa..3b86160f8 100644 --- a/ltt-sessiond/trace.h +++ b/ltt-sessiond/trace.h @@ -56,6 +56,7 @@ struct ltt_kernel_channel { int enabled; char *pathname; unsigned int stream_count; + unsigned int event_count; struct lttng_kernel_context *ctx; struct lttng_channel *channel; struct ltt_kernel_event_list events_list;