perf stat: Use evsel->threads in create_perf_stat_counter()
authorJiri Olsa <jolsa@kernel.org>
Thu, 30 Aug 2018 06:32:10 +0000 (08:32 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 30 Aug 2018 18:52:21 +0000 (15:52 -0300)
Get rid of the evsel_list dependency, here we can use the evsel->threads
copy of the struct thread_map.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180830063252.23729-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-stat.c

index d097b5b47eb81e16b83a8a37f3385aeea124a0ed..d389ed623715645350a6a2c5fb73f11f263f3191 100644 (file)
@@ -293,7 +293,7 @@ static int create_perf_stat_counter(struct perf_evsel *evsel)
        if (target__has_cpu(&target) && !target__has_per_thread(&target))
                return perf_evsel__open_per_cpu(evsel, perf_evsel__cpus(evsel));
 
-       return perf_evsel__open_per_thread(evsel, evsel_list->threads);
+       return perf_evsel__open_per_thread(evsel, evsel->threads);
 }
 
 static int process_synthesized_event(struct perf_tool *tool __maybe_unused,