The application does not calculate things, but does i/o, read files, uses network. I want profiler to show it.
I expect something like something like in callgrind that c
There's no real way to answer that question without knowing your platform and a little more about what you are trying to do.
When I'm running on an Intel platform, I like to use the Time Stamp Counter (RDTSC). It is tough to beat resoultion in the sub-microsecond range. I just put a call to it before and after a chunk of code, and compare the difference.
Quickly hacked up trivial sampling profiler for linux: http://vi-server.org/vi/simple_sampling_profiler.html
It appends backtrace(3)
to a file on SIGUSR1
, and then converts it to annotated source.
As it probes the program periodically, we'll see functions that waits for something.
And as it walks the stack, we'll see callers too.
Also people from answers to similar questions recommends Zoom.