diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-04-26 01:15:19 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-02 14:23:11 -0400 |
commit | b809ac100e2f12ebf1b58ff522dba15651a77d27 (patch) | |
tree | b5e4b894ed8cd8d0e1eb3e6252f2204f5bfae764 /tools/perf/builtin-test.c | |
parent | 4bd0f2d2c0cf14de9c84c2fe689120c6b0f667c8 (diff) |
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/builtin-test.c')
-rw-r--r-- | tools/perf/builtin-test.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c index 27882d86e9ab..9d9abbbe23be 100644 --- a/tools/perf/builtin-test.c +++ b/tools/perf/builtin-test.c | |||
@@ -1165,6 +1165,9 @@ realloc: | |||
1165 | static int test__PERF_RECORD(void) | 1165 | static int test__PERF_RECORD(void) |
1166 | { | 1166 | { |
1167 | struct perf_record_opts opts = { | 1167 | struct perf_record_opts opts = { |
1168 | .target = { | ||
1169 | .uid = UINT_MAX, | ||
1170 | }, | ||
1168 | .no_delay = true, | 1171 | .no_delay = true, |
1169 | .freq = 10, | 1172 | .freq = 10, |
1170 | .mmap_pages = 256, | 1173 | .mmap_pages = 256, |
@@ -1207,9 +1210,7 @@ static int test__PERF_RECORD(void) | |||
1207 | * perf_evlist__prepare_workload we'll fill in the only thread | 1210 | * perf_evlist__prepare_workload we'll fill in the only thread |
1208 | * we're monitoring, the one forked there. | 1211 | * we're monitoring, the one forked there. |
1209 | */ | 1212 | */ |
1210 | err = perf_evlist__create_maps(evlist, opts.target.pid, | 1213 | err = perf_evlist__create_maps(evlist, &opts.target); |
1211 | opts.target.tid, UINT_MAX, | ||
1212 | opts.target.cpu_list); | ||
1213 | if (err < 0) { | 1214 | if (err < 0) { |
1214 | pr_debug("Not enough memory to create thread/cpu maps\n"); | 1215 | pr_debug("Not enough memory to create thread/cpu maps\n"); |
1215 | goto out_delete_evlist; | 1216 | goto out_delete_evlist; |