perf, hw_breakpoint: Fix crash in hw_breakpoint creation
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Thu, 14 Oct 2010 15:43:23 +0000 (17:43 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 18 Oct 2010 17:58:55 +0000 (19:58 +0200)
commitd580ff8699e8811a9af37e9de4dea375401bdeec
treef2789d8a8628b856ad902c0bfbb1899e6cc67697
parentc6be5a5cb62592d9d661899a2aa78236eb00ffa5
perf, hw_breakpoint: Fix crash in hw_breakpoint creation

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: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101014203625.391543667@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_event.h
kernel/hw_breakpoint.c
kernel/perf_event.c