• Peter Zijlstra's avatar
    perf events: Allow per-task-per-cpu counters · f4c4176f
    Peter Zijlstra authored
    In order to allow for per-task-per-cpu counters, useful for
    scalability when profiling task hierarchies, we allow installing
    events with event->cpu != -1 in task contexts.
    
    __perf_event_sched_in() already skips events where ->cpu
    mis-matches the current cpu, fix up __perf_install_in_context()
    and __perf_event_enable() to also respect this filter.
    
    This does lead to vary hard to interpret enabled/running times
    for such counters, but I don't see a simple solution for that.
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: fweisbec@gmail.com
    Cc: Paul Mackerras <paulus@samba.org>
    LKML-Reference: <20091216165904.831451147@chello.nl>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    f4c4176f
perf_event.c 121 KB