Re: Invalid perf_branch_entry.to entries question

2013-05-10 Thread Benjamin Herrenschmidt
On Fri, 2013-05-10 at 20:50 +1000, Michael Neuling wrote: > The buffer is in the core (not main memory) and hence only has limited > entries. So skipping entries that can hopefully be determined in > other ways means we can log more branches. > > That being said, it's a PITA for the kernel ;-) I

Re: Invalid perf_branch_entry.to entries question

2013-05-10 Thread Michael Neuling
On Fri, May 10, 2013 at 8:43 PM, Peter Zijlstra wrote: > On Thu, May 09, 2013 at 08:39:15AM +1000, Michael Neuling wrote: >> > Just because I'm curious.. however does that happen? Surely the CPU >> > knows where next to fetch instructions? >> >> For computed gotos (ie. branch to a register value),

Re: Invalid perf_branch_entry.to entries question

2013-05-10 Thread Peter Zijlstra
On Thu, May 09, 2013 at 08:39:15AM +1000, Michael Neuling wrote: > > Just because I'm curious.. however does that happen? Surely the CPU > > knows where next to fetch instructions? > > For computed gotos (ie. branch to a register value), the hardware gives > you the from and to address in the bran

Re: Invalid perf_branch_entry.to entries question

2013-05-08 Thread Michael Ellerman
On Thu, 2013-05-09 at 08:45 +1000, Michael Neuling wrote: > Stephane Eranian wrote: > > > On Wed, May 8, 2013 at 5:59 PM, Peter Zijlstra wrote: > > > On Tue, May 07, 2013 at 11:35:28AM +1000, Michael Neuling wrote: > > >> Peter & Stephane, > > >> > > >> We are plumbing the POWER8 Branch History

Re: Invalid perf_branch_entry.to entries question

2013-05-08 Thread Michael Neuling
Stephane Eranian wrote: > On Wed, May 8, 2013 at 5:59 PM, Peter Zijlstra wrote: > > On Tue, May 07, 2013 at 11:35:28AM +1000, Michael Neuling wrote: > >> Peter & Stephane, > >> > >> We are plumbing the POWER8 Branch History Rolling Buffer (BHRB) into > >> struct perf_branch_entry. > >> > >> Some

Re: Invalid perf_branch_entry.to entries question

2013-05-08 Thread Michael Neuling
Peter Zijlstra wrote: > On Tue, May 07, 2013 at 11:35:28AM +1000, Michael Neuling wrote: > > Peter & Stephane, > > > > We are plumbing the POWER8 Branch History Rolling Buffer (BHRB) into > > struct perf_branch_entry. > > > > Sometimes on POWER8 we may not be able to fill out the "to" address.

Re: Invalid perf_branch_entry.to entries question

2013-05-08 Thread Stephane Eranian
On Wed, May 8, 2013 at 5:59 PM, Peter Zijlstra wrote: > On Tue, May 07, 2013 at 11:35:28AM +1000, Michael Neuling wrote: >> Peter & Stephane, >> >> We are plumbing the POWER8 Branch History Rolling Buffer (BHRB) into >> struct perf_branch_entry. >> >> Sometimes on POWER8 we may not be able to fill

Re: Invalid perf_branch_entry.to entries question

2013-05-08 Thread Peter Zijlstra
On Tue, May 07, 2013 at 11:35:28AM +1000, Michael Neuling wrote: > Peter & Stephane, > > We are plumbing the POWER8 Branch History Rolling Buffer (BHRB) into > struct perf_branch_entry. > > Sometimes on POWER8 we may not be able to fill out the "to" address. Just because I'm curious.. however

Invalid perf_branch_entry.to entries question

2013-05-06 Thread Michael Neuling
Peter & Stephane, We are plumbing the POWER8 Branch History Rolling Buffer (BHRB) into struct perf_branch_entry. Sometimes on POWER8 we may not be able to fill out the "to" address. We initially thought of just making this 0, but it's feasible that this could be a valid address to branch to. T