From: Paul Mackerras <paulus@samba.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
linux-arch@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Stephane Eranian <eranian@googlemail.com>,
Eric Dumazet <dada1@cosmosbay.com>,
Robert Richter <robert.richter@amd.com>,
Arjan van de Veen <arjan@infradead.org>,
Peter Anvin <hpa@zytor.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Steven Rostedt <rostedt@goodmis.org>,
David Miller <davem@davemloft.net>
Subject: Re: [patch] Performance Counters for Linux, v2
Date: Wed, 10 Dec 2008 10:00:19 +1100 [thread overview]
Message-ID: <18750.63619.54374.976070@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20081209130045.GA32479@elte.hu>
Ingo Molnar writes:
> * Paul Mackerras <paulus@samba.org> wrote:
>
> > > Things like: "kerneltop would not be as accurate with: ..., to the
> > > level of adding 5% of extra noise.". Would that work for you?
> >
> > OK, here's an example. I have an application whose execution has
> > several different phases, and I want to measure the L1 Icache hit rate
> > and the L1 Dcache hit rate as a function of time and make a graph. So
> > I need counters for L1 Icache accesses, L1 Icache misses, L1 Dcache
> > accesses, and L1 Dcache misses. I want to sample at 1ms intervals. The
> > CPU I'm running on has two counters.
> >
> > With your current proposal, I don't see any way to make sure that the
> > counter scheduler counts L1 Dcache accesses and L1 Dcache misses at the
> > same time, then schedules L1 Icache accesses and L1 Icache misses. I
> > could end up with L1 Dcache accesses and L1 Icache accesses, then L1
> > Dcache misses and L1 Icache misses - and get a nonsensical situation
> > like the misses being greater than the accesses.
>
> yes, agreed, this is a valid special case of simple counter readout -
> we'll add support to couple counters like that.
This is an example of a sampling problem, but one where the thing
being sampled is a derived statistic from two counter values.
I don't agree that this is really a "special case". There are lots of
derived statistics that are interesting for performance analysis,
starting with CPI (cycles per instruction), proportions of various
instructions in the code, cache hit/miss rates for various different
caches, etc., etc.
> Note that this issue does not impact use of multiple counters in
> profilers. (i.e. anything that is not a pure readout of the counter,
> along linear time, as your example above suggests).
Well, that's the sampling vs. counting distinction that I made in my
other email. We need to do both well.
As far as I can see, my "counter set" proposal does everything yours
does (since a counter set can be just a single counter), and also
cleanly accommodates what's needed for counting and for sampling
derived statistics. No?
Paul.
next prev parent reply other threads:[~2008-12-09 23:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 1:22 Ingo Molnar
2008-12-08 1:49 ` Arjan van de Ven
2008-12-08 11:49 ` Ingo Molnar
2009-01-07 7:43 ` Zhang, Yanmin
2009-01-09 1:07 ` Zhang, Yanmin
2008-12-08 3:24 ` Paul Mackerras
2008-12-08 11:33 ` Ingo Molnar
2008-12-08 12:02 ` David Miller
2008-12-08 14:41 ` Andi Kleen
2008-12-08 22:03 ` Paul Mackerras
2008-12-09 13:00 ` Ingo Molnar
2008-12-09 23:00 ` Paul Mackerras [this message]
2008-12-08 8:32 ` Corey J Ashford
2008-12-09 6:37 ` stephane eranian
2008-12-09 11:02 ` Ingo Molnar
2008-12-09 11:11 ` David Miller
2008-12-09 11:22 ` Ingo Molnar
2008-12-09 11:29 ` David Miller
2008-12-09 12:14 ` Paolo Ciarrocchi
2008-12-09 13:46 ` Ingo Molnar
2008-12-09 16:39 ` Chris Friesen
2008-12-09 19:02 ` Ingo Molnar
2008-12-09 19:51 ` Chris Friesen
2008-12-09 16:46 ` Will Newton
2008-12-09 17:35 ` Chris Friesen
2008-12-09 21:16 ` stephane eranian
2008-12-09 22:19 ` Paul Mackerras
2008-12-09 22:40 ` Andi Kleen
2008-12-10 4:44 ` Paul Mackerras
2008-12-10 5:03 ` stephane eranian
2008-12-10 10:26 ` Andi Kleen
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=18750.63619.54374.976070@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=arjan@infradead.org \
--cc=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=eranian@googlemail.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robert.richter@amd.com \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®