Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-03-11 Thread Jan Glauber
On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: [...] > > +int thunder_uncore_event_init(struct perf_event *event) > > +{ > > + struct hw_perf_event *hwc = >hw; > > + struct thunder_uncore *uncore; > > + > > + if

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-03-11 Thread Jan Glauber
On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: [...] > > +int thunder_uncore_event_init(struct perf_event *event) > > +{ > > + struct hw_perf_event *hwc = >hw; > > + struct thunder_uncore *uncore; > > + > > + if

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-16 Thread Jan Glauber
On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > > Provide uncore facilities for non-CPU performance counter units. > > Based on Intel/AMD uncore pmu support. > > > > The uncore PMUs can be found under

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-16 Thread Jan Glauber
On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > > Provide uncore facilities for non-CPU performance counter units. > > Based on Intel/AMD uncore pmu support. > > > > The uncore PMUs can be found under

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Jan Glauber
On Mon, Feb 15, 2016 at 02:27:27PM +, Mark Rutland wrote: > > > > 1) The PMU detection solely relies on PCI device detection. If a > > > >matching PCI device is found the PMU is created. The code can deal > > > >with multiple units of the same type, e.g. more than one memory > > > >

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Jan Glauber
On Mon, Feb 15, 2016 at 02:27:27PM +, Mark Rutland wrote: > > > > 1) The PMU detection solely relies on PCI device detection. If a > > > >matching PCI device is found the PMU is created. The code can deal > > > >with multiple units of the same type, e.g. more than one memory > > > >

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Mark Rutland
On Mon, Feb 15, 2016 at 02:27:27PM +, Mark Rutland wrote: > > > > + uncore = event_to_thunder_uncore(event); > > > > + if (!uncore) > > > > + return -ENODEV; > > > > + if (!uncore->event_valid(event->attr.config)) > > > > + return -EINVAL; > > > >

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Mark Rutland
On Mon, Feb 15, 2016 at 02:27:27PM +, Mark Rutland wrote: > > > > + uncore = event_to_thunder_uncore(event); > > > > + if (!uncore) > > > > + return -ENODEV; > > > > + if (!uncore->event_valid(event->attr.config)) > > > > + return -EINVAL; > > > >

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Jan Glauber
Hi Mark, thanks for reviewing! I'll need several mails to address all questions. On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > > Provide uncore facilities for non-CPU performance counter units. > > Based on

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Jan Glauber
Hi Mark, thanks for reviewing! I'll need several mails to address all questions. On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > > Provide uncore facilities for non-CPU performance counter units. > > Based on

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Mark Rutland
On Mon, Feb 15, 2016 at 03:07:20PM +0100, Jan Glauber wrote: > Hi Mark, > > thanks for reviewing! I'll need several mails to address all questions. > > On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > > > Provide

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Mark Rutland
On Mon, Feb 15, 2016 at 03:07:20PM +0100, Jan Glauber wrote: > Hi Mark, > > thanks for reviewing! I'll need several mails to address all questions. > > On Fri, Feb 12, 2016 at 05:36:59PM +, Mark Rutland wrote: > > On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > > > Provide

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Mark Rutland
On Fri, Feb 12, 2016 at 05:47:25PM -0800, David Daney wrote: > On 02/12/2016 09:36 AM, Mark Rutland wrote: > >On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > [...] > >>2) Counters are summarized across the different units of the same type, > >>e.g. L2C TAD 0..7 is presented as a

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-15 Thread Mark Rutland
On Fri, Feb 12, 2016 at 05:47:25PM -0800, David Daney wrote: > On 02/12/2016 09:36 AM, Mark Rutland wrote: > >On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > [...] > >>2) Counters are summarized across the different units of the same type, > >>e.g. L2C TAD 0..7 is presented as a

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-12 Thread David Daney
On 02/12/2016 09:36 AM, Mark Rutland wrote: On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: [...] 2) Counters are summarized across the different units of the same type, e.g. L2C TAD 0..7 is presented as a single counter (adding the values from TAD 0 to 7). Although losing

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-12 Thread Mark Rutland
On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > Provide uncore facilities for non-CPU performance counter units. > Based on Intel/AMD uncore pmu support. > > The uncore PMUs can be found under /sys/bus/event_source/devices. > All counters are exported via sysfs in the corresponding

[RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-12 Thread Jan Glauber
Provide uncore facilities for non-CPU performance counter units. Based on Intel/AMD uncore pmu support. The uncore PMUs can be found under /sys/bus/event_source/devices. All counters are exported via sysfs in the corresponding events files under the PMU directory so the perf tool can list the

[RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-12 Thread Jan Glauber
Provide uncore facilities for non-CPU performance counter units. Based on Intel/AMD uncore pmu support. The uncore PMUs can be found under /sys/bus/event_source/devices. All counters are exported via sysfs in the corresponding events files under the PMU directory so the perf tool can list the

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-12 Thread Mark Rutland
On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: > Provide uncore facilities for non-CPU performance counter units. > Based on Intel/AMD uncore pmu support. > > The uncore PMUs can be found under /sys/bus/event_source/devices. > All counters are exported via sysfs in the corresponding

Re: [RFC PATCH 1/7] arm64/perf: Basic uncore counter support for Cavium ThunderX

2016-02-12 Thread David Daney
On 02/12/2016 09:36 AM, Mark Rutland wrote: On Fri, Feb 12, 2016 at 05:55:06PM +0100, Jan Glauber wrote: [...] 2) Counters are summarized across the different units of the same type, e.g. L2C TAD 0..7 is presented as a single counter (adding the values from TAD 0 to 7). Although losing