Add filter sequence number to UST
authorDavid Goulet <dgoulet@efficios.com>
Fri, 16 Nov 2012 20:14:47 +0000 (15:14 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 19 Nov 2012 16:30:47 +0000 (11:30 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/filter.c
src/bin/lttng-sessiond/trace-ust.h
src/common/sessiond-comm/sessiond-comm.h

index e887533050f8a5f298bbcd7944f63fac59eef416..688dfca4a889cf95eecb7107053dcb9d28386c45 100644 (file)
@@ -46,6 +46,7 @@ static int add_ufilter_to_event(struct ltt_ust_session *usess, int domain,
        }
        /* Same layout. */
        uevent->filter = (struct lttng_ust_filter_bytecode *) bytecode;
+       uevent->filter->seqnum = usess->filter_seq_num;
 
        switch (domain) {
        case LTTNG_DOMAIN_UST:
@@ -54,6 +55,7 @@ static int add_ufilter_to_event(struct ltt_ust_session *usess, int domain,
                if (ret < 0) {
                        goto error;
                }
+               usess->filter_seq_num++;
                break;
        default:
                ret = -ENOSYS;
index f01f82d7dfdee36c9067a336b8e1c7a0e2352906..b0a65cf191c5b9624d24e354b98d900c373ef7fe 100644 (file)
@@ -124,6 +124,8 @@ struct ltt_ust_session {
         */
        struct consumer_output *consumer;
        struct consumer_output *tmp_consumer;
+       /* Sequence number for filters so the tracer knows the ordering. */
+       uint64_t filter_seq_num;
 };
 
 #ifdef HAVE_LIBLTTNG_UST_CTL
index e69c32bb2dfc80392a17532592057008535e3a44..5c030a97ef94bb42c2a572856f22735ac12e8adf 100644 (file)
@@ -222,6 +222,7 @@ struct lttcomm_session_msg {
 struct lttng_filter_bytecode {
        uint32_t len;   /* len of data */
        uint32_t reloc_table_offset;
+       uint64_t seqnum;
        char data[0];
 };
 
This page took 0.026783 seconds and 4 git commands to generate.