]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: record current IP as frame 0 in ustack
authorKris Van Hees <kris.van.hees@oracle.com>
Thu, 2 Jul 2015 22:36:21 +0000 (18:36 -0400)
committerKris Van Hees <kris.van.hees@oracle.com>
Tue, 21 Jul 2015 06:51:24 +0000 (02:51 -0400)
commit0bef92d4b586ef66be0bc5571b8fce76fba79cb1
tree01ce9ff245f8b4c751bd43b7e915e648ba726649
parent2a5a3c7b83d9596366ee5583784175f5867e05c4
dtrace: record current IP as frame 0 in ustack

When requesting a userspace stack trace, the initial frame instruction
pointer should be recorded as frame 0, with the remainder of the stack
trace being filled in based on the stack content.  Previously, all the
IP values were taken from the stack.  Special handling is provided for
obtaining the correct value of the stack pointer because in pre-4.1
kernels, there isn't an arch-independent way to do so.  Once support
for 4.0 is no longer necessary, this can be generalized by using the
current_user_stack_pointer() macro.

If the current task is not a userspace task, an empty stack trace is
returned (and ustackdepth will also report 0).

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
dtrace/dtrace_isa.c