diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-04-26 14:15:19 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-02 15:23:11 -0300 |
commit | b809ac100e2f12ebf1b58ff522dba15651a77d27 (patch) | |
tree | b5e4b894ed8cd8d0e1eb3e6252f2204f5bfae764 /tools/perf/util/evlist.c | |
parent | 4bd0f2d2c0cf14de9c84c2fe689120c6b0f667c8 (diff) | |
download | op-kernel-dev-b809ac100e2f12ebf1b58ff522dba15651a77d27.zip op-kernel-dev-b809ac100e2f12ebf1b58ff522dba15651a77d27.tar.gz |
perf evlist: Make create_maps() take struct perf_target
Now we have all information that needed to create cpu/thread maps in
struct perf_target, it'd be better using it as an argument.
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1335417327-11796-6-git-send-email-namhyung.kim@lge.com
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 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 7080901..a43e2c56 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -599,18 +599,20 @@ int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages, return perf_evlist__mmap_per_cpu(evlist, prot, mask); } -int perf_evlist__create_maps(struct perf_evlist *evlist, const char *target_pid, - const char *target_tid, uid_t uid, const char *cpu_list) +int perf_evlist__create_maps(struct perf_evlist *evlist, + struct perf_target *target) { - evlist->threads = thread_map__new_str(target_pid, target_tid, uid); + evlist->threads = thread_map__new_str(target->pid, target->tid, + target->uid); if (evlist->threads == NULL) return -1; - if (uid != UINT_MAX || (cpu_list == NULL && target_tid)) + if (target->uid != UINT_MAX || + (target->cpu_list == NULL && target->tid)) evlist->cpus = cpu_map__dummy_new(); else - evlist->cpus = cpu_map__new(cpu_list); + evlist->cpus = cpu_map__new(target->cpu_list); if (evlist->cpus == NULL) goto out_delete_threads; |