Re: perfctr questions

From: bert hubert
Date: Thu Jul 01 2004 - 18:28:48 EST


On Thu, Jul 01, 2004 at 03:19:54PM -0700, Bryan O'Sullivan wrote:

> > I'm trying to test your performance counters stuff, but I can't get it to do
> > anything remotely useful! Probably just me.

Ok, it is working. This is a plot of the number of L2 Address Strobes
counted while scanning a buffer of x bytes: http://ds9a.nl/tmp/strobes.png

>From dmesg:
CPU: L1 I cache: 32K, L1 D cache: 32K

Note the sharp rise at 32768 bytes!

int main(int argc, char **argv)
{
char *memory;
int len=atoi(argv[1]);
memory=malloc(len);
int n, count;
for(count=0;count<10000;++count)
for(n=1;n<len;++n) {
memory[n]++;
}
}

Script:

for a in $(seq 30000 10 35000) ; do perfex -o log -e 0x00410021 ./null $a ;
echo -n "$a " ; tail -1 log | awk '{print $3}'; done > line

The '21' stands for P6_L2_ADS.

Cool stuff!

Regards,

bert

--
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/