powerpc/perf: hw breakpoints return ENOSPC
Peter Zijlstra
a.p.zijlstra at chello.nl
Fri Aug 17 00:15:02 EST 2012
On Fri, 2012-08-17 at 00:02 +1000, Michael Ellerman wrote:
> You do want to guarantee that the task will always be subject to the
> breakpoint, even if it moves cpus. So is there any way to guarantee that
> other than reserving a breakpoint slot on every cpu ahead of time?
That's not how regular perf works.. regular perf can overload hw
resources at will and stuff is strictly per-cpu.
So the regular perf record has perf_event_attr::inherit enabled by
default, this will result in it creating a per-task-per-cpu event for
each cpu and this will succeed because there's no strict reservation to
avoid/detect starvation against perf_event_attr::pinned events.
For regular (!pinned) events, we'll RR the created events on the
available hardware resources.
HWBP does things completely different and reserves a slot over all CPUs
for everything, thus stuff completely falls apart.
More information about the Linuxppc-dev
mailing list