From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Jin Yao <yao.jin@linux.intel.com>,
jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com,
alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org,
ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH] perf stat: Fix endless wait for child process
Date: Thu, 3 Jan 2019 09:43:56 -0300 [thread overview]
Message-ID: <20190103124356.GA32598@kernel.org> (raw)
In-Reply-To: <20190103111205.GA26933@krava>
Em Thu, Jan 03, 2019 at 12:12:05PM +0100, Jiri Olsa escreveu:
> On Thu, Jan 03, 2019 at 03:40:45PM +0800, Jin Yao wrote:
> > We hit a perf stat issue by using following script.
> >
> > #!/bin/bash
> >
> > sleep 1000 &
> > exec perf stat -a -e cycles -I1000 -- sleep 5
> >
> > Since "perf stat" is launched by exec, so the "sleep 1000" would be
> > the child process of "perf stat". The wait4() will not return because
> > it's waiting for the child process "sleep 1000" to be end. So perf
> > stat doesn't return even 5s passed.
> >
> > This patch lets the perf stat return when the specified child process
> > is end (in this case, specified child process is "sleep 5").
> >
> > Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
>
> Reviewed-by: Jiri Olsa <jolsa@kernel.org>
Thanks, tested and applied.
- Arnaldo
next prev parent reply other threads:[~2019-01-03 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 7:40 [PATCH] perf stat: Fix endless wait for child process Jin Yao
2019-01-03 11:12 ` Jiri Olsa
2019-01-03 12:43 ` Arnaldo Carvalho de Melo [this message]
2019-01-08 15:36 ` [tip:perf/urgent] " tip-bot for Jin Yao
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=20190103124356.GA32598@kernel.org \
--to=acme@kernel.org \
--cc=Linux-kernel@vger.kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
--cc=yao.jin@linux.intel.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