X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Fltt-ring-buffer-client.h;h=0b6cd3e4536935f90bd183d006bdc6184cb4f95b;hb=bf956ec0051ba7f365693e194bc0aeaf4343a82c;hp=e041803c34705813e59ab43e0fbe09ca97f34bb1;hpb=e92f3e285939848f248af08f11a39a04a7fcf852;p=lttng-ust.git diff --git a/liblttng-ust/ltt-ring-buffer-client.h b/liblttng-ust/ltt-ring-buffer-client.h index e041803c..0b6cd3e4 100644 --- a/liblttng-ust/ltt-ring-buffer-client.h +++ b/liblttng-ust/ltt-ring-buffer-client.h @@ -24,6 +24,7 @@ #include #include "lttng/bitfield.h" #include "clock.h" +#include "lttng-ust-uuid.h" #include "ltt-tracer.h" #include "../libringbuffer/frontend_types.h" @@ -43,14 +44,14 @@ struct packet_header { * Trace magic number. * contains endianness information. */ - uint8_t uuid[16]; + uint8_t uuid[LTTNG_UST_UUID_LEN]; uint32_t stream_id; struct { /* Stream packet context */ uint64_t timestamp_begin; /* Cycle count at subbuffer start */ uint64_t timestamp_end; /* Cycle count at subbuffer end */ - uint32_t events_discarded; /* + unsigned long events_discarded; /* * Events lost in this subbuffer since * the beginning of the trace. * (may overflow) @@ -366,11 +367,8 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts header->ctx.timestamp_end = tsc; header->ctx.content_size = data_size * CHAR_BIT; /* in bits */ header->ctx.packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */ - /* - * We do not care about the records lost count, because the metadata - * channel waits and retry. - */ - (void) lib_ring_buffer_get_records_lost_full(&client_config, buf); + + records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf); header->ctx.events_discarded = records_lost;