X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust%2Flttng-ring-buffer-client.h;h=97e1f4406100cc9a954c638de4cff5f8558cca20;hb=5c2ca473edb213ccc8644bc71716aeaa799fda8c;hp=07dc4700afdd842066a03ccd41c460db1f7f949a;hpb=1ff31389b273bb27a619a794ce414c65e73cb6ea;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ring-buffer-client.h b/liblttng-ust/lttng-ring-buffer-client.h index 07dc4700..97e1f440 100644 --- a/liblttng-ust/lttng-ring-buffer-client.h +++ b/liblttng-ust/lttng-ring-buffer-client.h @@ -157,8 +157,8 @@ size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config, padding = 0; WARN_ON_ONCE(1); } - offset += ctx_get_size(offset, event->ctx); offset += ctx_get_size(offset, lttng_chan->ctx); + offset += ctx_get_size(offset, event->ctx); *pre_header_padding = padding; return offset - orig_offset; @@ -520,6 +520,17 @@ static int client_sequence_number(struct lttng_ust_lib_ring_buffer *buf, return 0; } +static int client_instance_id(struct lttng_ust_lib_ring_buffer *buf, + struct lttng_ust_shm_handle *handle, + uint64_t *id) +{ + struct packet_header *header; + + header = client_packet_header(buf, handle); + *id = header->stream_instance_id; + return 0; +} + static const struct lttng_ust_client_lib_ring_buffer_client_cb client_cb = { .parent = { @@ -541,6 +552,7 @@ struct lttng_ust_client_lib_ring_buffer_client_cb client_cb = { .stream_id = client_stream_id, .current_timestamp = client_current_timestamp, .sequence_number = client_sequence_number, + .instance_id = client_instance_id, }; static const struct lttng_ust_lib_ring_buffer_config client_config = {