From: Andi Kleen <andi@firstfloor.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>,
acme@redhat.com, a.p.zijlstra@chello.nl, mingo@elte.hu,
paulus@samba.org, cjashfor@linux.vnet.ibm.com,
fweisbec@gmail.com, linux-kernel@vger.kernel.org,
tglx@linutronix.de
Subject: Re: [RFCv2 0/8] perf tool: Add new event group management
Date: Sat, 26 May 2012 21:23:11 +0200 [thread overview]
Message-ID: <20120526192311.GM27374@one.firstfloor.org> (raw)
In-Reply-To: <20120526123858.GA1679@m.brq.redhat.com>
On Sat, May 26, 2012 at 02:38:58PM +0200, Jiri Olsa wrote:
> The startup patches just got in recently
> http://marc.info/?l=linux-kernel&m=133758460912306&w=2
>
> so I'll continue on this shortly..
Great.
> If you have some ideas on this or real world examples,
Any of the proposed syntaxes looked fine for me. The important
part is that it works in some form.
> that would really help.. so far, here's the latest discussion:
> http://marc.info/?t=133357436900005&r=1&w=2
For example you want to measure sandy bridge frontend contention in a
more useful way than the dubious event in standard perf.
The formula for this is
N = 4*CPU_CLK_UNHALTED.THREAD (4 execution slots)
Percent_FE_bound = 100*(IDQ_UOPS_NOT_DELIVERED.CORE / N)
Translated into perf this is
-e r53003c -e r53019c
and some glue to compute the formula:
#!/usr/bin/python
import sys
cyc, e1 = sys.stdin.readline().split(",")
uops, e2 = sys.stdin.readline().split(",")
N = 4 * float(cyc)
P_FE = 100.0 * (float(uops) / N)
print "percent frontend bound: %.2f" % (P_FE)
perf stat -x, -e r53003c -e r53019c /bin/ls 2>log
./frontend.py < log
percent frontend bound: 41.53
My /bin/ls is 42% frontend bound.
Now you see we always have to measure the CPU_CLK_UNHALTED and
IDQ_UOPS_NOT_DELIVERED.CORE together. Otherwise there is no useful output
from the formula.
The problem happens when we want to measure other things too. You tend
to quickly run out of 4 counters per CPU thread, so have to multiplex.
And that is where the groups are needed. Without the groups we have
to do multiple runs, instead of one that measures this all time sliced.
This is pretty common with all kinds of measurements.
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
next prev parent reply other threads:[~2012-05-26 19:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 21:16 Jiri Olsa
2012-04-04 21:16 ` [PATCH 1/8] perf, tool: Add support to parse event group syntax Jiri Olsa
2012-04-04 21:16 ` [PATCH 2/8] perf, tool: Enable grouping logic for parsed events Jiri Olsa
2012-04-04 21:16 ` [PATCH 3/8] perf: Add PERF_EVENT_IOC_ID ioctl to return event ID Jiri Olsa
2012-04-04 21:16 ` [PATCH 4/8] perf, tool: Use PERF_EVENT_IOC_ID perf ioctl to read event id Jiri Olsa
2012-04-04 21:16 ` [PATCH 5/8] perf, tool: Separate 'mem:' event scanner bits Jiri Olsa
2012-04-11 13:28 ` Robert Richter
2012-04-11 14:33 ` Jiri Olsa
2012-04-13 17:02 ` Robert Richter
2012-04-04 21:16 ` [PATCH 6/8] perf, tool: Add modifier support to group event syntax Jiri Olsa
2012-04-04 21:16 ` [PATCH 7/8] perf, tool: Add support for parsing PERF_SAMPLE_READ Jiri Olsa
2012-04-04 21:16 ` [PATCH 8/8] perf, tool: Enable sampling on specified event group leader Jiri Olsa
2012-04-04 21:21 ` [RFCv2 0/8] perf tool: Add new event group management Jiri Olsa
2012-04-15 15:16 ` Peter Zijlstra
2012-04-16 12:16 ` Jiri Olsa
2012-04-16 14:23 ` Peter Zijlstra
2012-04-16 15:26 ` Peter Zijlstra
2012-04-16 15:37 ` Jiri Olsa
2012-04-17 2:16 ` Namhyung Kim
2012-04-17 9:09 ` Namhyung Kim
2012-04-17 9:33 ` Jiri Olsa
2012-05-25 22:36 ` Andi Kleen
2012-05-26 12:38 ` Jiri Olsa
2012-05-26 19:23 ` Andi Kleen [this message]
2012-05-27 7:56 ` Ulrich Drepper
2012-05-27 15:08 ` Andi Kleen
2012-05-28 19:21 ` Jiri Olsa
2012-05-29 8:39 ` Peter Zijlstra
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=20120526192311.GM27374@one.firstfloor.org \
--to=andi@firstfloor.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome