X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fringbuffer-clients%2Ftemplate.h;h=824c344d5e7f4980f308774f77daee5f7cac7308;hb=f27b0770c5fe934bd90c4b20103c59f9e7f96a5b;hp=b0a5fdd7a0910d00d7f875397d6db3d1f9adb540;hpb=bee7cf7546038170e69c9d52e542643f773aa6b6;p=lttng-ust.git diff --git a/src/common/ringbuffer-clients/template.h b/src/common/ringbuffer-clients/template.h index b0a5fdd7..824c344d 100644 --- a/src/common/ringbuffer-clients/template.h +++ b/src/common/ringbuffer-clients/template.h @@ -399,7 +399,8 @@ static void client_buffer_begin(struct lttng_ust_ring_buffer *buf, uint64_t tsc, */ static void client_buffer_end(struct lttng_ust_ring_buffer *buf, uint64_t tsc, unsigned int subbuf_idx, unsigned long data_size, - struct lttng_ust_shm_handle *handle) + struct lttng_ust_shm_handle *handle, + const struct lttng_ust_ring_buffer_ctx *ctx) { struct lttng_ust_ring_buffer_channel *chan = shmp(handle, buf->backend.chan); struct packet_header *header = @@ -418,9 +419,9 @@ static void client_buffer_end(struct lttng_ust_ring_buffer *buf, uint64_t tsc, header->ctx.packet_size = (uint64_t) LTTNG_UST_PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */ - 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); + records_lost += lib_ring_buffer_get_records_lost_full(&client_config, ctx); + records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, ctx); + records_lost += lib_ring_buffer_get_records_lost_big(&client_config, ctx); header->ctx.events_discarded = records_lost; }