* Luke Gorrie: > On 14 October 2013 14:33, Mike Pall <mike-1310@xxxxxxxxxx> wrote: > >> Umm, it's the other way round: SIGPROF is generated from a timer >> at fixed intervals. The counters for these events can then be >> sampled in the signal handler or the callback triggered by it. >> > > In that case, I suppose there's no real chance for line-based profiling, > since Instruction Pointer won't correlate well with the specific event of > interest. In my experience, it works pretty well, except that the tools I used (oprofile and perf, IIRC) sometimes attribute the cost to the following instruction, and not actually to the expensive one.