perf test: Add test for the evlist mmap routines
authorArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 15 Jan 2011 12:42:46 +0000 (10:42 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 22 Jan 2011 21:56:31 +0000 (19:56 -0200)
commitde5fa3a8a05cd60f59622e88cfeb90416760d78e
treeaeafb466ef056e17c8cf043e396e9e5fcf348a7e
parent04391debc3e1195222a4dbb162ace6542dd89c1c
perf test: Add test for the evlist mmap routines

This test will generate random numbers of calls to some getpid syscalls,
then establish an mmap for a group of events that are created to monitor
these syscalls.

It will receive the events, using mmap, use its PERF_SAMPLE_ID generated
sample.id field to map back to its respective perf_evsel instance.

Then it checks if the number of syscalls reported as perf events by the
kernel corresponds to the number of syscalls made.

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>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-test.c