Skip to contentSkip to conversation

perf evsel: Remove superfluous nthreads system_wide setup in alloc_fd()

tip:perf/core tip-bot for Jiri Olsa 1 participant 1 message Jun 17, 2019 perf events

lore
Share & tools
lore

tip-bot for Jiri Olsa

author merge bot
#0 lore raw
Commit-ID:  10981c8012bc9ad4119420716a5dccfe8043b596
Gitweb:     https://git.kernel.org/tip/10981c8012bc9ad4119420716a5dccfe8043b596
Author:     Jiri Olsa <[email protected]>
AuthorDate: Fri, 17 May 2019 13:33:47 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 10 Jun 2019 15:50:01 -0300

perf evsel: Remove superfluous nthreads system_wide setup in alloc_fd()

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 libperf.

---
 tools/perf/util/evsel.c | 3 ---
 1 file changed, 3 deletions(-)
tools/perf/util/evsel.c +0 -3
index 9f3b58071863..68beef8f47ff 100644
@@ -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) {