[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200110173107.GU15478@tassilo.jf.intel.com>
Date: Fri, 10 Jan 2020 09:31:07 -0800
From: Andi Kleen <ak@...ux.intel.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jann Horn <jannh@...gle.com>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Michael Petlan <mpetlan@...hat.com>
Subject: Re: [PATCH] perf tools: Setup initial evlist::all_cpus value
On Fri, Jan 10, 2020 at 04:15:37PM +0100, Jiri Olsa wrote:
> Jann Horn reported crash in perf ftrace because evlist::all_cpus
> isn't initialized if there's evlist without events, which is the
> case for perf ftrace.
>
> Adding initial initialization of evlist::all_cpus from given cpus,
> regardless of events in the evlist.
Acked-by: Andi Kleen <ak@...ux.intel.com>
>
> Reported-by: Jann Horn <jannh@...gle.com>
> Link: https://lkml.kernel.org/n/tip-kzioebqr5c3u4t7tafju8pbx@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---
> tools/lib/perf/evlist.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/lib/perf/evlist.c b/tools/lib/perf/evlist.c
> index ae9e65aa2491..5b9f2ca50591 100644
> --- a/tools/lib/perf/evlist.c
> +++ b/tools/lib/perf/evlist.c
> @@ -164,6 +164,9 @@ void perf_evlist__set_maps(struct perf_evlist *evlist,
> evlist->threads = perf_thread_map__get(threads);
> }
>
> + if (!evlist->all_cpus && cpus)
> + evlist->all_cpus = perf_cpu_map__get(cpus);
> +
> perf_evlist__propagate_maps(evlist);
> }
>
> --
> 2.24.1
>
Powered by blists - more mailing lists