mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 02:01:05 +07:00
752d596b39
Use __get_str(str) rather than __get_dynamic_array(str) when deadling with strings. It is just a code cleanup, no changes on tracepoint ABI. Link: http://lkml.kernel.org/r/ea260df91817411cca2a1f3db2abd88860094788.1467407618.git.bristot@redhat.com Cc: Trond Myklebust <trond.myklebust@primarydata.com> Cc: Anna Schumaker <anna.schumaker@netapp.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: linux-nfs@vger.kernel.org Suggested-by: Steven Rostedt <rostedt@goodmis.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
29 lines
545 B
C
29 lines
545 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_str(msg), text, len);
|
|
__get_str(msg)[len] = 0;
|
|
),
|
|
|
|
TP_printk("%s", __get_str(msg))
|
|
);
|
|
#endif /* _TRACE_PRINTK_H */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|