freebsd-dev/sys/cddl
Justin Hibbits e40a5cd3ec Fix the stack tracing for dtrace/powerpc.
Summary:
Fix the stack tracing for dtrace/powerpc by using the trapexit/asttrapexit
return address sentinels instead of checking within the kernel address space.

As part of this, I had to add new inline functions.  FBT traces the kernel, so
we have to have special case handling for this, since a trap will create a full
new trap frame, and there's no way to pass around the 'real' stack.  I handle
this by special-casing 'aframes == 0' with the trap frame.  If aframes counts
out to the trap frame, then assume we're looking for the full kernel trap frame,
so switch to the real stack pointer.

Test Plan: Tested on powerpc64

Reviewers: rpaulo, markj, nwhitehorn

Reviewed By: markj, nwhitehorn

Differential Revision: https://reviews.freebsd.org/D788

MFC after:	3 week
Relnotes:	Yes
2014-09-17 02:43:47 +00:00
..
boot/zfs MFV r271510: 2014-09-13 16:26:14 +00:00
compat/opensolaris Ensure that ZFS ARC free memory checks include cached pages 2014-08-30 21:44:32 +00:00
contrib/opensolaris Added missing ZFS sysctls 2014-09-14 12:23:00 +00:00
dev Fix the stack tracing for dtrace/powerpc. 2014-09-17 02:43:47 +00:00