linux-trace-devel.vger.kernel.org archive mirror
 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 3/6] trace-cmd: New libtracefs API tracefs_write_file()
Date: Mon, 6 Jan 2020 14:10:41 +0200	[thread overview]
Message-ID: <CAPpZLN6gGQmsPTrp=cPcgde_fy5OXD2YrAP5rvg_AOGUhPVG_g@mail.gmail.com> (raw)
In-Reply-To: <20191219232131.0a6538a7@rorschach.local.home>

On Fri, Dec 20, 2019 at 6:21 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Thu, 19 Dec 2019 13:34:59 +0200
> "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:
>
> > Moved write_file() static function from trace-record.c to
> > libtracefs API. The new API will be useful in future libtracefs
> > extension.
> > All die() calls in its implementation are replaced with warning().
> > A check is added to all current callers of tracefs_write_file(),
> > in case of a error die() is called, to keep the existing behavior.
>
> I'm curious to why this is being made as a library function, as its
> really just a helper function. Not sure it needs to be part of a
> library. It doesn't seem to be anything specific to tracefs. Or am I
> missing something?
>

My intention was to share the code between trace-cmd and the library,
but may be it is not a good idea to do it in such way. I'll remove
tracefs_write_file()
API and will add it as a local function.

> -- Steve
>
>
> >
> > Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
> > ---
> >  include/tracefs/tracefs.h   |  2 ++
> >  lib/tracefs/tracefs-utils.c | 41 ++++++++++++++++++++++++++++++++
> >  tracecmd/trace-record.c     | 47 ++++++++++++-------------------------
> >  3 files changed, 58 insertions(+), 32 deletions(-)
> >

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

  reply	other threads:[~2020-01-06 12:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 11:34 [PATCH 0/6] tracefs libraray Tzvetomir Stoyanov (VMware)
2019-12-19 11:34 ` [PATCH 1/6] trace-cmd: Introduce libtracefs library Tzvetomir Stoyanov (VMware)
2019-12-20  3:25   ` Steven Rostedt
2019-12-19 11:34 ` [PATCH 2/6] kernel-shark: Use new tracefs library Tzvetomir Stoyanov (VMware)
2019-12-20  3:37   ` Steven Rostedt
2019-12-20  3:55     ` Steven Rostedt
2019-12-20  9:27   ` Yordan Karadzhov (VMware)
2019-12-19 11:34 ` [PATCH 3/6] trace-cmd: New libtracefs API tracefs_write_file() Tzvetomir Stoyanov (VMware)
2019-12-20  4:21   ` Steven Rostedt
2020-01-06 12:10     ` Tzvetomir Stoyanov [this message]
2019-12-19 11:35 ` [PATCH 4/6] trace-cmd: New libtracefs APIs for ftrace instances Tzvetomir Stoyanov (VMware)
2019-12-19 11:35 ` [PATCH 5/6] trace-cmd,kernel-shark: New libtracefs APIs for ftrace events and systems Tzvetomir Stoyanov (VMware)
2019-12-19 11:35 ` [PATCH 6/6] trace-cmd,kernel-shark: New libtracefs APIs for loading ftrace events Tzvetomir Stoyanov (VMware)

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='CAPpZLN6gGQmsPTrp=cPcgde_fy5OXD2YrAP5rvg_AOGUhPVG_g@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 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).