perf evlist: Make perf_evlist__open() open evsels with their cpus and threads (like...
authorAdrian Hunter <[email protected]>
Thu, 7 Jan 2016 09:13:59 +0000 (10:13 +0100)
committerArnaldo Carvalho de Melo <[email protected]>
Fri, 8 Jan 2016 17:15:11 +0000 (14:15 -0300)
'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: Adrian Hunter <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Noel Grandin <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/evlist.c

index fa6dbf0ea0d6a83050a9555757845c2656782e72..29e085b2e168ba256e308338f79bfefd74d6e15f 100644 (file)
@@ -1498,7 +1498,7 @@ int perf_evlist__open(struct perf_evlist *evlist)
        perf_evlist__update_id_pos(evlist);
 
        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)
                        goto out_err;
        }