lkml.org 
[lkml]   [2013]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf stat: Set child_pid after perf_evlist__prepare_workload()
On 9/30/13 3:01 AM, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@lge.com>
>
> The commit acf2892270dc ("perf stat: Use perf_evlist__prepare/
> start_workload()") converted to use the function but forgot to update
> child_pid. Fix it.
>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Stephane Eranian <eranian@google.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/builtin-stat.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index f686d5ff594e..5098f144b92d 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -457,6 +457,7 @@ static int __run_perf_stat(int argc, const char **argv)
> perror("failed to prepare workload");
> return -1;
> }
> + child_pid = evsel_list->workload.pid;
> }
>
> if (group)
>

Interesting. I can't find a test case where is matters ... perhaps a
convenience of waitpid taking -1.

David


\
 
 \ /
  Last update: 2013-10-01 02:21    [W:0.057 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site