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