summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-test.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-01-19 11:08:15 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-01-24 16:47:37 -0500
commit0d37aa34f8806bb443dd3c8621fd9bdbb50c58bb (patch)
tree3e245385cdb75fec299f5e145243f062b70fd652 /tools/perf/builtin-test.c
parent9ae7d3351aac238eef9646479693105688fd9cc9 (diff)
perf tools: Introduce per user view
The new --uid command line option will show only the tasks for a given user, using the proc interface to figure out the existing tasks. Kernel work is needed to close races at startup, but this should already be useful in many use cases. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-bdnspm000gw2l984a2t53o8z@git.kernel.org 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c
index 3854e869dce1..3ce709e97462 100644
--- a/tools/perf/builtin-test.c
+++ b/tools/perf/builtin-test.c
@@ -276,7 +276,7 @@ static int test__open_syscall_event(void)
276 return -1; 276 return -1;
277 } 277 }
278 278
279 threads = thread_map__new(-1, getpid()); 279 threads = thread_map__new(-1, getpid(), UINT_MAX);
280 if (threads == NULL) { 280 if (threads == NULL) {
281 pr_debug("thread_map__new\n"); 281 pr_debug("thread_map__new\n");
282 return -1; 282 return -1;
@@ -342,7 +342,7 @@ static int test__open_syscall_event_on_all_cpus(void)
342 return -1; 342 return -1;
343 } 343 }
344 344
345 threads = thread_map__new(-1, getpid()); 345 threads = thread_map__new(-1, getpid(), UINT_MAX);
346 if (threads == NULL) { 346 if (threads == NULL) {
347 pr_debug("thread_map__new\n"); 347 pr_debug("thread_map__new\n");
348 return -1; 348 return -1;
@@ -490,7 +490,7 @@ static int test__basic_mmap(void)
490 expected_nr_events[i] = random() % 257; 490 expected_nr_events[i] = random() % 257;
491 } 491 }
492 492
493 threads = thread_map__new(-1, getpid()); 493 threads = thread_map__new(-1, getpid(), UINT_MAX);
494 if (threads == NULL) { 494 if (threads == NULL) {
495 pr_debug("thread_map__new\n"); 495 pr_debug("thread_map__new\n");
496 return -1; 496 return -1;
@@ -1054,7 +1054,7 @@ static int test__PERF_RECORD(void)
1054 * we're monitoring, the one forked there. 1054 * we're monitoring, the one forked there.
1055 */ 1055 */
1056 err = perf_evlist__create_maps(evlist, opts.target_pid, 1056 err = perf_evlist__create_maps(evlist, opts.target_pid,
1057 opts.target_tid, opts.cpu_list); 1057 opts.target_tid, UINT_MAX, opts.cpu_list);
1058 if (err < 0) { 1058 if (err < 0) {
1059 pr_debug("Not enough memory to create thread/cpu maps\n"); 1059 pr_debug("Not enough memory to create thread/cpu maps\n");
1060 goto out_delete_evlist; 1060 goto out_delete_evlist;