Re: powerpc/perf: hw breakpoints return ENOSPC

2012-09-27 Thread Frederic Weisbecker
2012/9/25 Michael Neuling : > Michael Neuling wrote: > >> Frederic Weisbecker wrote: >> >> > On Thu, Aug 16, 2012 at 02:23:54PM +1000, Michael Neuling wrote: >> > > Hi, >> > > >> > > I've been trying to get hardware breakpoints with perf to work on POWER7 >> > > but I'm getting the following: >>

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-09-26 Thread Jovi Zhang
On Thu, Aug 16, 2012 at 12:23 PM, Michael Neuling wrote: > Hi, > > I've been trying to get hardware breakpoints with perf to work on POWER7 > but I'm getting the following: > > % perf record -e mem:0x1000 true > > Error: sys_perf_event_open() syscall returned with 28 (No space left on >

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-09-25 Thread Michael Neuling
Michael Neuling wrote: > Frederic Weisbecker wrote: > > > On Thu, Aug 16, 2012 at 02:23:54PM +1000, Michael Neuling wrote: > > > Hi, > > > > > > I've been trying to get hardware breakpoints with perf to work on POWER7 > > > but I'm getting the following: > > > > > > % perf record -e mem:0x1

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-17 Thread Michael Neuling
Frederic Weisbecker wrote: > On Thu, Aug 16, 2012 at 02:23:54PM +1000, Michael Neuling wrote: > > Hi, > > > > I've been trying to get hardware breakpoints with perf to work on POWER7 > > but I'm getting the following: > > > > % perf record -e mem:0x1000 true > > > > Error: sys_perf_e

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-17 Thread Frederic Weisbecker
On Thu, Aug 16, 2012 at 02:23:54PM +1000, Michael Neuling wrote: > Hi, > > I've been trying to get hardware breakpoints with perf to work on POWER7 > but I'm getting the following: > > % perf record -e mem:0x1000 true > > Error: sys_perf_event_open() syscall returned with 28 (No space

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Michael Ellerman
On Thu, 2012-08-16 at 16:15 +0200, Peter Zijlstra wrote: > 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 brea

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Michael Neuling
> > > > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > > > > despite there being no breakpoint on this CPU. This is because the call > > > > the task_bp_pinned, checks all CPUs, rather than just the current CPU. > > > > POWER7 only has one hardware breakpoint per CPU (i

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Peter Zijlstra
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

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Michael Ellerman
On Thu, 2012-08-16 at 13:44 +0200, Peter Zijlstra wrote: > On Thu, 2012-08-16 at 21:17 +1000, Michael Neuling wrote: > > Peter, > > > > > > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > > > > despite there being no breakpoint on this CPU. This is because the call > >

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Peter Zijlstra
On Thu, 2012-08-16 at 21:17 +1000, Michael Neuling wrote: > Peter, > > > > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > > > despite there being no breakpoint on this CPU. This is because the call > > > the task_bp_pinned, checks all CPUs, rather than just the current

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Michael Neuling
Peter, > > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > > despite there being no breakpoint on this CPU. This is because the call > > the task_bp_pinned, checks all CPUs, rather than just the current CPU. > > POWER7 only has one hardware breakpoint per CPU (ie. HBP_N

Re: powerpc/perf: hw breakpoints return ENOSPC

2012-08-16 Thread Peter Zijlstra
On Thu, 2012-08-16 at 14:23 +1000, Michael Neuling wrote: > > On this second syscall, fetch_bp_busy_slots() sets slots.pinned to be 1, > despite there being no breakpoint on this CPU. This is because the call > the task_bp_pinned, checks all CPUs, rather than just the current CPU. > POWER7 only h