Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-16 Thread Mark Rutland
On Fri, Nov 11, 2016 at 04:52:35PM -0500, Leeder, Neil wrote: > So is there a use-case for individual uncore PMUs when they can't be > used in task mode or per-cpu? > > The main (only?) use will be in system mode, in which case surely it > makes sense to provide a single aggregated count? If you

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-16 Thread Mark Rutland
On Fri, Nov 11, 2016 at 04:52:35PM -0500, Leeder, Neil wrote: > So is there a use-case for individual uncore PMUs when they can't be > used in task mode or per-cpu? > > The main (only?) use will be in system mode, in which case surely it > makes sense to provide a single aggregated count? If you

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-11 Thread Leeder, Neil
Hi Will, On 11/9/2016 1:16 PM, Will Deacon wrote: On Wed, Nov 09, 2016 at 05:54:13PM +, Mark Rutland wrote: On Fri, Oct 28, 2016 at 04:50:13PM -0400, Neil Leeder wrote: + struct perf_event *events[MAX_L2_CTRS]; + struct l2cache_pmu *l2cache_pmu; +

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-11 Thread Leeder, Neil
Hi Will, On 11/9/2016 1:16 PM, Will Deacon wrote: On Wed, Nov 09, 2016 at 05:54:13PM +, Mark Rutland wrote: On Fri, Oct 28, 2016 at 04:50:13PM -0400, Neil Leeder wrote: + struct perf_event *events[MAX_L2_CTRS]; + struct l2cache_pmu *l2cache_pmu; +

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-11 Thread Mark Rutland
On Thu, Nov 10, 2016 at 06:25:47PM -0500, Leeder, Neil wrote: > On 11/9/2016 12:54 PM, Mark Rutland wrote: > >>+ > >>+/* > >>+ * The cache is made up of one or more clusters, each cluster has its own > >>PMU. > >>+ * Each cluster is associated with one or more CPUs. > >>+ * This structure

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-11 Thread Mark Rutland
On Thu, Nov 10, 2016 at 06:25:47PM -0500, Leeder, Neil wrote: > On 11/9/2016 12:54 PM, Mark Rutland wrote: > >>+ > >>+/* > >>+ * The cache is made up of one or more clusters, each cluster has its own > >>PMU. > >>+ * Each cluster is associated with one or more CPUs. > >>+ * This structure

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-10 Thread Leeder, Neil
Hi Mark, Thanks for the review. I'll handle all the syntactic comments, so I won't reply to them all individually here. For the aggregation, I'll reply separately to Will's post to keep all those comments together. On 11/9/2016 12:54 PM, Mark Rutland wrote: + +/* + * The cache is made up of

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-10 Thread Leeder, Neil
Hi Mark, Thanks for the review. I'll handle all the syntactic comments, so I won't reply to them all individually here. For the aggregation, I'll reply separately to Will's post to keep all those comments together. On 11/9/2016 12:54 PM, Mark Rutland wrote: + +/* + * The cache is made up of

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-09 Thread Will Deacon
On Wed, Nov 09, 2016 at 05:54:13PM +, Mark Rutland wrote: > On Fri, Oct 28, 2016 at 04:50:13PM -0400, Neil Leeder wrote: > > + struct perf_event *events[MAX_L2_CTRS]; > > + struct l2cache_pmu *l2cache_pmu; > > + DECLARE_BITMAP(used_counters, MAX_L2_CTRS); > > +

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-09 Thread Will Deacon
On Wed, Nov 09, 2016 at 05:54:13PM +, Mark Rutland wrote: > On Fri, Oct 28, 2016 at 04:50:13PM -0400, Neil Leeder wrote: > > + struct perf_event *events[MAX_L2_CTRS]; > > + struct l2cache_pmu *l2cache_pmu; > > + DECLARE_BITMAP(used_counters, MAX_L2_CTRS); > > +

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-09 Thread Mark Rutland
Hi Neil, Apologies for the delay in replying to this. This is looking good. I have a few specific comments and a couple of general concerns below. Will, please see the bit below about cluster/socket aggregation (grep for your name). On Fri, Oct 28, 2016 at 04:50:13PM -0400, Neil Leeder wrote:

Re: [PATCH v7] soc: qcom: add l2 cache perf events driver

2016-11-09 Thread Mark Rutland
Hi Neil, Apologies for the delay in replying to this. This is looking good. I have a few specific comments and a couple of general concerns below. Will, please see the bit below about cluster/socket aggregation (grep for your name). On Fri, Oct 28, 2016 at 04:50:13PM -0400, Neil Leeder wrote:

[PATCH v7] soc: qcom: add l2 cache perf events driver

2016-10-28 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder --- v7: Move to drivers/perf

[PATCH v7] soc: qcom: add l2 cache perf events driver

2016-10-28 Thread Neil Leeder
Adds perf events support for L2 cache PMU. The L2 cache PMU driver is named 'l2cache_0' and can be used with perf events to profile L2 events such as cache hits and misses on Qualcomm Technologies processors. Signed-off-by: Neil Leeder --- v7: Move to drivers/perf Rebased on 4.9-rc1