Fix: add missing debug printout to identify the cause of lost events
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Feb 2012 00:08:51 +0000 (19:08 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 24 Feb 2012 00:08:51 +0000 (19:08 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/ring_buffer_frontend.c

index ca19648f1d04f544d4f931bb29344fd3e43b65f4..9d89c6fa68a7117b06b1701f17d33b2b3762e308 100644 (file)
@@ -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 {
                        /*
This page took 0.025931 seconds and 4 git commands to generate.