Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23df7f79 authored by Adrian Hunter's avatar Adrian Hunter Committed by Arnaldo Carvalho de Melo
Browse files

perf evlist: Make perf_evlist__open() open evsels with their cpus and threads...


perf evlist: Make perf_evlist__open() open evsels with their cpus and threads (like perf record does)

'perf record' uses perf_evsel__open() to open events and passes the
evsel->cpus and evsel->threads.  Many tests and some tools instead use
perf_evlist__open() which passes instead evlist->cpus and
evlist->threads.

Make perf_evlist__open() follow the 'perf record' behaviour so that a
consistent approach is taken.

Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Noel Grandin <noelgrandin@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1452158050-28061-3-git-send-email-jolsa@kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 14cbfbeb
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1498,7 +1498,7 @@ int perf_evlist__open(struct perf_evlist *evlist)
	perf_evlist__update_id_pos(evlist);
	perf_evlist__update_id_pos(evlist);


	evlist__for_each(evlist, evsel) {
	evlist__for_each(evlist, evsel) {
		err = perf_evsel__open(evsel, evlist->cpus, evlist->threads);
		err = perf_evsel__open(evsel, evsel->cpus, evsel->threads);
		if (err < 0)
		if (err < 0)
			goto out_err;
			goto out_err;
	}
	}