From: Jérémie Galarneau Date: Tue, 11 Jun 2019 22:34:32 +0000 (-0400) Subject: Fix: Don't print ring-buffer's records count when it is not used X-Git-Tag: v2.12.0-pre~39 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=97df3a7fbf6c344169344bada5f0b484c239729e;hp=97df3a7fbf6c344169344bada5f0b484c239729e;p=lttng-modules.git 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 Signed-off-by: Mathieu Desnoyers ---