lkml.org 
[lkml]   [2020]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf tools: Add missing Intel CPU events to parser
On Wed, Mar 25, 2020 at 07:10:44PM +0200, Adrian Hunter wrote:

SNIP

> > ---
> > diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> > index 7b1c8ee537cf..347eb3e6794a 100644
> > --- a/tools/perf/util/parse-events.l
> > +++ b/tools/perf/util/parse-events.l
> > @@ -342,11 +342,15 @@ bpf-output { return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_BPF_OUT
> > * Because the prefix cycles is mixed up with cpu-cycles.
> > * loads and stores are mixed up with cache event
> > */
> > -cycles-ct { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
> > -cycles-t { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
> > -mem-loads { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
> > -mem-stores { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
> > -topdown-[a-z-]+ { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
> > +cycles-ct |
> > +cycles-t |
> > +mem-loads |
> > +mem-stores |
> > +topdown-[a-z-]+ |
> > +tx-capacity-read |
> > +tx-capacity-write |
> > +el-capacity-read |
> > +el-capacity-write { return str(yyscanner, PE_KERNEL_PMU_EVENT); }
>
> Yes that works, as does
>
> tx-capacity-[a-z-]+
> el-capacity-[a-z-]+
>
> Do we have an explanation for why we cannot make it accept 3-part names
> without handling them as special cases?

check the pmu_str_check, I guess it could be more generic,
but it gets complicated later on, so I'm not sure there's
some other obstacle..

CC-ing Kan Liang, who wrote that

jirka

>
> I just tried but it didn't work.
>

\
 
 \ /
  Last update: 2020-03-25 18:46    [W:0.082 / U:8.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site