aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-trace.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2015-06-23 00:36:02 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-06-23 18:21:44 -0300
commite13798c77bdfed1da497f5e076b105b2be17b44f (patch)
tree8d68cd10b5986e5f6fcadd366ddcdcb425ee070b /tools/perf/builtin-trace.c
parentperf probe: Fix failure to probe events on arm (diff)
downloadlinux-dev-e13798c77bdfed1da497f5e076b105b2be17b44f.tar.xz
linux-dev-e13798c77bdfed1da497f5e076b105b2be17b44f.zip
perf thread_map: Don't access the array entries directly
Instead provide a method to set the array entries, and another to access the contents. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1435012588-9007-2-git-send-email-jolsa@kernel.org [ Split providing the set/get accessors from transforming the entries structs ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
-rw-r--r--tools/perf/builtin-trace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index de5d277d1ad7..2bf2ca771ca5 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2325,7 +2325,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
*/
if (trace->filter_pids.nr > 0)
err = perf_evlist__set_filter_pids(evlist, trace->filter_pids.nr, trace->filter_pids.entries);
- else if (evlist->threads->map[0] == -1)
+ else if (thread_map__pid(evlist->threads, 0) == -1)
err = perf_evlist__set_filter_pid(evlist, getpid());
if (err < 0) {
@@ -2343,7 +2343,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
if (forks)
perf_evlist__start_workload(evlist);
- trace->multiple_threads = evlist->threads->map[0] == -1 ||
+ trace->multiple_threads = thread_map__pid(evlist->threads, 0) == -1 ||
evlist->threads->nr > 1 ||
perf_evlist__first(evlist)->attr.inherit;
again: