Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match

From: Andi Kleen
Date: Mon Oct 17 2016 - 13:10:11 EST


> so there's a special treatment for uncore events,
> what if user says 'uncore_box/..' then?

It should work. There's nothing special for uncore later, this
is just for convenience so that I have less to type.

> > + if (!strncmp($1, name, strlen($1))) {
> > + if (parse_events_copy_term_list(orig_terms, &terms))
> > + YYABORT;
> > + if (!parse_events_add_pmu(data, list, pmu->name, terms))
> > + ok++;
>
> so we're ok if some of the events is not added?
> do we warn at least?

It would warn a lot because most PMUs don't have a given aliases.
So you would get an warning for every extra PMU.

Trying to warn only for those that have the alias would need a lot
of extra tracking, and it didn't seem worth the complexity.

-Andi