Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2002 23:52:20 -0800
From:      Jos Backus <josb@cncdsl.com>
To:        hackers@FreeBSD.ORG
Cc:        Justin Erenkrantz <jerenkrantz@ebuilt.com>
Subject:   Re: Solaris /usr/proc/bin/pstack functionality?
Message-ID:  <20020103075242.GC14656@lizzy.bugworks.com>
In-Reply-To: <200201030734.g037YxI62790@apollo.backplane.com>
References:  <20020103072813.GB14656@lizzy.bugworks.com> <200201030734.g037YxI62790@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 02, 2002 at 11:34:59PM -0800, Matthew Dillon wrote:
>     Well, ktrace -i will certainly follow children.  In fact, ktrace can
>     attach to all current children (-d) of a process as well as attach to 
>     new children.  Yahoo found a few bugs in ktrace by running
>     'ktrace -i -d -p 1'.  Think about what that does :-)
> 
>     If ktrace can do it, I'm sure truss could be made to do it.

Here's what pstack does:

     pstack    Print a hex+symbolic stack trace for each  lwp  in
               each process.

Solaris truss(1) has this:

     -l        Includes the id  of  the  responsible  lightweight
               process  (LWP)  with each line of trace output. If
               -f is also specified, both the process-id and  the
               LWP-id are included.

Justin says:
    Yup, we're all scratching our heads right now at some weirdness
    going on with select()/poll(), but all we can see is the kernel
    primitives.  *sigh*  Our job would be a lot easier if we had
    pstack.  =)

So the question is, does ktrace in fact have this functionality? He's talking
about LWPs, which I am assuming (please correct me if I am wrong) equates to
libc_r on FreeBSD.

Fwiw, I'm asking as an interested 3rd party. Thanks!

> 						-Matt

-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
josb@cncdsl.com     _/_/   _/_/_/            use Std::Disclaimer;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020103075242.GC14656>