[PATCH 36/85] perf evsel: Remove superfluous nthreads system_wide setup in alloc_fd()

From: Arnaldo Carvalho de Melo
Date: Tue Jun 11 2019 - 15:06:37 EST

From: Jiri Olsa <jolsa@xxxxxxxxxx>

It's already setup in the only caller of this method in
perf_evsel__open(), right before calling perf_evsel__alloc_fd(), no need
to do it again.

Also it's better to have it out of the function before we move it to

Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Link: https://lkml.kernel.org/n/tip-1k8lhyjxfk7o8v4g3r7eyjc9@xxxxxxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
tools/perf/util/evsel.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 9f3b58071863..68beef8f47ff 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1148,9 +1148,6 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,

static int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads)
- if (evsel->system_wide)
- nthreads = 1;
evsel->fd = xyarray__new(ncpus, nthreads, sizeof(int));

if (evsel->fd) {