Re: [PATCH 04/11] perf, tools: Support per pmu json aliases
From: Jiri Olsa
Date: Thu Jan 19 2017 - 05:44:17 EST
On Wed, Jan 18, 2017 at 04:17:35PM -0800, Andi Kleen wrote:
> > > index 8bffe99d8e3f..4bfc98953aba 100644
> > > --- a/tools/perf/util/pmu.c
> > > +++ b/tools/perf/util/pmu.c
> > > @@ -587,14 +587,13 @@ static struct perf_pmu *pmu_lookup(const char *name)
> > > if (pmu_format(name, &format))
> > > return NULL;
> > >
> > > - if (pmu_aliases(name, &aliases))
> > > + if (pmu_type(name, &type))
> > > return NULL;
> > >
> > > - pmu_add_cpu_aliases(&aliases, name);
> > > -
> > > - if (pmu_type(name, &type))
> > > + if (pmu_aliases(name, &aliases))
> > > return NULL;
> > >
> > > + pmu_add_cpu_aliases(&aliases, name);
> >
> > AFAICS you switched the calls.. how does it matter?
>
> It avoids lots of duplicate messages with -v (and also is more efficient)
cool, please state that in chagelog.. before/after
thanks,
jirka