linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Donnefort <vincent.donnefort@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH] trace-cmd: fix extract output option
Date: Wed, 30 Sep 2020 09:31:02 +0100	[thread overview]
Message-ID: <20200930083102.GA90046@e120877-lin.cambridge.arm.com> (raw)
In-Reply-To: <20200929163152.4c2606a1@gandalf.local.home>

On Tue, Sep 29, 2020 at 04:31:52PM -0400, Steven Rostedt wrote:
> On Tue, 29 Sep 2020 18:49:26 +0100
> vincent.donnefort@arm.com wrote:
> 
> > From: Vincent Donnefort <vincent.donnefort@arm.com>
> > 
> > During the introduction of instance's output_file copy:
> > 
> >   3a206ca ("trace-cmd: Have instances include a copy of its output file")
> > 
> > The extract path has been omitted, leading to a broken output option:
> > 
> >   $ trace-cmd extract -o /foo/bar.dat # Will fallback to ./trace.dat
> 
> When I tried this it worked fine to me. But then I walked through the logic
> via gdb and found that the intermediate step (the one that writes the
> individual buffers directly), which can be an issue if you happen to
> execute this in a directory that you can not write to, or doesn't have
> enough space to hold all the data. Thus your patch is correct, but the
> change log is not.
> 
> Do you really see "trace.dat" at the end of that command? Because I
> see /foo/bar.dat.
> 
> But if I try to run the extract in /sys/kernel/tracing, it will fail
> because it will try to write "(null).cpuX" where X is the CPU number.
> 
> But the creation of the actual file uses ctx->output, which is what we want.
> 
> Anyway, I'll update the change log to this:
> 
>     During the introduction of instance's output_file copy:
> 
>       3a206ca ("trace-cmd: Have instances include a copy of its output file")
> 
>     The extract path has been omitted, causing the temp files created to be
>     written in the same directory using the null "output_file" of the
>     instance, to create "(null).cpuX" files. If this is executed in a
>     directory that is not writable (like /sys/kernel/tracing) or does not
>     have enough space to hold the temp files, then it will fail to write.
> 
> Fair?
> 
> -- Steve

Apologies, the description (... and my testing) was indeed incorrect. The
output is working fine, the problem being only the temporary files.

No problem with the updated commit description. We probably need to update
the short description as well:

  "trace-cmd: Fix extract temporary files path" ?

-- 
Vincent


      reply	other threads:[~2020-09-30  8:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29 17:49 [PATCH] trace-cmd: fix extract output option vincent.donnefort
2020-09-29 20:31 ` Steven Rostedt
2020-09-30  8:31   ` Vincent Donnefort [this message]

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=20200930083102.GA90046@e120877-lin.cambridge.arm.com \
    --to=vincent.donnefort@arm.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).