From: bert hubert <ahu@ds9a.nl>
To: Mikael.Pettersson@csd.uu.se
Cc: linux-kernel@vger.kernel.org
Subject: perfctr questions
Date: Fri, 2 Jul 2004 00:04:48 +0200 [thread overview]
Message-ID: <20040701220448.GA16515@outpost.ds9a.nl> (raw)
Mikael,
I'm trying to test your performance counters stuff, but I can't get it to do
anything remotely useful! Probably just me.
I have a very hard time understanding things like:
* perfex -e 0x00039000/0x04000204@0x8000000C some_program
*
* Explanation: Program IQ_CCCR0 with required flags, ESCR select 4
* (== CRU_ESCR0), and Enable. Program CRU_ESCR0 with event 2
* (instr_retired), NBOGUSNTAG, CPL>0. Map this event to IQ_COUNTER0
* (0xC) with fast RDPMC enabled.
I'd love to author a small perfctr howto for people like me who just want to
know if their code is thrashing the cache.
Do you have a pointer to tools that do this, or, how to calculate these
0x00039000 numbers for perfex? I can't find anything relevant. The best
information I found is in the 'hardmeter' sources.
I tried one very basic thing, perfex -e 0x00410005 ./null which I hoped
would measure unaligned memory accesses, but I can't get this counter raised
from 0. null.c:
int main(int argc, char **argv)
{
char room[12];
int i, n;
for(n=0;n<1000000;++n) {
i=*((int*)(room+n%4));
}
printf("%d\n", i);
}
I'm on a Pentium M, 2.6.7-mm5. Not even sure if an Pentium M will measure
cache misses though.
Thanks
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
next reply other threads:[~2004-07-01 22:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-01 22:04 bert hubert [this message]
2004-07-01 22:19 ` Bryan O'Sullivan
2004-07-01 22:56 ` bert hubert
2004-07-01 23:26 ` bert hubert
2004-07-02 10:21 Mikael Pettersson
2004-07-02 11:04 ` 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=20040701220448.GA16515@outpost.ds9a.nl \
--to=ahu@ds9a.nl \
--cc=Mikael.Pettersson@csd.uu.se \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®