Add event count in channel structure
authorDavid Goulet <david.goulet@polymtl.ca>
Wed, 27 Jul 2011 20:15:24 +0000 (16:15 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Wed, 27 Jul 2011 20:16:31 +0000 (16:16 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/kernel-ctl.c
ltt-sessiond/trace.c
ltt-sessiond/trace.h

index 1af82d9de3086ec0343158d5f6f9d9e1ce731c49..ef3afb714bf1bebe6b96376f484f15044f2e4555 100644 (file)
@@ -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);
 
        /* 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;
        DBG("Event %s created (fd: %d)", ev->name, event->fd);
 
        return 0;
index 1509edacdf048e92fef749cad90ac8c30e09af7a..41c4355e939fa67e4c8a7f8b2c4d660e4fc0e6ff 100644 (file)
@@ -138,6 +138,7 @@ struct ltt_kernel_channel *trace_create_kernel_channel(struct lttng_channel *cha
 
        lkc->fd = 0;
        lkc->stream_count = 0;
 
        lkc->fd = 0;
        lkc->stream_count = 0;
+       lkc->event_count = 0;
        lkc->enabled = 1;
        lkc->ctx = NULL;
        /* Init linked list */
        lkc->enabled = 1;
        lkc->ctx = NULL;
        /* Init linked list */
index 29e1b92aa23899708e60c8185d074db93e3a2f84..3b86160f8f2d73c226f3f16d9586513421e36fcf 100644 (file)
@@ -56,6 +56,7 @@ struct ltt_kernel_channel {
        int enabled;
        char *pathname;
        unsigned int stream_count;
        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;
        struct lttng_kernel_context *ctx;
        struct lttng_channel *channel;
        struct ltt_kernel_event_list events_list;
This page took 0.028939 seconds and 5 git commands to generate.