Re: [PATCH v4 2/3] perf tools: parse the pmu event prefix and surfix

2014-09-06 Thread Jiri Olsa
On Tue, Sep 02, 2014 at 11:29:29AM -0400, kan.li...@intel.com wrote: SNIP > { > YY_BUFFER_STATE buffer; > @@ -906,7 +1006,10 @@ int parse_events(struct perf_evlist *evlist, const char > *str) > }; > int ret; > > + /* scan kernel pmu events from sysfs */ > +

Re: [PATCH v4 2/3] perf tools: parse the pmu event prefix and surfix

2014-09-06 Thread Jiri Olsa
On Tue, Sep 02, 2014 at 11:29:29AM -0400, kan.li...@intel.com wrote: > From: Kan Liang SNIP > + * Read the pmu events list from sysfs > + * Save it into kernel_pmu_events_list > + */ > +static void scan_kernel_pmu_events_list(void) > +{ > + > + struct perf_pmu *pmu = NULL; > + struct

Re: [PATCH v4 2/3] perf tools: parse the pmu event prefix and surfix

2014-09-06 Thread Jiri Olsa
On Tue, Sep 02, 2014 at 11:29:29AM -0400, kan.li...@intel.com wrote: From: Kan Liang kan.li...@intel.com SNIP + * Read the pmu events list from sysfs + * Save it into kernel_pmu_events_list + */ +static void scan_kernel_pmu_events_list(void) +{ + + struct perf_pmu *pmu = NULL; +

Re: [PATCH v4 2/3] perf tools: parse the pmu event prefix and surfix

2014-09-06 Thread Jiri Olsa
On Tue, Sep 02, 2014 at 11:29:29AM -0400, kan.li...@intel.com wrote: SNIP { YY_BUFFER_STATE buffer; @@ -906,7 +1006,10 @@ int parse_events(struct perf_evlist *evlist, const char *str) }; int ret; + /* scan kernel pmu events from sysfs */ +

[PATCH v4 2/3] perf tools: parse the pmu event prefix and surfix

2014-09-02 Thread kan . liang
From: Kan Liang There are two types of event formats for PMU events. E.g. el-abort OR cpu/el-abort/. However, the lexer mistakenly recognizes the simple style format as two events. The parse_events_pmu_check function uses bsearch to search the name in known pmu event list. It can tell the lexer

[PATCH v4 2/3] perf tools: parse the pmu event prefix and surfix

2014-09-02 Thread kan . liang
From: Kan Liang kan.li...@intel.com There are two types of event formats for PMU events. E.g. el-abort OR cpu/el-abort/. However, the lexer mistakenly recognizes the simple style format as two events. The parse_events_pmu_check function uses bsearch to search the name in known pmu event list. It