From: Andi Kleen <ak@linux.intel.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jann Horn <jannh@google.com>, lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Michael Petlan <mpetlan@redhat.com>
Subject: Re: [PATCH] perf tools: Setup initial evlist::all_cpus value
Date: Fri, 10 Jan 2020 09:31:07 -0800 [thread overview]
Message-ID: <20200110173107.GU15478@tassilo.jf.intel.com> (raw)
In-Reply-To: <20200110151537.153012-1-jolsa@kernel.org>
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@linux.intel.com>
>
> Reported-by: Jann Horn <jannh@google.com>
> Link: https://lkml.kernel.org/n/tip-kzioebqr5c3u4t7tafju8pbx@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.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
>
next prev parent reply other threads:[~2020-01-10 17:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 15:15 [PATCH] perf tools: Setup initial evlist::all_cpus value Jiri Olsa
2020-01-10 17:31 ` Andi Kleen [this message]
2020-01-20 8:27 ` [tip: perf/core] libperf: " tip-bot2 for Jiri Olsa
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=20200110173107.GU15478@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jannh@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@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).