From: Julien Desfossez Date: Mon, 15 Jun 2015 15:04:58 +0000 (-0400) Subject: Add stream instance id to the packet header X-Git-Tag: v2.8.0-rc1~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2d94adc56c0a427629ddcf730218978a3bb66511;p=lttng-ust.git 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 --- 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 */