Re: [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension

2017-10-24 Thread Kim Phillips
On Mon, 2 Oct 2017 18:35:24 -0500 Kim Phillips wrote: > On Mon, 2 Oct 2017 13:49:30 -0300 > Arnaldo Carvalho de Melo wrote: > > I'm all for more informative messages, and if you guys agree on how to > > provide the info in a way that combined with logic in evsel.c, I'd say > > do what Will sugge

Re: [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension

2017-10-03 Thread Will Deacon
On Mon, Oct 02, 2017 at 06:35:24PM -0500, Kim Phillips wrote: [trim other stuff] > Meanwhile, when I build this v5 arm_spe_pmu as a module, load it, do a > perf list, rmmod it, then re-load it, I get an Oops: > > # insmod arm_spe_pmu.ko > [ 2018.623646] arm_spe_pmu spe-pmu@0: probed for CPUs 0-3

Re: [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension

2017-10-02 Thread Kim Phillips
On Mon, 2 Oct 2017 13:49:30 -0300 Arnaldo Carvalho de Melo wrote: > Em Mon, Oct 02, 2017 at 03:14:05PM +0100, Will Deacon escreveu: > > On Fri, Sep 29, 2017 at 05:19:40PM -0500, Kim Phillips wrote: > > > On Thu, 28 Sep 2017 15:09:50 +0100 > > > Will Deacon wrote: > > > > + if (arm_spe_even

Re: [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension

2017-10-02 Thread Arnaldo Carvalho de Melo
Em Mon, Oct 02, 2017 at 03:14:05PM +0100, Will Deacon escreveu: > On Fri, Sep 29, 2017 at 05:19:40PM -0500, Kim Phillips wrote: > > On Thu, 28 Sep 2017 15:09:50 +0100 > > Will Deacon wrote: > > > + if (arm_spe_event_to_pmsevfr(event) & SYS_PMSEVFR_EL1_RES0) > > > + return -EOPNOTSUPP; > >

Re: [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension

2017-10-02 Thread Will Deacon
Hi Kim, On Fri, Sep 29, 2017 at 05:19:40PM -0500, Kim Phillips wrote: > On Thu, 28 Sep 2017 15:09:50 +0100 > Will Deacon wrote: > > > +/* Perf callbacks */ > > +static int arm_spe_pmu_event_init(struct perf_event *event) > > +{ > > + u64 reg; > > + struct perf_event_attr *attr = &event->attr

Re: [PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension

2017-09-29 Thread Kim Phillips
On Thu, 28 Sep 2017 15:09:50 +0100 Will Deacon wrote: > +/* Perf callbacks */ > +static int arm_spe_pmu_event_init(struct perf_event *event) > +{ > + u64 reg; > + struct perf_event_attr *attr = &event->attr; > + struct arm_spe_pmu *spe_pmu = to_spe_pmu(event->pmu); > + > + /* This

[PATCH v5 6/7] drivers/perf: Add support for ARMv8.2 Statistical Profiling Extension

2017-09-28 Thread Will Deacon
The ARMv8.2 architecture introduces the optional Statistical Profiling Extension (SPE). SPE can be used to profile a population of operations in the CPU pipeline after instruction decode. These are either architected instructions (i.e. a dynamic instruction trace) or CPU-specific uops and the choi