Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Anshuman Khandual
On 05/22/2013 05:53 PM, Stephane Eranian wrote: > Hi, > > > > On Wed, May 22, 2013 at 8:43 AM, Anshuman Khandual > wrote: >> On 05/21/2013 07:25 PM, Stephane Eranian wrote: >>> On Thu, May 16, 2013 at 12:15 PM, Michael Neuling wrote: Peter Zijlstra wrote: > On Wed, May 15, 2013

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Stephane Eranian
Hi, On Wed, May 22, 2013 at 8:43 AM, Anshuman Khandual wrote: > On 05/21/2013 07:25 PM, Stephane Eranian wrote: >> On Thu, May 16, 2013 at 12:15 PM, Michael Neuling wrote: >>> Peter Zijlstra wrote: >>> On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: > On Fri, May

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Anshuman Khandual
On 05/21/2013 07:25 PM, Stephane Eranian wrote: > On Thu, May 16, 2013 at 12:15 PM, Michael Neuling wrote: >> Peter Zijlstra wrote: >> >>> On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra wrote: > We should always

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Anshuman Khandual
On 05/21/2013 07:25 PM, Stephane Eranian wrote: On Thu, May 16, 2013 at 12:15 PM, Michael Neuling mi...@neuling.org wrote: Peter Zijlstra pet...@infradead.org wrote: On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Stephane Eranian
Hi, On Wed, May 22, 2013 at 8:43 AM, Anshuman Khandual khand...@linux.vnet.ibm.com wrote: On 05/21/2013 07:25 PM, Stephane Eranian wrote: On Thu, May 16, 2013 at 12:15 PM, Michael Neuling mi...@neuling.org wrote: Peter Zijlstra pet...@infradead.org wrote: On Wed, May 15, 2013 at 03:37:22PM

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Anshuman Khandual
On 05/22/2013 05:53 PM, Stephane Eranian wrote: Hi, On Wed, May 22, 2013 at 8:43 AM, Anshuman Khandual khand...@linux.vnet.ibm.com wrote: On 05/21/2013 07:25 PM, Stephane Eranian wrote: On Thu, May 16, 2013 at 12:15 PM, Michael Neuling mi...@neuling.org wrote: Peter Zijlstra

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-21 Thread Stephane Eranian
On Thu, May 16, 2013 at 12:15 PM, Michael Neuling wrote: > Peter Zijlstra wrote: > >> On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: >> > On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra >> > wrote: >> > > We should always have proper privileges when requesting kernel data. >>

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-21 Thread Stephane Eranian
On Tue, May 21, 2013 at 10:50 AM, Peter Zijlstra wrote: > On Tue, May 21, 2013 at 03:41:35PM +1000, Michael Neuling wrote: >> Peter Zijlstra wrote: >> >> Can we add your signed-off-by on this? >> >> We are cleaning up our series for conditional branches and would like to >> add this as part of

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-21 Thread Peter Zijlstra
On Tue, May 21, 2013 at 03:41:35PM +1000, Michael Neuling wrote: > Peter Zijlstra wrote: > > Can we add your signed-off-by on this? > > We are cleaning up our series for conditional branches and would like to > add this as part of the post. Sure, but its completely untested.. I was hoping

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-21 Thread Peter Zijlstra
On Tue, May 21, 2013 at 03:41:35PM +1000, Michael Neuling wrote: Peter Zijlstra pet...@infradead.org wrote: Can we add your signed-off-by on this? We are cleaning up our series for conditional branches and would like to add this as part of the post. Sure, but its completely untested.. I

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-21 Thread Stephane Eranian
On Tue, May 21, 2013 at 10:50 AM, Peter Zijlstra pet...@infradead.org wrote: On Tue, May 21, 2013 at 03:41:35PM +1000, Michael Neuling wrote: Peter Zijlstra pet...@infradead.org wrote: Can we add your signed-off-by on this? We are cleaning up our series for conditional branches and would

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-21 Thread Stephane Eranian
On Thu, May 16, 2013 at 12:15 PM, Michael Neuling mi...@neuling.org wrote: Peter Zijlstra pet...@infradead.org wrote: On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra a.p.zijls...@chello.nl wrote: We should always have

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-20 Thread Michael Neuling
Peter Zijlstra wrote: > On Thu, May 16, 2013 at 05:36:11PM +0200, Stephane Eranian wrote: > > On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra > > wrote: > > > On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: > > >> Peter, > > >> > > >> BTW PowerPC also has the ability to filter

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-20 Thread Michael Neuling
Peter Zijlstra pet...@infradead.org wrote: On Thu, May 16, 2013 at 05:36:11PM +0200, Stephane Eranian wrote: On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: Peter, BTW PowerPC also has

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Stephane Eranian
On Sat, May 18, 2013 at 12:14 AM, Michael Neuling wrote: > Stephane Eranian wrote: > >> On Fri, May 17, 2013 at 1:39 PM, Peter Zijlstra wrote: >> > On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: >> >> Peter Zijlstra wrote: >> > >> >> > Wouldn't it be mostly conditional

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Michael Neuling
Stephane Eranian wrote: > On Fri, May 17, 2013 at 1:39 PM, Peter Zijlstra wrote: > > On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: > >> Peter Zijlstra wrote: > > > >> > Wouldn't it be mostly conditional branches that are the primary control > >> > flow > >> > and can get

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Stephane Eranian
On Fri, May 17, 2013 at 1:39 PM, Peter Zijlstra wrote: > On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: >> Peter Zijlstra wrote: > >> > Wouldn't it be mostly conditional branches that are the primary control >> > flow >> > and can get predicted wrong? I mean, I'm sure someone

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Peter Zijlstra
On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: > Peter Zijlstra wrote: > > Wouldn't it be mostly conditional branches that are the primary control flow > > and can get predicted wrong? I mean, I'm sure someone will miss-predict an > > unconditional branch but its not like we

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Michael Neuling
Peter Zijlstra wrote: > On Thu, May 16, 2013 at 05:36:11PM +0200, Stephane Eranian wrote: > > On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra > > wrote: > > > On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: > > >> Peter, > > >> > > >> BTW PowerPC also has the ability to filter

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Peter Zijlstra
On Thu, May 16, 2013 at 05:36:11PM +0200, Stephane Eranian wrote: > On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra wrote: > > On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: > >> Peter, > >> > >> BTW PowerPC also has the ability to filter on conditional branches. Any > >>

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Peter Zijlstra
On Thu, May 16, 2013 at 05:36:11PM +0200, Stephane Eranian wrote: On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: Peter, BTW PowerPC also has the ability to filter on conditional branches. Any

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Michael Neuling
Peter Zijlstra pet...@infradead.org wrote: On Thu, May 16, 2013 at 05:36:11PM +0200, Stephane Eranian wrote: On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: Peter, BTW PowerPC also has

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Peter Zijlstra
On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: Peter Zijlstra pet...@infradead.org wrote: Wouldn't it be mostly conditional branches that are the primary control flow and can get predicted wrong? I mean, I'm sure someone will miss-predict an unconditional branch but its

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Stephane Eranian
On Fri, May 17, 2013 at 1:39 PM, Peter Zijlstra pet...@infradead.org wrote: On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: Peter Zijlstra pet...@infradead.org wrote: Wouldn't it be mostly conditional branches that are the primary control flow and can get predicted

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Michael Neuling
Stephane Eranian eran...@google.com wrote: On Fri, May 17, 2013 at 1:39 PM, Peter Zijlstra pet...@infradead.org wrote: On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: Peter Zijlstra pet...@infradead.org wrote: Wouldn't it be mostly conditional branches that are the

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-17 Thread Stephane Eranian
On Sat, May 18, 2013 at 12:14 AM, Michael Neuling mi...@neuling.org wrote: Stephane Eranian eran...@google.com wrote: On Fri, May 17, 2013 at 1:39 PM, Peter Zijlstra pet...@infradead.org wrote: On Fri, May 17, 2013 at 09:32:08PM +1000, Michael Neuling wrote: Peter Zijlstra

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Stephane Eranian
On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra wrote: > On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: >> Peter, >> >> BTW PowerPC also has the ability to filter on conditional branches. Any >> chance we could add something like the follow to perf also? >> > > I don't see an

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Peter Zijlstra
On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: > Peter, > > BTW PowerPC also has the ability to filter on conditional branches. Any > chance we could add something like the follow to perf also? > I don't see an immediate problem with that except that we on x86 need to

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Michael Neuling
Peter Zijlstra wrote: > On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: > > On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra > > wrote: > > > We should always have proper privileges when requesting kernel data. > > > > > > Cc: Andi Kleen > > > Cc: eran...@google.com > > >

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Michael Neuling
Peter Zijlstra wrote: > On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: > > On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra > > wrote: > > > We should always have proper privileges when requesting kernel data. > > > > > > Cc: Andi Kleen > > > Cc: eran...@google.com > > >

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Peter Zijlstra
On Thu, May 16, 2013 at 11:09:16AM +0200, Peter Zijlstra wrote: > How about something like the below? It also adds the branch flags Mikey wanted > for PowerPC. The asymmetry is unfortunate, but I think its more useful to have the from kernel branch target than it is not to have it. This way you

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Peter Zijlstra
On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: > On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra wrote: > > We should always have proper privileges when requesting kernel data. > > > > Cc: Andi Kleen > > Cc: eran...@google.com > > Signed-off-by: Peter Zijlstra > > Link:

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Peter Zijlstra
On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra a.p.zijls...@chello.nl wrote: We should always have proper privileges when requesting kernel data. Cc: Andi Kleen a...@linux.intel.com Cc: eran...@google.com Signed-off-by:

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Peter Zijlstra
On Thu, May 16, 2013 at 11:09:16AM +0200, Peter Zijlstra wrote: How about something like the below? It also adds the branch flags Mikey wanted for PowerPC. The asymmetry is unfortunate, but I think its more useful to have the from kernel branch target than it is not to have it. This way you at

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Michael Neuling
Peter Zijlstra pet...@infradead.org wrote: On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra a.p.zijls...@chello.nl wrote: We should always have proper privileges when requesting kernel data. Cc: Andi Kleen

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Michael Neuling
Peter Zijlstra pet...@infradead.org wrote: On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra a.p.zijls...@chello.nl wrote: We should always have proper privileges when requesting kernel data. Cc: Andi Kleen

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Peter Zijlstra
On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: Peter, BTW PowerPC also has the ability to filter on conditional branches. Any chance we could add something like the follow to perf also? I don't see an immediate problem with that except that we on x86 need to implement

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-16 Thread Stephane Eranian
On Thu, May 16, 2013 at 1:16 PM, Peter Zijlstra pet...@infradead.org wrote: On Thu, May 16, 2013 at 08:15:17PM +1000, Michael Neuling wrote: Peter, BTW PowerPC also has the ability to filter on conditional branches. Any chance we could add something like the follow to perf also? I don't

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-15 Thread Peter Zijlstra
On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: > On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra wrote: > > We should always have proper privileges when requesting kernel data. > > > > Cc: Andi Kleen > > Cc: eran...@google.com > > Signed-off-by: Peter Zijlstra > > Link:

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-15 Thread Stephane Eranian
On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra wrote: > We should always have proper privileges when requesting kernel data. > > Cc: Andi Kleen > Cc: eran...@google.com > Signed-off-by: Peter Zijlstra > Link: http://lkml.kernel.org/n/tip-v0x9ky3ahzr6nm3c6ilwr...@git.kernel.org > --- >

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-15 Thread Stephane Eranian
On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra a.p.zijls...@chello.nl wrote: We should always have proper privileges when requesting kernel data. Cc: Andi Kleen a...@linux.intel.com Cc: eran...@google.com Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl Link:

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-15 Thread Peter Zijlstra
On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra a.p.zijls...@chello.nl wrote: We should always have proper privileges when requesting kernel data. Cc: Andi Kleen a...@linux.intel.com Cc: eran...@google.com Signed-off-by:

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-03 Thread Andi Kleen
On Fri, May 03, 2013 at 02:11:25PM +0200, Peter Zijlstra wrote: > We should always have proper privileges when requesting kernel data. > > Cc: Andi Kleen Acked-by: Andi Kleen > --- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c > +++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c > @@ -318,8

[PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-03 Thread Peter Zijlstra
We should always have proper privileges when requesting kernel data. Cc: Andi Kleen Cc: eran...@google.com Signed-off-by: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-v0x9ky3ahzr6nm3c6ilwr...@git.kernel.org --- arch/x86/kernel/cpu/perf_event_intel_lbr.c |5 - 1 file changed, 4

[PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-03 Thread Peter Zijlstra
We should always have proper privileges when requesting kernel data. Cc: Andi Kleen a...@linux.intel.com Cc: eran...@google.com Signed-off-by: Peter Zijlstra a.p.zijls...@chello.nl Link: http://lkml.kernel.org/n/tip-v0x9ky3ahzr6nm3c6ilwr...@git.kernel.org ---

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-03 Thread Andi Kleen
On Fri, May 03, 2013 at 02:11:25PM +0200, Peter Zijlstra wrote: We should always have proper privileges when requesting kernel data. Cc: Andi Kleen a...@linux.intel.com Acked-by: Andi Kleen a...@linux.intel.com --- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c +++