Re: [patch] Performance Counters for Linux, v4
From: Paul Mackerras
Date: Mon Dec 15 2008 - 17:53:59 EST
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.
Paul.
--
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/