I've been searching for a Linux sampling profiler, and callgrind has come the closest to showing useful results. However the overhead is estimated at 20--100x slower than normal. Additionally, I'm only interested in time spent per function (with particular emphasis on blocking calls such as read()
and write()
, which no other profiler will faithfully display).
- Is there a way to turn off excess options, so that just the minimum data is recorded for generating times spent in various call stacks?
- Does callgrind's cachegrind heritage imply that excess stuff is being done with regards to cache profiling etc?
- I assume callgrind operates like a debugger. Can this be adjusted to sample the process at intervals, rather than every single instruction?