lkml.org 
[lkml]   [2014]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V5 2/3] perf tools: parse the pmu event prefix and surfix
Date


> 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.

Thanks,
Kan

> or commented why not to do it..
>
> jirka
>



\
 
 \ /
  Last update: 2014-09-11 16:01    [W:0.085 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site