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>
This commit is contained in:
Namhyung Kim
2012-04-26 14:15:19 +09:00
committed by Arnaldo Carvalho de Melo
parent 4bd0f2d2c0
commit b809ac100e
5 changed files with 15 additions and 16 deletions

View File

@@ -1165,6 +1165,9 @@ realloc:
static int test__PERF_RECORD(void)
{
struct perf_record_opts opts = {
.target = {
.uid = UINT_MAX,
},
.no_delay = true,
.freq = 10,
.mmap_pages = 256,
@@ -1207,9 +1210,7 @@ static int test__PERF_RECORD(void)
* perf_evlist__prepare_workload we'll fill in the only thread
* we're monitoring, the one forked there.
*/
err = perf_evlist__create_maps(evlist, opts.target.pid,
opts.target.tid, UINT_MAX,
opts.target.cpu_list);
err = perf_evlist__create_maps(evlist, &opts.target);
if (err < 0) {
pr_debug("Not enough memory to create thread/cpu maps\n");
goto out_delete_evlist;