From: Jiri Olsa <jolsa@redhat.com>
To: Ulrich Drepper <drepper@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Andi Kleen <andi@firstfloor.org>, David Ahern <dsahern@gmail.com>
Subject: Re: [RFC 0/4] perf tool: Adding ratios support
Date: Wed, 16 Jan 2013 15:25:49 +0100 [thread overview]
Message-ID: <20130116142549.GD1042@krava.brq.redhat.com> (raw)
In-Reply-To: <CAOPLpQeHTCwr4tuHi0nORCn+LKJRzEGoCWhC-rj30nLe7bY5Nw@mail.gmail.com>
On Wed, Jan 16, 2013 at 09:00:07AM -0500, Ulrich Drepper wrote:
> On Tue, Jan 15, 2013 at 8:39 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> > $ perf stat -f formula.conf:cpi kill
> > usage: kill [ -s signal | -p ] [ -a ] pid ...
> > kill -l [ signal ]
>
> I do like this proposal. The only comment I have is that perhaps the
> command line syntax isn't ideal. What you use above is tied to the
> ratios be defined in the config file. I would imagine that at least
> over time (for some ratios probably right away) they become available
> by default and don't require a config file. Also, users might want to
> put individualized ratio definitions in a config file which is read by
> default.
>
> How about the formulas becoming available whenever the config file is
> read. Maybe this means a few more keywords in the config file (ratio,
> ratio-set, ...). E.g.:
>
> ratio-set branch {
> events = {instructions,branch-instructions,branch-misses}:u
>
> ratio branch-rate {
> formula = branch-instructions / instructions
> desc = branch rate
> }
>
> ratio branch-miss-rate {
> formula = branch-misses / instructions
> desc = branch misprediction rate
> }
>
> ratio branch-miss-ratio{
> formula = branch-misses / branch-instructions
> desc = branch misprediction ratio
> }
> }
I was thinking having config files (global and arch specific)
comming with perf having predefined formulas.
Plus adding the possibility to load extra config file via command
line option.
>
> You get the idea. Maybe substitute "ratio":with "formula". Then allow
> such a ratio/formula to be used just like a normal event, perhaps with
> a special suffix/prefix to designate it. This should then also mark
I like the idea of having ratios handled within event definitions
maybe even in a similar way like aliases are handled today.. like:
1) -e 'ratio/branch-rate/' # special event class
2) -e 'ratio-branch-rate' # 'ratio-' prefix
3) -e cpu/branch-rate/ # handled like aliases, ratio name would need to be unique
... ?
ideas?
Having both 2) with 3) seems good to me
> the events as part of a group so that the underlying counters are
> scheduled in together.
the 'events' definitions could be put into group by default,
meanwhile I used 'events = { ... }'
thanks,
jirka
next prev parent reply other threads:[~2013-01-16 14:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 13:39 Jiri Olsa
2013-01-15 13:39 ` [PATCH 1/4] perf tool: Remove unused 'unset' parameter from parse_events Jiri Olsa
2013-01-25 11:52 ` [tip:perf/core] perf tools: " tip-bot for Jiri Olsa
2013-01-15 13:39 ` [PATCH 2/4] perf tool: Add formula interface to interface ratio definitions Jiri Olsa
2013-01-15 13:39 ` [PATCH 3/4] perf stat: Adding -f option to load and process ratios Jiri Olsa
2013-01-15 13:39 ` [PATCH 4/4] perf tool: Adding formula.conf file for testing Jiri Olsa
2013-01-16 13:13 ` [RFC 0/4] perf tool: Adding ratios support Will Deacon
2013-01-16 13:30 ` Jiri Olsa
2013-01-17 10:23 ` Will Deacon
2013-01-21 19:13 ` Jiri Olsa
2013-01-22 9:45 ` Will Deacon
2013-01-16 14:00 ` Ulrich Drepper
2013-01-16 14:25 ` Jiri Olsa [this message]
2013-01-16 15:12 ` Ulrich Drepper
2013-01-17 1:03 ` Namhyung Kim
2013-01-17 16:05 ` Jiri Olsa
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=20130116142549.GD1042@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=andi@firstfloor.org \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=drepper@gmail.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=namhyung@kernel.org \
--cc=paulus@samba.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
Powered by JetHome