On Sun, Jul 27, 2014 at 4:42 PM, George Neville-Neil <g...@neville-neil.com> wrote: > Chiming in late, but don't you mean instruction-retired instead of > CPU_CLK_UNHALTED_CORE? > > Best, > George
In my experience instruction-retired gives very misleading profiler output in most cases. The problem is that instruction-retired gives equal weight to all instructions, which means that it does not take into account instructions with long latencies because they (for example) missed the cache. CPU_CLK_UNHALTED_CORE (or its alias, unhalted-cycles) is a much better event because it is a nearer proxy for time-based sampling, which is really what you're interested in when trying to reduce runtime of processes. My one big complaint with unhalted-cycles is that it does not take into effect CPU time spent in busy-wait loops that use the pause instruction, so it vastly unweights time spent adaptively spinning on kernel mutexes, for instance. I'm also not sure what it does when the CPU is adjusting its frequency, but that's not a case that I ever have to deal with personally. _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"