perf evsel: Support perf_evsel__open(cpus > 1 && threads > 1)
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Jan 2011 13:55:27 +0000 (11:55 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 11 Jan 2011 00:03:26 +0000 (22:03 -0200)
commit0252208eb52f6fe8731a47804eddc7ba93f60a87
treedeaddeda57a630a1d6813ea565fc972c699e2906
parent12f7e0364375ba1ba55abcc5ac082b68fb526c80
perf evsel: Support perf_evsel__open(cpus > 1 && threads > 1)

And a test for it:

[acme@felicio linux]$ perf test
 1: vmlinux symtab matches kallsyms: Ok
 2: detect open syscall event: Ok
 3: detect open syscall event on all cpus: Ok
[acme@felicio linux]$

Translating C the test does:

1. generates different number of open syscalls on each CPU
   by using sched_setaffinity
2. Verifies that the expected number of events is generated
   on each CPU

It works as expected.

LKML-Reference: <new-submission>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-test.c
tools/perf/util/evsel.c