This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Profiling forked processes
- To: "'binutils at sourceware dot cygnus dot com'" <binutils at sourceware dot cygnus dot com>
- Subject: Profiling forked processes
- From: Steve Gonczi <Steve dot Gonczi at networkengines dot com>
- Date: Wed, 21 Feb 2001 19:21:03 -0500
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