perf_counter: Add event overlow handling
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 25 Mar 2009 18:39:37 +0000 (19:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 18 Jun 2009 12:46:11 +0000 (14:46 +0200)
commit43a21ea81a2400992561146327c4785ce7f7be38
treed4974c0ff9d7f40291515c5c0cf7e0d51abccb66
parentd3a9262e59f7fb83c6d44df3b2b1460ed57d3ea1
perf_counter: Add event overlow handling

Alternative method of mmap() data output handling that provides
better overflow management and a more reliable data stream.

Unlike the previous method, that didn't have any user->kernel
feedback and relied on userspace keeping up, this method relies on
userspace writing its last read position into the control page.

It will ensure new output doesn't overwrite not-yet read events,
new events for which there is no space left are lost and the
overflow counter is incremented, providing exact event loss
numbers.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_counter.h
kernel/perf_counter.c