diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-10-25 12:38:20 +0200 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2015-10-25 12:38:20 +0200 |
commit | 10d15322ed26652263a579bcb59dfd49ab8a30de (patch) | |
tree | b1497de1b8ffd34b991cdf6e21de1c7a0a65f1de /tools/perf/tests/task-exit.c | |
parent | 0316d30ea3e66379cd30ed70a114bc282159bb4c (diff) | |
parent | e5a9f8d04660da7ef3a98260aa74c3976f9cb4cd (diff) | |
download | linux-10d15322ed26652263a579bcb59dfd49ab8a30de.tar.gz linux-10d15322ed26652263a579bcb59dfd49ab8a30de.tar.xz |
Merge remote-tracking branch 'mac80211-next/master' into next
Diffstat (limited to 'tools/perf/tests/task-exit.c')
-rw-r--r-- | tools/perf/tests/task-exit.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/perf/tests/task-exit.c b/tools/perf/tests/task-exit.c index 3a8fedef83bc..add16385f13e 100644 --- a/tools/perf/tests/task-exit.c +++ b/tools/perf/tests/task-exit.c @@ -43,6 +43,8 @@ int test__task_exit(void) }; const char *argv[] = { "true", NULL }; char sbuf[STRERR_BUFSIZE]; + struct cpu_map *cpus; + struct thread_map *threads; signal(SIGCHLD, sig_handler); @@ -58,14 +60,19 @@ int test__task_exit(void) * perf_evlist__prepare_workload we'll fill in the only thread * we're monitoring, the one forked there. */ - evlist->cpus = cpu_map__dummy_new(); - evlist->threads = thread_map__new_by_tid(-1); - if (!evlist->cpus || !evlist->threads) { + cpus = cpu_map__dummy_new(); + threads = thread_map__new_by_tid(-1); + if (!cpus || !threads) { err = -ENOMEM; pr_debug("Not enough memory to create thread/cpu maps\n"); - goto out_delete_evlist; + goto out_free_maps; } + perf_evlist__set_maps(evlist, cpus, threads); + + cpus = NULL; + threads = NULL; + err = perf_evlist__prepare_workload(evlist, &target, argv, false, workload_exec_failed_signal); if (err < 0) { @@ -114,6 +121,9 @@ retry: err = -1; } +out_free_maps: + cpu_map__put(cpus); + thread_map__put(threads); out_delete_evlist: perf_evlist__delete(evlist); return err; |