Re: [RFC][PATCH 4/4] perf: Create aliases for PMU events

2015-05-04 Thread Andi Kleen
> I personaly like having set of event files in JSON notation > rather than having them directly in C structure Yes, strings are better and JSON input is also better. I prototyped translating JSON into the proposed structures. I already had to add three new fields, and it wouldn't work for uncor

Re: [RFC][PATCH 4/4] perf: Create aliases for PMU events

2015-05-02 Thread Jiri Olsa
On Fri, May 01, 2015 at 12:05:41AM -0700, Sukadev Bhattiprolu wrote: SNIP > + > +static int pmu_add_cpu_aliases(char *cpustr, void *data) > +{ > + struct list_head *head = (struct list_head *)data; > + struct perf_pmu_alias *alias; > + int i; > + struct perf_pmu_event *events_tabl

Re: [RFC][PATCH 4/4] perf: Create aliases for PMU events

2015-05-02 Thread Vineet Gupta
On Friday 01 May 2015 12:35 PM, Sukadev Bhattiprolu wrote: > Using the tables of Power7 and Power8 events, create aliases for the > Power PMU events. This would allow us to specify all Power events by > name rather than by raw code: > > $ /tmp/perf stat -e PM_1PLUS_PPC_CMPL sleep 1 > >

[RFC][PATCH 4/4] perf: Create aliases for PMU events

2015-05-01 Thread Sukadev Bhattiprolu
Using the tables of Power7 and Power8 events, create aliases for the Power PMU events. This would allow us to specify all Power events by name rather than by raw code: $ /tmp/perf stat -e PM_1PLUS_PPC_CMPL sleep 1 Performance counter stats for 'sleep 1': 757,6