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_CONDITION_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
),
36 TP_CONDITION(start
!= end
),
39 ctf_sequence_text(char, msg
, log_buf
+ start
,
44 #else /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) */
46 LTTNG_TRACEPOINT_EVENT_CONDITION_MAP(console
,
50 TP_PROTO(const char *log_buf
, unsigned start
, unsigned end
,
51 unsigned log_buf_len
),
53 TP_ARGS(log_buf
, start
, end
, log_buf_len
),
55 TP_CONDITION(start
!= end
),
59 * printk buffer is gathered from two segments on older kernels.
61 ctf_sequence_text(char, msg1
,
62 log_buf
+ (start
& (log_buf_len
- 1)),
63 size_t, (start
& (log_buf_len
- 1)) > (end
& (log_buf_len
- 1))
64 ? log_buf_len
- (start
& (log_buf_len
- 1))
66 ctf_sequence_text(char, msg2
,
68 size_t, (start
& (log_buf_len
- 1)) > (end
& (log_buf_len
- 1))
69 ? end
& (log_buf_len
- 1)
76 #endif /* LTTNG_TRACE_PRINTK_H */
78 /* This part must be outside protection */
79 #include "../../../probes/define_trace.h"
This page took 0.034329 seconds and 4 git commands to generate.