Re: perf events ring buffer memory barrier on powerpc

2013-10-29 Thread Vince Weaver
On Tue, 29 Oct 2013, Peter Zijlstra wrote: > On Tue, Oct 29, 2013 at 11:21:31AM +0100, Peter Zijlstra wrote: > --- linux-2.6.orig/include/uapi/linux/perf_event.h > +++ linux-2.6/include/uapi/linux/perf_event.h > @@ -479,13 +479,15 @@ struct perf_event_mmap_page { > /* >* Control data

Re: [PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-08-11 Thread Vince Weaver
On Mon, 12 Aug 2013, Michael Ellerman wrote: > > Yes I think so. The interface is already defined and it's little endian, > so on big endian we just need to swap. > > The only part I'm not clear on is how things are handled in perf > userspace, it seems to already do some byte swapping. It would

Re: [PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-08-10 Thread Vince Weaver
On Sat, 10 Aug 2013, Sukadev Bhattiprolu wrote: > > include/uapi/linux/perf_event.h | 55 > +++ > 1 files changed, 55 insertions(+), 0 deletions(-) > +#define __PERF_LE1234 > +#define __PERF_BE4321 > + > +#if defined(__KERNEL__) I could be wrong,

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-07-11 Thread Vince Weaver
On Thu, 11 Jul 2013, Will Deacon wrote: > On Tue, Jul 09, 2013 at 04:05:30PM +0100, Vince Weaver wrote: > > libpfm4 uses the > >CPU part : 0xc09 > > line in /proc/cpuinfo on ARM, and that's enough for the processors PAPI > > The CPU part you cite is actua

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-07-10 Thread Vince Weaver
On Wed, 10 Jul 2013, Ingo Molnar wrote: > Exactly - PMUs enumerated in /sys should be self-identifying, it's a > hardware topology after all ... > > Anytime userspace is forced to look into /proc, or into weird places in > /sys it's a FAIL really. well on x86 you have to look at /proc/cpuinfo

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-07-09 Thread Vince Weaver
On Tue, 9 Jul 2013, Michael Ellerman wrote: > On Mon, Jul 08, 2013 at 10:24:34PM -0400, Vince Weaver wrote: > > why is it a hack to use cpuid? > > Because you're assuming that the PMU the kernel has exposed is for the > cpu you happen to be executing on. > > But the

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-07-09 Thread Vince Weaver
On Tue, 9 Jul 2013, Peter Zijlstra wrote: > On Mon, Jul 08, 2013 at 10:24:34PM -0400, Vince Weaver wrote: > > > > So something like they have on ARM? > > > > vince@pandaboard:/sys/bus/event_source/devices$ ls -l > > lrwxrwxrwx 1 root root 0 Jul 8 21:57 ARMv7 C

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-07-08 Thread Vince Weaver
ously just detect what processor you're on with > cpuid or whatever, but it's a bit of a hack. And that really doesn't > work for non-cpu PMUs. why is it a hack to use cpuid? People have done event lists in userspace for years. Why must it be the kernel's job? Vince Weav

Re: [PATCH v2 2/2] perf tools: Make Power7 events available for perf

2013-06-25 Thread Vince Weaver
On Tue, 25 Jun 2013, Runzhen Wang wrote: > This patch makes all the POWER7 events available in sysfs. > > ... > > $ size arch/powerpc/perf/power7-pmu.o >text data bss dec hex filename >3073 2720 0579316a1 arch/powerpc/perf/power7-pmu.o > > and