LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>,
mingo@redhat.com, peterz@infradead.org,
linux-kernel@vger.kernel.org, namhyung@kernel.org,
ganapatrao.kulkarni@cavium.com, zhangshaokun@hisilicon.com,
yao.jin@linux.intel.com, will.deacon@arm.com, ak@linux.intel.com,
agustinv@codeaurora.org
Subject: Re: [V5 PATCH] perf parse-events: Specially handle uncore event alias in small groups
Date: Fri, 4 May 2018 15:21:16 -0300 [thread overview]
Message-ID: <20180504182116.GA32709@kernel.org> (raw)
In-Reply-To: <1c2fc5c1-2ad1-8caf-eac6-f08b5f42d7fc@linux.intel.com>
Em Fri, May 04, 2018 at 01:57:33PM -0400, Liang, Kan escreveu:
>
>
> On 5/1/2018 12:33 PM, Jiri Olsa wrote:
> > On Tue, May 01, 2018 at 07:31:36AM -0700, kan.liang@linux.intel.com wrote:
> > > From: Kan Liang <kan.liang@linux.intel.com>
> > >
> > > Perf stat doesn't count the uncore event aliases from the same uncore
> > > block in a group, for example:
> > >
> > > perf stat -e '{unc_m_cas_count.all,unc_m_clockticks}' -a -I 1000
> > > # time counts unit events
> > > 1.000447342 <not counted> unc_m_cas_count.all
> > > 1.000447342 <not counted> unc_m_clockticks
> > > 2.000740654 <not counted> unc_m_cas_count.all
> > > 2.000740654 <not counted> unc_m_clockticks
> > >
> > > The output is very misleading. It gives a wrong impression that the
> > > uncore event doesn't work.
> > >
> > > An uncore block could be composed by several PMUs. An uncore event alias
> > > is a joint name which means the same event runs on all PMUs of a block.
> > > Perf doesn't support mixed events from different PMUs in the same group.
> > > It is wrong to put uncore event aliases in a big group.
> > >
> > > The right way is to split the big group into multiple small groups which
> > > only include the events from the same PMU.
> > > Only uncore event aliases from the same uncore block should be specially
> > > handled here. It doesn't make sense to mix the uncore events with other
> > > uncore events from different blocks or even core events in a group.
> > >
> > > With the patch:
> > > # time counts unit events
> > > 1.001557653 140,833 unc_m_cas_count.all
> > > 1.001557653 1,330,231,332 unc_m_clockticks
> > > 2.002709483 85,007 unc_m_cas_count.all
> > > 2.002709483 1,429,494,563 unc_m_clockticks
> > >
> > > Reported-by: Andi Kleen <ak@linux.intel.com>
> > > Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> > > ---
> > >
> > > Changes since V4:
> > > - Add WARN_ON when failing to alloc an array for leaders
> > > - Add comments to explain why it has to go through the whole group
> >
> > Acked-by: Jiri Olsa <jolsa@kernel.org>
> >
>
> Thanks Jirka.
>
> Hi Arnaldo,
>
> Are you OK with the patch?
> It looks like Jirka has another patch which will touch the same code.
> If it's OK for you, could you please merge the patch? So he can do the
> changes on top of this patch.
Yeah, I'm applying to my perf/core branch and pushing it out now.
- Arnaldo
next prev parent reply other threads:[~2018-05-04 18:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 14:31 kan.liang
2018-05-01 16:33 ` Jiri Olsa
2018-05-04 17:57 ` Liang, Kan
2018-05-04 18:21 ` Arnaldo Carvalho de Melo [this message]
2018-05-07 18:39 ` Arnaldo Carvalho de Melo
2018-05-07 18:40 ` Arnaldo Carvalho de Melo
2018-05-07 19:06 ` Liang, Kan
2018-05-07 19:07 ` Arnaldo Carvalho de Melo
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=20180504182116.GA32709@kernel.org \
--to=acme@kernel.org \
--cc=agustinv@codeaurora.org \
--cc=ak@linux.intel.com \
--cc=ganapatrao.kulkarni@cavium.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=will.deacon@arm.com \
--cc=yao.jin@linux.intel.com \
--cc=zhangshaokun@hisilicon.com \
--subject='Re: [V5 PATCH] perf parse-events: Specially handle uncore event alias in small groups' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).