Revert "microblaze_mmu_v2: Update signal returning address"
[linux/fpc-iii.git] / include / trace / events / printk.h
blob94ec79cc011ae76bd77f5f2adb40ff09343f1cdb
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM printk
4 #if !defined(_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_PRINTK_H
7 #include <linux/tracepoint.h>
9 TRACE_EVENT_CONDITION(console,
10 TP_PROTO(const char *log_buf, unsigned start, unsigned end,
11 unsigned log_buf_len),
13 TP_ARGS(log_buf, start, end, log_buf_len),
15 TP_CONDITION(start != end),
17 TP_STRUCT__entry(
18 __dynamic_array(char, msg, end - start + 1)
21 TP_fast_assign(
22 if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) {
23 memcpy(__get_dynamic_array(msg),
24 log_buf + (start & (log_buf_len - 1)),
25 log_buf_len - (start & (log_buf_len - 1)));
26 memcpy((char *)__get_dynamic_array(msg) +
27 log_buf_len - (start & (log_buf_len - 1)),
28 log_buf, end & (log_buf_len - 1));
29 } else
30 memcpy(__get_dynamic_array(msg),
31 log_buf + (start & (log_buf_len - 1)),
32 end - start);
33 ((char *)__get_dynamic_array(msg))[end - start] = 0;
36 TP_printk("%s", __get_str(msg))
38 #endif /* _TRACE_PRINTK_H */
40 /* This part must be outside protection */
41 #include <trace/define_trace.h>