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 actually A9-specific, so you probably want

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

2013-07-11 Thread Will Deacon
On Tue, Jul 09, 2013 at 04:05:30PM +0100, Vince Weaver wrote: > 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 > > > lr

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

2013-07-10 Thread Michael Ellerman
On Thu, Jul 11, 2013 at 12:42:31AM -0400, Vince Weaver wrote: > 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

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-10 Thread Ingo Molnar
* Michael Ellerman wrote: > On Tue, Jul 09, 2013 at 10:14:34AM +0200, 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 roo

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

2013-07-09 Thread Michael Ellerman
On Tue, Jul 09, 2013 at 10:14:34AM +0200, 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 Cortex-A9 -> >

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

2013-07-09 Thread Michael Ellerman
On Tue, Jul 09, 2013 at 11:20:50AM -0400, Vince Weaver wrote: > 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 > > c

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 real issue is with PMUs that

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 Cortex-A9 -> > > ../../../devices/A

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

2013-07-09 Thread Peter Zijlstra
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 Cortex-A9 -> > ../../../devices/ARMv7 Cortex-A9 > lrwxrwxrwx 1 root root 0 Jul 8 21:57 br

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

2013-07-08 Thread Vince Weaver
On Tue, 9 Jul 2013, Michael Ellerman wrote: > On Thu, Jul 04, 2013 at 02:57:00PM +0200, Peter Zijlstra wrote: > > > > Right; I think Stephane and Jiri are in favour of creating a 'new' project > > that > > includes just the event definitions in a plain text format and a little > > library > > w

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

2013-07-08 Thread Michael Ellerman
On Mon, Jul 08, 2013 at 10:24:34PM -0400, Vince Weaver wrote: > On Tue, 9 Jul 2013, Michael Ellerman wrote: > > > On Thu, Jul 04, 2013 at 02:57:00PM +0200, Peter Zijlstra wrote: > > > > > > Right; I think Stephane and Jiri are in favour of creating a 'new' > > > project that > > > includes just

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

2013-07-08 Thread Michael Ellerman
On Thu, Jul 04, 2013 at 02:57:00PM +0200, Peter Zijlstra wrote: > On Thu, Jul 04, 2013 at 10:52:18PM +1000, Michael Ellerman wrote: > > I don't think it even needs libpfm4, just some csv files in tools/perf > > would do the trick. > > Right; I think Stephane and Jiri are in favour of creating a 'n

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

2013-07-05 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Thu, Jul 04, 2013 at 10:52:18PM +1000, Michael Ellerman wrote: > > I don't think it even needs libpfm4, just some csv files in tools/perf > > would do the trick. > > Right; I think Stephane and Jiri are in favour of creating a 'new' > project that includes just the

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

2013-07-04 Thread Peter Zijlstra
On Thu, Jul 04, 2013 at 10:52:18PM +1000, Michael Ellerman wrote: > I don't think it even needs libpfm4, just some csv files in tools/perf > would do the trick. Right; I think Stephane and Jiri are in favour of creating a 'new' project that includes just the event definitions in a plain text forma

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

2013-07-04 Thread Michael Ellerman
On Tue, Jun 25, 2013 at 12:46:42PM -0400, Vince Weaver wrote: > 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 > >textdata bss dec hex filename > >3073

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

2013-06-27 Thread Michael Ellerman
On Tue, Jun 25, 2013 at 10:35:33PM +0800, Runzhen Wang wrote: > Power7 supports over 530 different perf events but only a small > subset of these can be specified by name, for the remaining > events, we must specify them by their raw code: Hi Runzhen, This is looking good. Sorry one last request

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

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

2013-06-25 Thread Runzhen Wang
Power7 supports over 530 different perf events but only a small subset of these can be specified by name, for the remaining events, we must specify them by their raw code: perf stat -e r2003c This patch makes all the POWER7 events available in sysfs. So we can instead specify these as: