2 #define TRACE_SYSTEM printk
4 #if !defined(LTTNG_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define LTTNG_TRACE_PRINTK_H
7 #include <probes/lttng-tracepoint-event.h>
8 #include <linux/version.h>
10 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
12 LTTNG_TRACEPOINT_EVENT_MAP(console
,
16 TP_PROTO(const char *text
, size_t len
),
21 ctf_sequence_text(char, msg
, text
, size_t, len
)
25 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
27 LTTNG_TRACEPOINT_EVENT_MAP(console
,
31 TP_PROTO(const char *log_buf
, unsigned start
, unsigned end
,
32 unsigned log_buf_len
),
34 TP_ARGS(log_buf
, start
, end
, log_buf_len
),
37 ctf_sequence_text(char, msg
, log_buf
+ start
,
42 #else /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
44 LTTNG_TRACEPOINT_EVENT_MAP(console
,
48 TP_PROTO(const char *log_buf
, unsigned start
, unsigned end
,
49 unsigned log_buf_len
),
51 TP_ARGS(log_buf
, start
, end
, log_buf_len
),
55 * printk buffer is gathered from two segments on older kernels.
57 ctf_sequence_text(char, msg1
,
58 log_buf
+ (start
& (log_buf_len
- 1)),
59 size_t, (start
& (log_buf_len
- 1)) > (end
& (log_buf_len
- 1))
60 ? log_buf_len
- (start
& (log_buf_len
- 1))
62 ctf_sequence_text(char, msg2
,
64 size_t, (start
& (log_buf_len
- 1)) > (end
& (log_buf_len
- 1))
65 ? end
& (log_buf_len
- 1)
72 #endif /* LTTNG_TRACE_PRINTK_H */
74 /* This part must be outside protection */
75 #include <probes/define_trace.h>
This page took 0.030061 seconds and 4 git commands to generate.