First one note about your comparison with truss. As you said, truss follows
child processes when tracing system calls. But system calls != user-land
functions. Actually you can write dtrace script which will trace system calls
of your program and will follow forked child processes as well as  truss -fall
is doing it using syscall provider - it's probes are system-wide so there's
really nothing that would avoid you to write a d script which would trace
syscalls, and log down only those records which would match particular
PID and all its child PIDs (it is easy within dtrace to track PIDs and
dynamically
keep PID tree of some process).

When doing user-land tracing, child following is much more complicated. See
https://www.opensolaris.org/jive/thread.jspa?messageID=226151

Remek

On Wed, Nov 5, 2008 at 11:21 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I have an executable. When I attach a truss, we have to give $truss -o 
> truss.out -fall ./a.out. It shows all system calls made by this program and 
> all the child processes it forks.
>
> Where as if I am using a DTrace script I am not able to do it.
>
> ./sample.d -c "a.out"
> pid$1::somefunctionname:entry
> {
>    printf("%s is called by %d",probefunc, tid);
> }
>
>
>
>
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org
>
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to