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


Hmm... I didn't think about the user portion of the stack being missing. Perhaps open() isn't a good example. I tried probing the entry to open()and printing the backtrace. Saw the same results. Then I tried a few other probe points, including schedule() in sched.c. No matter where I probe, I only get one line of the stack.

Mike

Frank Ch. Eigler wrote:
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]