From: bert hubert <ahu@ds9a.nl>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: perfctr questions
Date: Fri, 2 Jul 2004 13:04:46 +0200 [thread overview]
Message-ID: <20040702110446.GA5954@outpost.ds9a.nl> (raw)
In-Reply-To: <200407021021.i62ALBD9015819@harpo.it.uu.se>
On Fri, Jul 02, 2004 at 12:21:11PM +0200, Mikael Pettersson wrote:
> Should the kernel driver directly support some user-friendly
> model of the counters? No it should not, for several reasons:
We are in violent agreement - however, I do find that for a product to be
properly evaluated and to receive testing coverage, it is vital that the
learning curve not be this steep.
Right now, PAPI does not build for perfctr 2.7.3 (at least for me), nor do
Bryan's modifications. Furthermore, I had to reverse engineer a lot of
details to get my own things working.
I also read the AMD documentation and it is worthless and spends all of
three pages on the performance counters.
The good news however is that things do appear to work. What I'll do is whip
up a very small bootstrapping document. I'm sure PAPI is fine but for
many/my purposes it is overkill, I'd like for people to be able to
understand enough of perfctrs so they can start using them.
Like this:
CacheMeter cm;
for(unsigned int n=0;n<iterations;++n) {
c=area[(n*64)%limit];
total+=c; // force gcc to actually look at it
}
cm.print();
Will do 100000000 reads over range of 10000000 bytes
Data cache accesses: 100109359
Data cache misses: 99977036
L2 hit, L1 miss: 26395
L2 miss, L1 miss: 1540114
Will do 100000000 reads over range of 1000 bytes
Data cache accesses: 100047618
Data cache misses: 8523
L2 hit, L1 miss: 0
L2 miss, L1 miss: 664
Code on htp://ds9a.nl/tmp/cmeter.cc - will only work on AMD and is in C++.
People with AMD knowledge are kindly invited to elaborate on the meaning of
'cache miss' v 'l2 and l2 miss' :-)
Mikael, thanks, this stuff is powerful and it will enable people to write
better code!
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
next prev parent reply other threads:[~2004-07-02 11:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-02 10:21 Mikael Pettersson
2004-07-02 11:04 ` bert hubert [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-07-01 22:04 bert hubert
2004-07-01 22:19 ` Bryan O'Sullivan
2004-07-01 22:56 ` bert hubert
2004-07-01 23:26 ` bert hubert
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=20040702110446.GA5954@outpost.ds9a.nl \
--to=ahu@ds9a.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
/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®