mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![zhangwei(Jovi)](/assets/img/avatar_default.png)
Commit 7ff9554bb5
("printk: convert byte-buffer to variable-length
record buffer") removed start and end parameters from
call_console_drivers, but those parameters still exist in
include/trace/events/printk.h.
Without start and end parameters handling, printk tracing became more
simple as: trace_console(text, len);
Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
28 lines
575 B
C
28 lines
575 B
C
#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>
|
|
|
|
TRACE_EVENT(console,
|
|
TP_PROTO(const char *text, size_t len),
|
|
|
|
TP_ARGS(text, len),
|
|
|
|
TP_STRUCT__entry(
|
|
__dynamic_array(char, msg, len + 1)
|
|
),
|
|
|
|
TP_fast_assign(
|
|
memcpy(__get_dynamic_array(msg), text, len);
|
|
((char *)__get_dynamic_array(msg))[len] = 0;
|
|
),
|
|
|
|
TP_printk("%s", __get_str(msg))
|
|
);
|
|
#endif /* _TRACE_PRINTK_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|