Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-05 Thread Jiri Olsa
On Mon, Mar 05, 2018 at 03:10:43PM -0500, Agustin Vega-Frias wrote: > On 2018-03-05 14:09, Jiri Olsa wrote: > > On Mon, Mar 05, 2018 at 10:08:18AM -0500, Agustin Vega-Frias wrote: > > > On 2018-03-04 13:10, Jiri Olsa wrote: > > > > On Sun, Mar 04, 2018 at 09:12:45AM -0800, Andi Kleen wrote: > > > >

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-05 Thread Agustin Vega-Frias
On 2018-03-05 14:09, Jiri Olsa wrote: On Mon, Mar 05, 2018 at 10:08:18AM -0500, Agustin Vega-Frias wrote: On 2018-03-04 13:10, Jiri Olsa wrote: > On Sun, Mar 04, 2018 at 09:12:45AM -0800, Andi Kleen wrote: > > > > +#include > > > > #include > > > > #include > > > > #include > > > > @@ -24

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-05 Thread Jiri Olsa
On Mon, Mar 05, 2018 at 10:08:18AM -0500, Agustin Vega-Frias wrote: > On 2018-03-04 13:10, Jiri Olsa wrote: > > On Sun, Mar 04, 2018 at 09:12:45AM -0800, Andi Kleen wrote: > > > > > +#include > > > > > #include > > > > > #include > > > > > #include > > > > > @@ -241,7 +242,7 @@ PE_NAME opt_e

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-05 Thread Andi Kleen
Agustin Vega-Frias writes: > > An option to keep backward compatibility and consistency would be > to wrap the pattern/string passed in *'s, that way we can just use > fnmatch and have all the examples Jiri brought up work the same. > With that in place we can actually also drop the explicit ignor

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-05 Thread Agustin Vega-Frias
On 2018-03-04 13:10, Jiri Olsa wrote: On Sun, Mar 04, 2018 at 09:12:45AM -0800, Andi Kleen wrote: > > +#include > > #include > > #include > > #include > > @@ -241,7 +242,7 @@ PE_NAME opt_event_config > > if (!strncmp(name, "uncore_", 7) && > >

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-04 Thread Jiri Olsa
On Sun, Mar 04, 2018 at 09:12:45AM -0800, Andi Kleen wrote: > > > +#include > > > #include > > > #include > > > #include > > > @@ -241,7 +242,7 @@ PE_NAME opt_event_config > > > if (!strncmp(name, "uncore_", 7) && > > > strncmp($1, "uncore_", 7)) > > >

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-04 Thread Andi Kleen
> > +#include > > #include > > #include > > #include > > @@ -241,7 +242,7 @@ PE_NAME opt_event_config > > if (!strncmp(name, "uncore_", 7) && > > strncmp($1, "uncore_", 7)) > > name += 7; > > - if (!str

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-03 Thread Jiri Olsa
On Fri, Mar 02, 2018 at 06:41:30PM -0500, Agustin Vega-Frias wrote: SNIP > > diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l > index 655ecff..a1a01b1 100644 > --- a/tools/perf/util/parse-events.l > +++ b/tools/perf/util/parse-events.l > @@ -175,7 +175,7 @@ bpf_source

[RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-02 Thread Agustin Vega-Frias
Starting on v4.12 event parsing code for dynamic pmu events already supports prefix-based matching of multiple pmus when creating dynamic events. E.g., in a system with the following dynamic pmus: mypmu_0 mypmu_1 mypmu_2 mypmu_4 passing mypmu// as an event spec will result in the