From ef56e047b2bd4dabb801fd073dfcab5f40de5f78 Mon Sep 17 00:00:00 2001 From: Piotr Maziarz Date: Thu, 7 Nov 2019 13:45:38 +0100 Subject: tracing: Use seq_buf_hex_dump() to dump buffers Without this, buffers can be printed with __print_array macro that has no formatting options and can be hard to read. The other way is to mimic formatting capability with multiple calls of trace event with one call per row which gives performance impact and different timestamp in each row. Link: http://lkml.kernel.org/r/1573130738-29390-2-git-send-email-piotrx.maziarz@linux.intel.com Signed-off-by: Piotr Maziarz Signed-off-by: Cezary Rojewski Signed-off-by: Steven Rostedt (VMware) --- include/trace/trace_events.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/trace/trace_events.h') diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index 4ecdfe2e3580..7089760d4c7a 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -340,6 +340,12 @@ TRACE_MAKE_SYSTEM_STR(); trace_print_array_seq(p, array, count, el_size); \ }) +#undef __print_hex_dump +#define __print_hex_dump(prefix_str, prefix_type, \ + rowsize, groupsize, buf, len, ascii) \ + trace_print_hex_dump_seq(p, prefix_str, prefix_type, \ + rowsize, groupsize, buf, len, ascii) + #undef DECLARE_EVENT_CLASS #define DECLARE_EVENT_CLASS(call, proto, args, tstruct, assign, print) \ static notrace enum print_line_t \ -- cgit v1.2.3 From 02a65a0bfbef5c644f520885a0a85b45b9703cf3 Mon Sep 17 00:00:00 2001 From: Piotr Maziarz Date: Tue, 26 Nov 2019 11:06:31 +0100 Subject: tracing: Fix __print_hex_dump scope undef is needed for parsing __print_hex_dump in traceevent lib. Link: http://lkml.kernel.org/r/1574762791-14883-1-git-send-email-piotrx.maziarz@linux.intel.com Signed-off-by: Piotr Maziarz Signed-off-by: Cezary Rojewski Signed-off-by: Steven Rostedt (VMware) --- include/trace/trace_events.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/trace/trace_events.h') diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h index 7089760d4c7a..472b33d23a10 100644 --- a/include/trace/trace_events.h +++ b/include/trace/trace_events.h @@ -757,6 +757,7 @@ static inline void ftrace_test_probe_##call(void) \ #undef __get_str #undef __get_bitmask #undef __print_array +#undef __print_hex_dump #undef TP_printk #define TP_printk(fmt, args...) "\"" fmt "\", " __stringify(args) -- cgit v1.2.3