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: print_backtrace not printing full stack


Mike Mason <mmlnx@us.ibm.com> writes:

> Is there some trick to getting print_backtrace to work?  The following
> script:
> probe syscall.open.return { [...]
>                  print_backtrace();
> I get one line from the stack and that's it. I assume I should see the
> full stack.

If by "full stack" you mean to include the user-space program that
performed open(2), then unfortunately we can't do that yet.  We also
know that kretprobes did or does have problems with corrupting
backtraces for even plain nested kernel-side probes.  To some extent,
one might work around this by storing the backtrace at the point of
syscall entry thusly:

global bt
probe syscall.open { bt[tid()] = backtrace() }
probe syscall.open.return { if (...) { print_stack (bt[tid()]) } 
                            /* delete bt[tid()] */ }

- FChE


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