From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>,
Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
Will Deacon <Will.Deacon@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>,
Jiri Olsa <jolsa@redhat.com>
Subject: perf event grouping for dummies (was Re: [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events)
Date: Tue, 20 Sep 2016 13:56:20 -0700 [thread overview]
Message-ID: <2a18ae06-3abd-c3a1-e980-f04c511b08e5@synopsys.com> (raw)
In-Reply-To: <20160901083324.GM10153@twins.programming.kicks-ass.net>
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. How does perf user make use of this
info - I tried googling around but can't seem to find anything which explains the
semantics.
I can see that group events to work on ARC (although in our case a counter can
cont one condition at a time only) and the results seem to be similar whther we
group or not.
------------->8------------
[ARCLinux]# perf stat -e {cycles,instructions} hackbench
Running with 10*40 (== 400) tasks.
Time: 37.430
Performance counter stats for 'hackbench':
3487777173 cycles
1351709784 instructions # 0.39 insn per cycle
38.957481536 seconds time elapsed
[ARCLinux]# perf stat -e cycles hackbench
Running with 10*40 (== 400) tasks.
Time: 36.735
Performance counter stats for 'hackbench':
3426151391 cycles
38.247235981 seconds time elapsed
[ARCLinux]#
[ARCLinux]# perf stat -e instructions hackbench
Running with 10*40 (== 400) tasks.
Time: 37.537
Performance counter stats for 'hackbench':
1355421559 instructions
39.061784281 seconds time elapsed
------------->8------------
...
>
> You can do it like:
>
> perf stat -e '{cycles,instructions}'
>
> Which will place the cycles event and the instructions event in a group
> and thereby guarantee they're co-scheduled.
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 ?
-Vineet
next prev parent reply other threads:[~2016-09-20 20:56 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 ` Vineet Gupta [this message]
2016-09-22 0:43 ` perf event grouping for dummies (was Re: [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events) Paul Clarke
2016-09-22 7:56 ` Peter Zijlstra
2016-09-22 17:50 ` Vineet Gupta
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=2a18ae06-3abd-c3a1-e980-f04c511b08e5@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=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;
as well as URLs for NNTP newsgroup(s).