This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: backtrace and self-compiled module


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]