lkml.org 
[lkml]   [2019]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/2] tracing: Use seq_buf_hex_dump() to dump buffers
On Thu,  7 Nov 2019 13:45:38 +0100
Piotr Maziarz <piotrx.maziarz@linux.intel.com> wrote:

> diff --git a/include/trace/trace_events.h b/include/trace/trace_events.h
> index 4ecdfe2..7089760 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 \

OK, so the __print_hex_dump() will be exported to the format files.

Would you be willing to add a function to handle __print_hex_dump() in
tools/lib/traceevent/event-parse.c, like __print_flags(),
__print_symbolic(), and other __print_*() functions are handled. This
will allow trace-cmd and perf to be able to parse the data when you
used it via the userspace tools.

This can be a separate patch, but ideally before any trace events start
using this.

Thanks,

-- Steve

\
 
 \ /
  Last update: 2019-11-19 03:03    [W:0.129 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site