All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
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 15:16:13 +0300	[thread overview]
Message-ID: <CAPpZLN7NAnDuvF08B6qAab83cudaEVa=aE=9=oL5pNkUmig5wA@mail.gmail.com> (raw)
In-Reply-To: <20190730121245.2d14b2b6@gandalf.local.home>

On Tue, Jul 30, 2019 at 7:12 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Tue, 30 Jul 2019 15:50:26 +0300
> "Tzvetomir Stoyanov (VMware)" <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.
...

-- 
Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center

  reply	other threads:[~2019-07-31 12:16 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 [this message]
2019-07-31 12:27       ` Steven Rostedt
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='CAPpZLN7NAnDuvF08B6qAab83cudaEVa=aE=9=oL5pNkUmig5wA@mail.gmail.com' \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.