• Peter Zijlstra's avatar
    perf, hw_breakpoint: Fix crash in hw_breakpoint creation · d580ff86
    Peter Zijlstra authored
    hw_breakpoint creation needs to account stuff per-task to ensure there
    is always sufficient hardware resources to back these things due to
    ptrace.
    
    With the perf per pmu context changes the event initialization no
    longer has access to the event context, for the simple reason that we
    need to first find the pmu (result of initialization) before we can
    find the context.
    
    This makes hw_breakpoints unhappy, because it can no longer do per
    task accounting, cure this by frobbing a task pointer in the event::hw
    bits for now...
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    LKML-Reference: <20101014203625.391543667@chello.nl>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    d580ff86
perf_event.c 143 KB