Re: [patch] Performance Counters for Linux, v4

From: Vince Weaver
Date: Tue Dec 16 2008 - 11:50:54 EST



On Tue, 2008-12-16 at 08:42 +1100, Paul Mackerras wrote:
Furthermore, I think output of tools such as time and now timec are most
relevant when compared between runs - that is, the change in values
between runs, not the absolute values as such. At least, that's what I
usually do:

That's doesn't do you any good when comparing results across different machines, or even different kernels on the same machine.

perfmon shows that good results can be had, even if it's not the cleanest way in the world. It would be a shame to lose that.

Small micro-benchmarks like this are important. You can't always trust the performance counters to work, so being able to sanity check them with exact test-cases is critical. Otherwise you might just be measuring nonsense.

And while it might be able to subtract the exec() overhead for something like retired instructions, it gets a lot more complicated when you have something like cache bus snoops or branch mispredicts where it's hard to tell what comes from the program and what is overhead from the monitoring infrastructure.

Vince
--
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/