[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140911133711.GB26389@krava.brq.redhat.com>
Date: Thu, 11 Sep 2014 15:37:11 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: "Liang, Kan" <kan.liang@...el.com>
Cc: "acme@...nel.org" <acme@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"ak@...ux.intel.com" <ak@...ux.intel.com>
Subject: Re: [PATCH V5 2/3] perf tools: parse the pmu event prefix and surfix
On Thu, Sep 11, 2014 at 01:31:48PM +0000, Liang, Kan wrote:
>
>
> > SNIP
> >
> > > return 0;
> > > }
> > >
> > > +static int
> > > +comp_pmu(const void *p1, const void *p2) {
> > > + struct perf_pmu_event_symbol *pmu1 =
> > > + (struct perf_pmu_event_symbol *) p1;
> > > + struct perf_pmu_event_symbol *pmu2 =
> > > + (struct perf_pmu_event_symbol *) p2;
> > > +
> > > + return strcmp(pmu1->symbol, pmu2->symbol); }
> > > +
> > > +/*
> > > + * Read the pmu events list from sysfs
> > > + * Save it into perf_pmu_events_list
> > > + */
> > > +static void perf_pmu__parse_init(void) {
> > > +
> > > + struct perf_pmu *pmu = NULL;
> > > + struct perf_pmu_alias *alias;
> > > + int len = 0;
> > > +
> >
> > missing my previous comment being addressed:
> >
>
> I just found it in Junk E-mail. I have no idea why. :(
>
> > ---
> > Why do we need to call scan here? Looks like:
> > pmu = pmu_lookup("cpu")
> >
> > should be enough.. and could be used below as well
> > ---
> >
>
> Could we use "perf_pmu__find" here?
> pmu_lookup is a static function.
> Also, it looks we don't need to lookup all the time if the PMU is loaded.
right, perf_pmu__find seems better
thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists