From cbbbb2757f90ecfc8bc2f51ba5bad8ed614577bb Mon Sep 17 00:00:00 2001 From: David Goulet Date: Wed, 27 Jul 2011 16:15:24 -0400 Subject: [PATCH] Add event count in channel structure Signed-off-by: David Goulet --- ltt-sessiond/kernel-ctl.c | 2 ++ ltt-sessiond/trace.c | 1 + ltt-sessiond/trace.h | 1 + 3 files changed, 4 insertions(+) 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; -- 2.34.1