From: Mathieu Desnoyers Date: Fri, 24 Feb 2012 00:08:51 +0000 (-0500) Subject: Fix: add missing debug printout to identify the cause of lost events X-Git-Tag: v2.0.0-rc2~16 X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;h=c022630241628bd0233d3369ca3e418717fde89d;p=lttng-ust.git Fix: add missing debug printout to identify the cause of lost events Signed-off-by: Mathieu Desnoyers --- diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c index ca19648f..9d89c6fa 100644 --- a/libringbuffer/ring_buffer_frontend.c +++ b/libringbuffer/ring_buffer_frontend.c @@ -1341,6 +1341,7 @@ int lib_ring_buffer_try_reserve_slow(struct lttng_ust_lib_ring_buffer *buf, * and we are full : record is lost. */ v_inc(config, &buf->records_lost_full); + DBG("Record lost: buffer is full\n"); return -ENOBUFS; } else { /* @@ -1358,6 +1359,7 @@ int lib_ring_buffer_try_reserve_slow(struct lttng_ust_lib_ring_buffer *buf, * many nested writes over a reserve/commit pair. */ v_inc(config, &buf->records_lost_wrap); + DBG("Record lost: buffer wrap-around\n"); return -EIO; } offsets->size = @@ -1376,6 +1378,7 @@ int lib_ring_buffer_try_reserve_slow(struct lttng_ust_lib_ring_buffer *buf, * complete the sub-buffer switch. */ v_inc(config, &buf->records_lost_big); + DBG("Record lost: record size (%zu bytes) is too large for buffer\n", offsets->size); return -ENOSPC; } else { /*