From: David Goulet Date: Fri, 16 Nov 2012 20:14:47 +0000 (-0500) Subject: Add filter sequence number to UST X-Git-Tag: v2.1.0-rc8~8 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f3f0db50cf3fbc658bb4ffaf79a7fb694ab05e1d;p=lttng-tools.git Add filter sequence number to UST Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/filter.c b/src/bin/lttng-sessiond/filter.c index e88753305..688dfca4a 100644 --- a/src/bin/lttng-sessiond/filter.c +++ b/src/bin/lttng-sessiond/filter.c @@ -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; diff --git a/src/bin/lttng-sessiond/trace-ust.h b/src/bin/lttng-sessiond/trace-ust.h index f01f82d7d..b0a65cf19 100644 --- a/src/bin/lttng-sessiond/trace-ust.h +++ b/src/bin/lttng-sessiond/trace-ust.h @@ -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 diff --git a/src/common/sessiond-comm/sessiond-comm.h b/src/common/sessiond-comm/sessiond-comm.h index e69c32bb2..5c030a97e 100644 --- a/src/common/sessiond-comm/sessiond-comm.h +++ b/src/common/sessiond-comm/sessiond-comm.h @@ -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]; };