From: Jiri Olsa <jolsa@redhat.com>
To: "Liang, Kan" <kan.liang@intel.com>
Cc: "acme@kernel.org" <acme@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ak@linux.intel.com" <ak@linux.intel.com>
Subject: Re: [PATCH V5 2/3] perf tools: parse the pmu event prefix and surfix
Date: Thu, 11 Sep 2014 15:37:11 +0200 [thread overview]
Message-ID: <20140911133711.GB26389@krava.brq.redhat.com> (raw)
In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077015C6DF9@SHSMSX103.ccr.corp.intel.com>
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
next prev parent reply other threads:[~2014-09-11 13:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 17:55 [PATCH V5 1/3] Revert "perf tools: Default to cpu// for events v5" kan.liang
2014-09-10 17:55 ` [PATCH V5 2/3] perf tools: parse the pmu event prefix and surfix kan.liang
2014-09-11 8:46 ` Jiri Olsa
2014-09-11 13:31 ` Liang, Kan
2014-09-11 13:37 ` Jiri Olsa [this message]
2014-09-11 8:51 ` Jiri Olsa
2014-09-11 13:50 ` Liang, Kan
2014-09-11 14:53 ` Jiri Olsa
2014-09-10 17:55 ` [PATCH V5 3/3] perf tools: Add support to new style format of kernel PMU event kan.liang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140911133711.GB26389@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®