2011-11-24 19:03:08 +00:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM printk
|
|
|
|
|
|
|
|
#if !defined(_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_PRINTK_H
|
|
|
|
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
2013-04-29 23:17:16 +00:00
|
|
|
TRACE_EVENT(console,
|
|
|
|
TP_PROTO(const char *text, size_t len),
|
2011-11-24 19:03:08 +00:00
|
|
|
|
2013-04-29 23:17:16 +00:00
|
|
|
TP_ARGS(text, len),
|
2011-11-24 19:03:08 +00:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2013-04-29 23:17:16 +00:00
|
|
|
__dynamic_array(char, msg, len + 1)
|
2011-11-24 19:03:08 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2016-07-01 23:44:36 +00:00
|
|
|
memcpy(__get_str(msg), text, len);
|
|
|
|
__get_str(msg)[len] = 0;
|
2011-11-24 19:03:08 +00:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s", __get_str(msg))
|
|
|
|
);
|
|
|
|
#endif /* _TRACE_PRINTK_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|