From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Peter Zijlstra <peterz@infradead.org>, Paul Clarke <pc@us.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
Will Deacon <Will.Deacon@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
Jiri Olsa <jolsa@redhat.com>
Subject: Re: perf event grouping for dummies (was Re: [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events)
Date: Thu, 22 Sep 2016 10:50:21 -0700 [thread overview]
Message-ID: <b15fc87b-c846-fdb5-ef6a-48fc2d797917@synopsys.com> (raw)
In-Reply-To: <20160922075603.GW5008@twins.programming.kicks-ass.net>
On 09/22/2016 12:56 AM, Peter Zijlstra wrote:
> On Wed, Sep 21, 2016 at 07:43:28PM -0500, Paul Clarke wrote:
>> On 09/20/2016 03:56 PM, Vineet Gupta wrote:
>>> On 09/01/2016 01:33 AM, Peter Zijlstra wrote:
>>>>> - is that what perf event grouping is ?
>>>>
>>>> Again, nope. Perf event groups are single counter (so no implicit
>>>> addition) that are co-scheduled on the PMU.
>>>
>>> I'm not sure I understand - does this require specific PMU/arch support - as in
>>> multiple conditions feeding to same counter.
>>
>> My read is that is that what Peter meant was that each event in the
>> perf event group is a single counter, so all the events in the group
>> are counted simultaneously. (No multiplexing.)
>
> Right, sorry for the poor wording.
>
>>> Again when you say co-scheduled what do you mean - why would anyone use the event
>>> grouping - is it when they only have 1 counter and they want to count 2
>>> conditions/events at the same time - isn't this same as event multiplexing ?
>>
>> I'd say it's the converse of multiplexing. Instead of mapping
>> multiple events to a single counter, perf event groups map a set of
>> events each to their own counter, and they are active simultaneously.
>> I suppose it's possible for the _groups_ to be multiplexed with other
>> events or groups, but the group as a whole will be scheduled together,
>> as a group.
>
> Correct.
>
> Each events get their own hardware counter. Grouped events are
> co-scheduled on the hardware.
And if we don't group them, then they _may_ not be co-scheduled (active/counting
at the same time) ? But how can this be possible.
Say we have 2 counters, both the cmds below
perf -e cycles,instructions hackbench
perf -e {cycles,instructions} hackbench
would assign 2 counters to the 2 conditions which keep counting until perf asks
them to stop (because the profiled application ended)
I don't understand the "scheduling" of counter - once we set them to count, there
is no real intervention/scheduling form software in terms of disabling/enabling
(assuming no multiplexing etc)
> You can multiplex groups. But if one event in a group is schedule, they
> all must be.
next prev parent reply other threads:[~2016-09-22 17:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-25 11:47 [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events Alexey Brodkin
2016-08-26 17:30 ` Vineet Gupta
2016-08-31 19:05 ` Vineet Gupta
2016-09-01 8:33 ` Peter Zijlstra
2016-09-20 20:56 ` perf event grouping for dummies (was Re: [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events) Vineet Gupta
2016-09-22 0:43 ` Paul Clarke
2016-09-22 7:56 ` Peter Zijlstra
2016-09-22 17:50 ` Vineet Gupta [this message]
2016-09-22 18:23 ` Paul Clarke
2016-09-22 19:42 ` Arnaldo Carvalho de Melo
2016-09-14 17:53 ` [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events Vineet Gupta
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=b15fc87b-c846-fdb5-ef6a-48fc2d797917@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=Alexey.Brodkin@synopsys.com \
--cc=Will.Deacon@arm.com \
--cc=acme@redhat.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=pc@us.ibm.com \
--cc=peterz@infradead.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®