• Peter Zijlstra's avatar
    perf_counter: Add event overlow handling · 43a21ea8
    Peter Zijlstra authored
    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: default avatarPeter 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: default avatarIngo Molnar <mingo@elte.hu>
    43a21ea8
perf_counter.c 103 KB