Re: [RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-17 Thread Yan, Zheng
On 09/17/2012 11:36 PM, Arnaldo Carvalho de Melo wrote: > Em Tue, Sep 11, 2012 at 04:27:17PM +0200, Jiri Olsa escreveu: >> On Mon, Sep 10, 2012 at 03:53:51PM +0800, Yan, Zheng wrote: >> >> Would it be possible to have all '*add_event' more obvious for usage. >> Also following code is duplicated aft

Re: [RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-17 Thread Arnaldo Carvalho de Melo
Em Tue, Sep 11, 2012 at 04:27:17PM +0200, Jiri Olsa escreveu: > On Mon, Sep 10, 2012 at 03:53:51PM +0800, Yan, Zheng wrote: > > Would it be possible to have all '*add_event' more obvious for usage. > Also following code is duplicated after each call of __add_event: > > evsel = __add_event(i

Re: [RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-12 Thread Jiri Olsa
On Wed, Sep 12, 2012 at 09:30:19AM +0800, Yan, Zheng wrote: > On 09/11/2012 10:05 PM, Jiri Olsa wrote: > > On Mon, Sep 10, 2012 at 03:53:51PM +0800, Yan, Zheng wrote: > >> From: "Yan, Zheng" > >> > > > > SNIP > > > >> +int parse_events_add_pmu(struct list_head **_list, int *idx, > >>

Re: [RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-11 Thread Yan, Zheng
On 09/11/2012 10:05 PM, Jiri Olsa wrote: > On Mon, Sep 10, 2012 at 03:53:51PM +0800, Yan, Zheng wrote: >> From: "Yan, Zheng" >> > > SNIP > >> +int parse_events_add_pmu(struct list_head **_list, int *idx, >> char *name, struct list_head *head_config) >> { >> struct per

Re: [RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-11 Thread Jiri Olsa
On Mon, Sep 10, 2012 at 03:53:51PM +0800, Yan, Zheng wrote: > From: "Yan, Zheng" SNIP > +{ > + struct perf_evsel *evsel; > > + while (!list_empty(list)) { > + evsel = list_entry(list->next, struct perf_evsel, node); > + list_del(&evsel->node); > + pe

Re: [RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-11 Thread Jiri Olsa
On Mon, Sep 10, 2012 at 03:53:51PM +0800, Yan, Zheng wrote: > From: "Yan, Zheng" > SNIP > +int parse_events_add_pmu(struct list_head **_list, int *idx, >char *name, struct list_head *head_config) > { > struct perf_event_attr attr; > - struct perf_pmu *pmu; > +

Re: [RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-11 Thread Jiri Olsa
On Mon, Sep 10, 2012 at 03:53:51PM +0800, Yan, Zheng wrote: > From: "Yan, Zheng" > > Allow wildcard in PMU name, so we can measure events on all > uncore boxes of same type. For example: > > Signed-off-by: Yan, Zheng example is missing ;) jirka -- To unsubscribe from this list: send the line

[RFC PATCH 3/3] perf tool: Allow wildcard in PMU name

2012-09-10 Thread Yan, Zheng
From: "Yan, Zheng" Allow wildcard in PMU name, so we can measure events on all uncore boxes of same type. For example: Signed-off-by: Yan, Zheng --- tools/perf/builtin-stat.c | 8 ++- tools/perf/util/evsel.c| 31 -- tools/perf/util/evsel.h| 2 + tools/perf/uti