Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2002 00:52:28 -0800
From:      Justin Erenkrantz <jerenkrantz@ebuilt.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Jos Backus <josb@cncdsl.com>, hackers@freebsd.org
Subject:   Re: Solaris /usr/proc/bin/pstack functionality?
Message-ID:  <20020103085228.GK10582@ebuilt.com>
In-Reply-To: <200201030829.g038TuG63107@apollo.backplane.com>
References:  <20020103072813.GB14656@lizzy.bugworks.com> <200201030734.g037YxI62790@apollo.backplane.com> <20020103075242.GC14656@lizzy.bugworks.com> <200201030829.g038TuG63107@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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