linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf inject: Fix repipe usage
Date: Fri, 2 Apr 2021 10:33:02 -0300	[thread overview]
Message-ID: <YGcdDoPaVpkM1DBm@kernel.org> (raw)
In-Reply-To: <YGXTGQwbz0wOWplZ@krava>

Em Thu, Apr 01, 2021 at 04:05:13PM +0200, Jiri Olsa escreveu:
> On Thu, Apr 01, 2021 at 01:36:05PM +0300, Adrian Hunter wrote:
> > Since commit 14d3d5405253 ("perf session: Try to read pipe data from file")
> > perf inject has started printing "PERFILE2h" when not processing pipes.
> > 
> > The commit exposed perf to the possiblity that the input is not a pipe but
> > the 'repipe' parameter gets used. That causes the printing because perf
> > inject sets 'repipe' to true always.
> > 
> > The 'repipe' parameter of perf_session__new() is used by 2 functions:
> > 	- perf_file_header__read_pipe()
> > 	- trace_report()
> > In both cases, the functions copy data to STDOUT_FILENO when 'repipe' is
> > true.
> > 
> > Fix by setting 'repipe' to true only if the output is a pipe.
> > 
> > Fixes: e558a5bd8b74 ("perf inject: Work with files")
> > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> 
> Acked-by: Jiri Olsa <jolsa@redhat.com>

Thanks, applied.

- Arnaldo


      reply	other threads:[~2021-04-02 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 10:36 [PATCH] perf inject: Fix repipe usage Adrian Hunter
2021-04-01 14:05 ` Jiri Olsa
2021-04-02 13:33   ` Arnaldo Carvalho de Melo [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=YGcdDoPaVpkM1DBm@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.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).