From: Steven Rostedt <rostedt@goodmis.org>
To: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] tools/lib/traceevent, tools/perf: Changes in tep_print_event_* APIs
Date: Wed, 31 Jul 2019 08:27:17 -0400 [thread overview]
Message-ID: <20190731082717.1846993b@gandalf.local.home> (raw)
In-Reply-To: <CAPpZLN7NAnDuvF08B6qAab83cudaEVa=aE=9=oL5pNkUmig5wA@mail.gmail.com>
On Wed, 31 Jul 2019 15:16:13 +0300
Tzvetomir Stoyanov <tz.stoyanov@gmail.com> wrote:
> > > @@ -5413,18 +5419,20 @@ int tep_cmdline_pid(struct tep_handle *tep, struct tep_cmdline *cmdline)
> > > /**
> > > * tep_event_info - parse the data into the print format
> > > * @s: the trace_seq to write to
> > > + * @format: printf format string. If any precision is specified in the string,
> > > + * print in raw data format
> >
> > I'm curious to why this is needed?
> >
> > We can use a temp trace_seq like I mentioned above, and then apply the
> > format to it at the end.
> >
> We need a way to keep the tep_set_print_raw() functionality with the
> new tep_print_event() API.
> The user should have an option to print TEP_PRINT_INFO in raw format.
> The only way to pass some
> extra parameters to tep_print_event() is to use the printf format
> string, "%s" in this case.
> I choose to use "%s" width specifier to force TEP_PRINT_INFO in raw format.
> The other possible solution could be to define a new
> TEP_PRINT_INFO_RAW type for this use case.
I like the idea of adding a new TEP_PRINT_INFO_RAW, as the other seems
more of a "hack" to get that. It also removes the ability to pass in a
string precision for a normal TEP_PRINT_INFO.
Thanks!
-- Steve
next prev parent reply other threads:[~2019-07-31 12:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 12:50 [PATCH v2 0/3] Changes in few libtraceevent APIs Tzvetomir Stoyanov (VMware)
2019-07-30 12:50 ` [PATCH v2 1/3] tools/lib/traceevent, tools/perf: Changes in tep_print_event_* APIs Tzvetomir Stoyanov (VMware)
2019-07-30 16:12 ` Steven Rostedt
2019-07-31 12:16 ` Tzvetomir Stoyanov
2019-07-31 12:27 ` Steven Rostedt [this message]
2019-07-30 12:50 ` [PATCH v2 2/3] tools/lib/traceevent: Remove tep_register_trace_clock() Tzvetomir Stoyanov (VMware)
2019-07-30 12:50 ` [PATCH v2 3/3] tools/lib/traceevent: Change user's plugin directory Tzvetomir Stoyanov (VMware)
2019-07-30 20:06 ` [PATCH v2 0/3] Changes in few libtraceevent APIs 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=20190731082717.1846993b@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=tz.stoyanov@gmail.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).