Re: [PATCH 03/10] perf, tools: Factor out PMU matching in parser
From: Jiri Olsa
Date: Tue Mar 07 2017 - 05:03:45 EST
On Tue, Feb 28, 2017 at 10:49:17PM -0800, Andi Kleen wrote:
SNIP
> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index a14b47ab3879..6b2bc918fc94 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -236,37 +236,9 @@ PE_NAME opt_event_config
> |
> PE_KERNEL_PMU_EVENT sep_dc
> {
> - struct parse_events_evlist *data = _data;
> - struct list_head *head;
> - struct parse_events_term *term;
> struct list_head *list;
> - struct perf_pmu *pmu = NULL;
> - int ok = 0;
>
> - /* Add it for all PMUs that support the alias */
> - ALLOC_LIST(list);
> - while ((pmu = perf_pmu__scan(pmu)) != NULL) {
> - struct perf_pmu_alias *alias;
> -
> - list_for_each_entry(alias, &pmu->aliases, list) {
> - if (!strcasecmp(alias->name, $1)) {
> - ALLOC_LIST(head);
> - ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER,
> - $1, 1, &@1, NULL));
> - list_add_tail(&term->list, head);
http://marc.info/?l=linux-kernel&m=148818456131560&w=2
jirka