From 2d94adc56c0a427629ddcf730218978a3bb66511 Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Mon, 15 Jun 2015 11:04:58 -0400 Subject: [PATCH] Add stream instance id to the packet header This new field allows the viewer to distinguish between trace files belonging to the same packet stream (in LTTng: the same CPU in the same channel). This is a locked-step with the corresponding commit in lttng-tools. Signed-off-by: Julien Desfossez Acked-by: Mathieu.Desnoyers Signed-off-by: Mathieu Desnoyers --- liblttng-ust/lttng-ring-buffer-client.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index d219b79c..536a31a8 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -45,6 +45,7 @@ struct packet_header { */ uint8_t uuid[LTTNG_UST_UUID_LEN]; uint32_t stream_id; + uint64_t stream_instance_id; struct { /* Stream packet context */ @@ -345,6 +346,7 @@ static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t header->magic = CTF_MAGIC_NUMBER; memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid)); header->stream_id = lttng_chan->id; + header->stream_instance_id = buf->backend.cpu; header->ctx.timestamp_begin = tsc; header->ctx.timestamp_end = 0; header->ctx.content_size = ~0ULL; /* for debugging */ -- 2.34.1