From owner-freebsd-hackers Thu Jan 3 0:52:36 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mutley.ebuilt.net (nat.ebuilt.com [209.216.46.200]) by hub.freebsd.org (Postfix) with ESMTP id A567737B405 for ; Thu, 3 Jan 2002 00:52:34 -0800 (PST) Received: (from root@localhost) by mutley.ebuilt.net (8.11.1/8.11.1) id g038qT309839 for ; Thu, 3 Jan 2002 00:52:29 -0800 Received: from cerberus.ebuilt.net (cerberus.ebuilt.net [192.168.168.110]) by mutley.ebuilt.net (8.11.1/8.11.1) with ESMTP id g038qSC09758; Thu, 3 Jan 2002 00:52:28 -0800 Received: (from jerenkrantz@localhost) by cerberus.ebuilt.net (8.9.3+Sun/8.9.1) id AAA11956; Thu, 3 Jan 2002 00:52:28 -0800 (PST) Date: Thu, 3 Jan 2002 00:52:28 -0800 From: Justin Erenkrantz To: Matthew Dillon Cc: Jos Backus , hackers@freebsd.org Subject: Re: Solaris /usr/proc/bin/pstack functionality? Message-ID: <20020103085228.GK10582@ebuilt.com> References: <20020103072813.GB14656@lizzy.bugworks.com> <200201030734.g037YxI62790@apollo.backplane.com> <20020103075242.GC14656@lizzy.bugworks.com> <200201030829.g038TuG63107@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200201030829.g038TuG63107@apollo.backplane.com> User-Agent: Mutt/1.3.23.2i X-AntiVirus: scanned for viruses by AMaViS 0.2.1-pre3 (http://amavis.org/) 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 Thu, Jan 03, 2002 at 12:29:56AM -0800, Matthew Dillon wrote: > I dunno about pstack. What does it do? Dump stack backtraces for > the threads? libc_r does use a fairly well-defined thread stack > arrangement. It should be possible to write a program (or a gdb > script) to track the stacks down and dump their backtraces. > > Tracing userland procedure calls is more difficult. I do not believe > that the i386 has a separate trace trap for subroutine calls, it just > has a single-step trace trap, so a userland trace would have to be > built into the program (e.g. like profiling is with -pg). pstack on Solaris includes user and system calls for all threads (LWP or kernel) in a process (if built with -g). This is even on x86 machines. I don't have any more info than this though. However, even if we could get just the stack portion that libc_r maintains, it would be of great benefit. In Apache 2.0-land, we are currently trying to sift through potential libc_r problems. We hope to file bugs as we can isolate them - as we did for sendfile(2). We have currently identified three potential issues, but we are having trouble narrowing them down past that and generating reproducable test cases that will be of help to FreeBSD developers. -- justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message