]> git.baikalelectronics.ru Git - kernel.git/commit
libperf: Setup initial evlist::all_cpus value
authorJiri Olsa <jolsa@kernel.org>
Fri, 10 Jan 2020 15:15:37 +0000 (16:15 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 14 Jan 2020 15:02:19 +0000 (12:02 -0300)
commit1e0d5ba896394cf5b7aedabd5e8539237a30d377
treec634b8ca75de9215205c4638fa5e1093fd1c5018
parent8064d37c28ea5d17b470818dcad17048e4ab7a6e
libperf: Setup initial evlist::all_cpus value

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.

Fixes: 1a341397f099 ("perf stat: Use affinity for closing file descriptors")
Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Andi Kleen <ak@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200110151537.153012-1-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/perf/evlist.c