linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Piotr Maziarz <piotrx.maziarz@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
	andriy.shevchenko@intel.com, cezary.rojewski@intel.com,
	gustaw.lewandowski@intel.com
Subject: Re: [PATCH v2 2/2] tracing: Use seq_buf_hex_dump() to dump buffers
Date: Wed, 13 Nov 2019 16:09:22 -0500	[thread overview]
Message-ID: <20191113160922.1b1f0fc0@gandalf.local.home> (raw)
In-Reply-To: <1573130738-29390-2-git-send-email-piotrx.maziarz@linux.intel.com>

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

  reply	other threads:[~2019-11-19  2:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 12:45 [PATCH v2 1/2] seq_buf: Add printing formatted hex dumps Piotr Maziarz
2019-11-07 12:45 ` [PATCH v2 2/2] tracing: Use seq_buf_hex_dump() to dump buffers Piotr Maziarz
2019-11-13 21:09   ` Steven Rostedt [this message]
2019-11-26 14:53     ` Piotr Maziarz
2019-11-26 19:51       ` Steven Rostedt
2019-11-27 10:56         ` Piotr Maziarz
2019-11-13 21:02 ` [PATCH v2 1/2] seq_buf: Add printing formatted hex dumps Steven Rostedt
2019-11-14  8:00   ` Cezary Rojewski
2019-11-14 14:35     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113160922.1b1f0fc0@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=cezary.rojewski@intel.com \
    --cc=gustaw.lewandowski@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=piotrx.maziarz@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).