[lkml]   [2008]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] Performance Counters for Linux, v4
Vince Weaver writes:

> I'm trying a more complicated benchmark and getting even stranger
> results.
> This is still on the Q6600 machine
> The benchmark does a loop, reading some memory. It should have
> roughly:
> 12295 instructions
> 4096 memory loads
> 4096 branches
> perfmon3 is close on all of these stats, and this is consistent
> across runs with a small variation (+/- 3 or so).
> The timec program returns 0 (!) for all of the stats except
> retired instruction count! And with certain combinations
> of counters I get 0 for all counts. No error messages
> are printed.
> Is this expected behavior?

When you have more software counters than hardware counters, the
kernel will be time-slicing the counters, but because your program
doesn't run for very long, it's possible that only the first set will
ever get to count anything.

That doesn't seem to explain all the 0 values (since the kernel should
be able to use at least 2 hardware counters on your machine, I expect)
but it might be part of the explanation.


 \ /
  Last update: 2008-12-15 23:57    [W:0.082 / U:2.572 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site