This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Profiling forked processes


Greetings,
 
This is really a gprof question, but it needs a bit of a preamble:
 
I am attempting to profile smbd 2.0.7. This app forks a bunch of worker processes.
My gmon.out looks out of sorts.. e.g.: a huge amount of time is charged to
_syscall_sys_fork, and the self/total time of _syscall_sys_fork is exactly the same.
My OS is BSDI 4.1.
 
Based on the above, I jump to the conclusion that the main process is getting profiled,
but the workers do not. Am I right?
 
I see support for the PROFDIR (GPROFDIR?) environmental variable to afford a way of
dealing with this in some versions of gprof, at least on some OS -es.
 
-How can I determine if the current, mainline gprof in binutils 2.10.1 has support for this?
(Perhaps this feature is proprietary to some UNIX-es such as HP-UX, Compaq true64, and
NetBSD...)
 
-Is there some other way of profiling a forked process?
 
TIA
 
/sG

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]