From owner-freebsd-hackers Wed Jan 2 23:52:24 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from w250.z064001178.sjc-ca.dsl.cnc.net (w250.z064001178.sjc-ca.dsl.cnc.net [64.1.178.250]) by hub.freebsd.org (Postfix) with SMTP id C17C237B419 for ; Wed, 2 Jan 2002 23:52:21 -0800 (PST) Received: (qmail 20899 invoked by uid 1000); 3 Jan 2002 07:52:42 -0000 Date: Wed, 2 Jan 2002 23:52:20 -0800 From: Jos Backus To: hackers@FreeBSD.ORG Cc: Justin Erenkrantz Subject: Re: Solaris /usr/proc/bin/pstack functionality? Message-ID: <20020103075242.GC14656@lizzy.bugworks.com> Reply-To: Jos Backus Mail-Followup-To: hackers@FreeBSD.ORG, Justin Erenkrantz References: <20020103072813.GB14656@lizzy.bugworks.com> <200201030734.g037YxI62790@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200201030734.g037YxI62790@apollo.backplane.com> User-Agent: Mutt/1.3.24i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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