This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: backtrace and self-compiled module
- From: Mark Wielaard <mjw at redhat dot com>
- To: Christian Kaiser <kaiser at dolphinics dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 03 Jun 2009 19:53:25 +0200
- Subject: Re: backtrace and self-compiled module
- References: <4A2683AF.8020202@dolphinics.com>
Hi Christian,
On Wed, 2009-06-03 at 16:07 +0200, Christian Kaiser wrote:
> I have a question related to the 'backtrace()' function in conjunction
> with self-compiled modules. Running my script (see below) on a kernel
> functions gives correct output while running it on a module from our
> drivers gives mostly only two correct lines. I have to switch between
> line three and four of my script to swap between kernel functions and
> module functions.
> [...]
> Any comments are welcome!
If you script doesn't probe anything in the kernel proper (like in your
second module example) stap doesn't know to include the symbol and
unwind tables of the kernel itself. To make your second example unwind
through and show the functions inside the kernel proper add -d kernel:
stap -d kernel -v stack_trace.stp sunrpc cache_cleanup
Maybe we should just always include the kernel symbols/unwind table by
default to prevent surprises like you got.
Cheers,
Mark