lkml.org 
[lkml]   [2019]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf stat: Fix endless wait for child process
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

\
 
 \ /
  Last update: 2019-01-03 13:45    [W:0.039 / U:1.568 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site