[PATCH 08/10] perf, tools: Expand PMU events by prefix match

2016-11-18 Thread Andi Kleen
From: Andi Kleen When the user specifies a pmu directly, expand it automatically with a prefix match, similar as we do for the normal aliases now. This allows to specify attributes for duplicated boxes quickly. For example uncore_cbox_{0,6}/.../ can be now specified as cbox/.../ and it gets auto

Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match

2016-10-17 Thread Jiri Olsa
On Mon, Oct 17, 2016 at 09:56:42AM -0700, Andi Kleen wrote: > > so there's a special treatment for uncore events, > > what if user says 'uncore_box/..' then? > > It should work. There's nothing special for uncore later, this > is just for convenience so that I have less to type. really.. 'uncor

Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match

2016-10-17 Thread Andi Kleen
> so there's a special treatment for uncore events, > what if user says 'uncore_box/..' then? It should work. There's nothing special for uncore later, this is just for convenience so that I have less to type. > > + if (!strncmp($1, name, strlen($1))) { > > +

Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match

2016-10-17 Thread Jiri Olsa
On Thu, Oct 13, 2016 at 02:15:30PM -0700, Andi Kleen wrote: SNIP > diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y > index 3a5196380609..790f0dd598b9 100644 > --- a/tools/perf/util/parse-events.y > +++ b/tools/perf/util/parse-events.y > @@ -224,11 +224,34 @@ event_pmu

Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match

2016-10-17 Thread Jiri Olsa
On Thu, Oct 13, 2016 at 02:15:30PM -0700, Andi Kleen wrote: > From: Andi Kleen > > When the user specifies a pmu directly, expand it automatically > with a prefix match, similar as we do for the normal aliases now. > > This allows to specify attributes for duplicated boxes quickly. > For example

[PATCH 08/10] perf, tools: Expand PMU events by prefix match

2016-10-13 Thread Andi Kleen
From: Andi Kleen When the user specifies a pmu directly, expand it automatically with a prefix match, similar as we do for the normal aliases now. This allows to specify attributes for duplicated boxes quickly. For example uncore_cbox_{0,8}/.../ can be now specified as cbox/.../ and it gets auto