I have a program I want to profile with gprof. The problem (seemingly) is that it uses sockets. So I get things like this:
::select(): Interrupted system call
I hit this problem a while back, gave up, and moved on. But I would really like to be able to profile my code, using gprof if possible. What can I do? Is there a gprof option I’m missing? A socket option? Is gprof totally useless in the presence of these types of system calls? If so, is there a viable alternative?
EDIT: Platform:
- Linux 2.6 (x64)
- GCC 4.4.1
- gprof 2.19
The socket code needs to handle interrupted system calls regardless of profiler, but under profiler it’s unavoidable. This means having code like.
after each system call.
Take a look, for example, here for the background.