X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fprintk.h;h=26b04a95025b4a1c32a871eb2e88170780424423;hb=369708f464bedc0682151df9308cebfa14dbdb2b;hp=77fe081b36e835ff26ac6a92afc26bce3fbcecef;hpb=f127e61ee231d002fb9a7803643a157e06f6d2e2;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/printk.h b/instrumentation/events/lttng-module/printk.h index 77fe081b..26b04a95 100644 --- a/instrumentation/events/lttng-module/printk.h +++ b/instrumentation/events/lttng-module/printk.h @@ -1,13 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #undef TRACE_SYSTEM #define TRACE_SYSTEM printk #if !defined(LTTNG_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_PRINTK_H -#include "../../../probes/lttng-tracepoint-event.h" -#include - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) +#include LTTNG_TRACEPOINT_EVENT_MAP(console, @@ -22,58 +20,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(console, ) ) -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)) - -LTTNG_TRACEPOINT_EVENT_CONDITION_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_CONDITION(start != end), - - TP_FIELDS( - ctf_sequence_text(char, msg, log_buf + start, - size_t, end - start) - ) -) - -#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */ - -LTTNG_TRACEPOINT_EVENT_CONDITION_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_CONDITION(start != end), - - 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 */ -#include "../../../probes/define_trace.h" +#include