Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
testing: collect performance counters for benchmarks #21295
Performance counters may be helpful for benchmarking:
It may be hard to do it in a portable way. But doing it only on platforms that are available would still be nice.
Here's a more concrete proposal as a starting point.
On Linux, this would be built on the kernel's
changed the title from
proposal: testing: collect performance counters for benchmarks
testing: collect performance counters for benchmarks
Oct 9, 2017
Please do give some thought to having a few -counters= names that work portably across architectures. If there's a cycle count for x86 and one for arm it would be nice if there is a single name that enables either one, for example. (I'm assuming this is a comma-separated list and that unknown things are just ignored, or something like that.)
FWIW, Linux perf has a list of portable names already, printed by
For reference, here are the "Hardware events": branch-instructions (alias branches), branch-misses, bus-cycles, cache-misses, cache-references, cpu-cycles (alias cycles), instructions, ref-cycles.