Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1487630

perf event grouping for dummies (was Re: [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events)

From Vineet Gupta <Vineet.Gupta1@synopsys.com>
Newsgroups linux.kernel
Subject perf event grouping for dummies (was Re: [PATCH] arc: perf: Enable generic "cache-references" and "cache-misses" events)
Date 2016-09-20 23:00 +0200
Message-ID <sjAj0-81b-5@gated-at.bofh.it> (permalink)
References <sa1u9-tW-3@gated-at.bofh.it> <satqp-1GW-25@gated-at.bofh.it> <scj3A-6lo-7@gated-at.bofh.it> <scvHs-78u-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

perf event grouping for dummies (was Re: [PATCH] arc: perf: Enable  generic "cache-references" and "cache-misses" events) Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-20 23:00 +0200
  Re: perf event grouping for dummies (was Re: [PATCH] arc: perf:  Enable generic "cache-references" and "cache-misses" events) Paul Clarke <pc@us.ibm.com> - 2016-09-22 02:50 +0200
    Re: perf event grouping for dummies (was Re: [PATCH] arc: perf:  Enable generic "cache-references" and "cache-misses" events) Peter Zijlstra <peterz@infradead.org> - 2016-09-22 10:00 +0200
      Re: perf event grouping for dummies (was Re: [PATCH] arc: perf:  Enable generic "cache-references" and "cache-misses" events) Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-22 20:00 +0200
        Re: perf event grouping for dummies (was Re: [PATCH] arc: perf:  Enable generic "cache-references" and "cache-misses" events) Paul Clarke <pc@us.ibm.com> - 2016-09-22 20:30 +0200
          Re: perf event grouping for dummies (was Re: [PATCH] arc: perf:  Enable generic "cache-references" and "cache-misses" events) Arnaldo Carvalho de Melo <acme@redhat.com> - 2016-09-22 21:50 +0200

csiph-web