]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix the stack tracing for dtrace/powerpc.
authorjhibbits <jhibbits@FreeBSD.org>
Wed, 17 Sep 2014 02:43:47 +0000 (02:43 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Wed, 17 Sep 2014 02:43:47 +0000 (02:43 +0000)
commit2ae1525481cce5e01125c108954d8676b454cf3e
tree7c11b2b6c515565a09d119153095b5a8223e92a6
parentf38530676caf0a6e9637453a93d886cd96f5c9ae
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
sys/cddl/dev/dtrace/powerpc/dtrace_isa.c
sys/cddl/dev/fbt/powerpc/fbt_isa.c