[PATCH v5 2/2] arm: perf: Add event descriptions

Pawel Moll pawel.moll at arm.com
Thu Oct 15 08:49:33 PDT 2015


On Thu, 2015-10-15 at 16:42 +0100, Mark Rutland wrote:
> On Thu, Oct 15, 2015 at 04:20:37PM +0100, Pawel Moll wrote:
> > On Thu, 2015-10-15 at 08:15 -0700, Drew Richardson wrote:
> > > On Thu, Oct 15, 2015 at 02:21:12PM +0100, Will Deacon wrote:
> > > > On Tue, Oct 13, 2015 at 08:36:45AM -0700, Drew Richardson wrote:
> > > > > Add additional information about the ARM architected hardware events
> > > > > to make counters self describing. This makes the hardware PMUs easier
> > > > > to use as perf list contains possible events instead of users having
> > > > > to refer to documentation like the ARM TRMs.
> > > > > 
> > > > > Signed-off-by: Drew Richardson <drew.richardson at arm.com>
> > > > > ---
> > > > >  arch/arm/kernel/perf_event_v7.c | 121 ++++++++++++++++++++++++++++++++++++++++
> > > > >  drivers/perf/arm_pmu.c          |   1 +
> > > > >  2 files changed, 122 insertions(+)
> > > > 
> > > > [...]
> > > > 
> > > > > diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c
> > > > > index 2365a32a595e..e933d2dd71c0 100644
> > > > > --- a/drivers/perf/arm_pmu.c
> > > > > +++ b/drivers/perf/arm_pmu.c
> > > > > @@ -548,6 +548,7 @@ static void armpmu_init(struct arm_pmu *armpmu)
> > > > >  		.stop		= armpmu_stop,
> > > > >  		.read		= armpmu_read,
> > > > >  		.filter_match	= armpmu_filter_match,
> > > > > +		.attr_groups	= armpmu->pmu.attr_groups,
> > > > 
> > > > I don't understand this hunk. What's it doing?
> > > 
> > > I'm not 100% clear either on what it's doing. But without this line
> > > the attr_groups don't get passed on and I don't see them on my TC2. I
> > > debugged the issue down to this but it may not be the proper way to
> > > solve the problem.
> > 
> > The perf core creates attributes passed as pmu.attr_groups
> > in /sys/bus/events/devices/<pmu>.
> 
> Sure, but the confusion here had to do with why we were re-assigning the
> field to itself rather than what the purpose of said field was.

Ah, right. Sorry. I must admit I haven't looked to the right from the =
sign...

Pawel




More information about the linux-arm-kernel mailing list