Fix: Don't print ring-buffer's records count when it is not used
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 11 Jun 2019 22:34:32 +0000 (18:34 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 11 Jun 2019 22:42:58 +0000 (00:42 +0200)
commitbe2e095ccc66349ce2817d997fcafed5d1596a72
tree51f13b2d218efd8ad16274c0255f0f902d31e3ee
parent4fd3f042aeec90c27404bdeb8706923ebf1541ae
Fix: Don't print ring-buffer's records count when it is not used

The teardown of a ring buffer causes a number of diagnostic messages
to be printed using printk. One of those contains the "records
count", which is only updated when lttng-modules is built with
LTTNG_RING_BUFFER_COUNT_EVENTS defined.

Move the "records count" printing to a different function and stub it
out when LTTNG_RING_BUFFER_COUNT_EVENTS is not defined
(default configuration).

This eliminates messages of the following form from the dmesg output
when an LTTng session is torn down.

[...] ring buffer relay-discard, cpu 0: 0 records written, 0 records overrun

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/ring_buffer_frontend.c
This page took 0.025542 seconds and 4 git commands to generate.