lkml.org 
[lkml]   [2004]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectperfctr questions
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.054 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site