[PATCH 03/10] perf, tools: Add support for parsing uncore json files

2016-11-18 Thread Andi Kleen
From: Andi Kleen Handle the Unit field, which is needed to find the right PMU for an event. We call it "pmu" and convert it to the perf pmu name with an uncore prefix. Handle the ExtSel field, which just extends the event mask with an additional bit. Handle the Filter field which adds parameter

Re: [PATCH 03/10] perf, tools: Add support for parsing uncore json files

2016-10-14 Thread Andi Kleen
> > addfield(map, &extra_desc, ". ", > > " Supports address when precise", > > NULL); > > + } else if (json_streq(map, field, "Unit")) { > > so I remember you said you're preparing

Re: [PATCH 03/10] perf, tools: Add support for parsing uncore json files

2016-10-14 Thread Jiri Olsa
On Thu, Oct 13, 2016 at 02:15:25PM -0700, Andi Kleen wrote: SNIP > @@ -376,6 +412,16 @@ int json_events(const char *fn, > nz = !json_streq(map, val, "0"); > if (match_field(map, field, nz, &event, val)) { > /* ok */ > +

Re: [PATCH 03/10] perf, tools: Add support for parsing uncore json files

2016-10-14 Thread Jiri Olsa
On Thu, Oct 13, 2016 at 02:15:25PM -0700, Andi Kleen wrote: > From: Andi Kleen > > Handle the Unit field, which is needed to find the right PMU for > an event. We call it "pmu". Handle the ExtSel field. > Handle the Filter field. Then output the fields into the pmu-events > data structures which

Re: [PATCH 03/10] perf, tools: Add support for parsing uncore json files

2016-10-14 Thread Jiri Olsa
On Thu, Oct 13, 2016 at 02:15:25PM -0700, Andi Kleen wrote: SNIP > @@ -376,6 +412,16 @@ int json_events(const char *fn, > nz = !json_streq(map, val, "0"); > if (match_field(map, field, nz, &event, val)) { > /* ok */ > +

Re: [PATCH 03/10] perf, tools: Add support for parsing uncore json files

2016-10-14 Thread Jiri Olsa
On Thu, Oct 13, 2016 at 02:15:25PM -0700, Andi Kleen wrote: > From: Andi Kleen > > Handle the Unit field, which is needed to find the right PMU for > an event. We call it "pmu". Handle the ExtSel field. > Handle the Filter field. Then output the fields into the pmu-events > data structures which

[PATCH 03/10] perf, tools: Add support for parsing uncore json files

2016-10-13 Thread Andi Kleen
From: Andi Kleen Handle the Unit field, which is needed to find the right PMU for an event. We call it "pmu". Handle the ExtSel field. Handle the Filter field. Then output the fields into the pmu-events data structures which are compiled into perf. Filter out zero fields, except for the event i