perf test: Add test for counting open syscalls
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Jan 2011 02:16:20 +0000 (00:16 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Jan 2011 02:32:06 +0000 (00:32 -0200)
commitd854861c4292a4e675a5d3bfd862c5f7421c81e8
tree59a4012085b68bb302c61a9ebb8bb81477b59d98
parent4eed11d5e24540dc133003b6e8f904cb747ac4bb
perf test: Add test for counting open syscalls

To test the use of the perf_evsel class on something other than
the tools from where we refactored code to create it.

It calls open() N times and then checks if the event created to
monitor it returns N events.

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

It does.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Han Pingtian <phan@redhat.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>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-test.c