diff options
author | 2015-06-23 00:36:02 +0200 | |
---|---|---|
committer | 2015-06-23 18:21:44 -0300 | |
commit | e13798c77bdfed1da497f5e076b105b2be17b44f (patch) | |
tree | 8d68cd10b5986e5f6fcadd366ddcdcb425ee070b /tools/perf/util/evlist.c | |
parent | perf probe: Fix failure to probe events on arm (diff) | |
download | linux-e13798c77bdfed1da497f5e076b105b2be17b44f.tar.gz linux-e13798c77bdfed1da497f5e076b105b2be17b44f.tar.bz2 linux-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/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 8366511b45f8..d29df901be3e 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -548,7 +548,7 @@ static void perf_evlist__set_sid_idx(struct perf_evlist *evlist, else sid->cpu = -1; if (!evsel->system_wide && evlist->threads && thread >= 0) - sid->tid = evlist->threads->map[thread]; + sid->tid = thread_map__pid(evlist->threads, thread); else sid->tid = -1; } @@ -1475,7 +1475,7 @@ int perf_evlist__prepare_workload(struct perf_evlist *evlist, struct target *tar __func__, __LINE__); goto out_close_pipes; } - evlist->threads->map[0] = evlist->workload.pid; + thread_map__set_pid(evlist->threads, 0, evlist->workload.pid); } close(child_ready_pipe[1]); |