Drop support for kernels < 4.4 from printk instrumentation
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 21 Nov 2022 17:03:16 +0000 (12:03 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 23 Nov 2022 20:06:55 +0000 (15:06 -0500)
Change-Id: Ibb707f10a386fba1971081d380c46da247bf688f
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/instrumentation/events/printk.h

index 4e904b6f4b2495b7bdafdb7a7a5950fc6391d657..0c0b1b3866069667953d30de218dc5d3a1444864 100644 (file)
@@ -8,8 +8,6 @@
 #include <lttng/tracepoint-event.h>
 #include <lttng/kernel-version.h>
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,10,0))
-
 LTTNG_TRACEPOINT_EVENT_MAP(console,
 
        printk_console,
@@ -23,53 +21,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(console,
        )
 )
 
-#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(3,5,0))
-
-LTTNG_TRACEPOINT_EVENT_MAP(console,
-
-       printk_console,
-
-       TP_PROTO(const char *log_buf, unsigned start, unsigned end,
-                unsigned log_buf_len),
-
-       TP_ARGS(log_buf, start, end, log_buf_len),
-
-       TP_FIELDS(
-               ctf_sequence_text(char, msg, log_buf + start,
-                       size_t, end - start)
-       )
-)
-
-#else /* (LTTNG_LINUX_VERSION_CODE < LTTNG_KERNEL_VERSION(3,5,0)) */
-
-LTTNG_TRACEPOINT_EVENT_MAP(console,
-
-       printk_console,
-
-       TP_PROTO(const char *log_buf, unsigned start, unsigned end,
-                unsigned log_buf_len),
-
-       TP_ARGS(log_buf, start, end, log_buf_len),
-
-       TP_FIELDS(
-               /*
-                * printk buffer is gathered from two segments on older kernels.
-                */
-               ctf_sequence_text(char, msg1,
-                       log_buf + (start & (log_buf_len - 1)),
-                       size_t, (start & (log_buf_len - 1)) > (end & (log_buf_len - 1))
-                               ? log_buf_len - (start & (log_buf_len - 1))
-                               : end - start)
-               ctf_sequence_text(char, msg2,
-                       log_buf,
-                       size_t, (start & (log_buf_len - 1)) > (end & (log_buf_len - 1))
-                               ? end & (log_buf_len - 1)
-                               : 0)
-       )
-)
-
-#endif
-
 #endif /* LTTNG_TRACE_PRINTK_H */
 
 /* This part must be outside protection */
This page took 0.026938 seconds and 4 git commands to generate.