Date: Wed, 29 Nov 2006 15:47:01 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Scott Long <scottl@samsco.org> Cc: jb@freebsd.org, John Birrell <jb@what-creek.com>, freebsd-current@freebsd.org, Rene Ladan <r.c.ladan@gmail.com> Subject: Re: calcru-triggered panic? Message-ID: <200611292347.kATNl1sX049274@apollo.backplane.com> References: <45622068.2050705@student.tue.nl> <200611291204.03716.jhb@freebsd.org> <20061129223221.GA359@what-creek.com> <456E0C66.4060404@samsco.org> <20061129225025.GA584@what-creek.com> <456E0EDA.60603@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
:I don't know how to do it in a platform-independent way. For i386,
:I'd check %esp and see if it's getting close to a 2x page boundary.
:
:Scott
It's really easy. Just pre-initialize the stack to a fixed value when
it is allocated, like 0xabcd1234, then write a little KVM utility which
scans the stack for each thread on the system, determines how much of it
is used, and prints out the values.
You can also figure out approximately what routines were running so
deep in the stack by scanning the used portion of the stack for
procedural return PCs. There are usually a ton scattered around
the stack.
-Matt
Matthew Dillon
<dillon@backplane.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200611292347.kATNl1sX049274>
