svn commit: r280038 - head/sys/cddl/dev/dtrace/arm
Robert Watson
rwatson at FreeBSD.org
Sun Mar 15 15:17:35 UTC 2015
Author: rwatson
Date: Sun Mar 15 15:17:34 2015
New Revision: 280038
URL: https://svnweb.freebsd.org/changeset/base/280038
Log:
On ARM, unlike some other architectures, saved $pc values from in-kernel
traps do appear in the regular call stack, rather than only in a special
trap frame, so we don't need to inject the trap-frame $pc into a returned
stack trace in DTrace.
MFC after: 3 days
Sponsored by: DARPA, AFRL
Modified:
head/sys/cddl/dev/dtrace/arm/dtrace_isa.c
Modified: head/sys/cddl/dev/dtrace/arm/dtrace_isa.c
==============================================================================
--- head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Sun Mar 15 14:57:11 2015 (r280037)
+++ head/sys/cddl/dev/dtrace/arm/dtrace_isa.c Sun Mar 15 15:17:34 2015 (r280038)
@@ -73,7 +73,6 @@ dtrace_getpcstack(pc_t *pcstack, int pcs
register_t sp;
int scp_offset;
int depth = 0;
- pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller;
if (intrpc != 0)
pcstack[depth++] = (pc_t) intrpc;
@@ -92,13 +91,14 @@ dtrace_getpcstack(pc_t *pcstack, int pcs
done = unwind_stack_one(&state, 1);
+ /*
+ * NB: Unlike some other architectures, we don't need to
+ * explicitly insert cpu_dtrace_caller as it appears in the
+ * normal kernel stack trace rather than a special trap frame.
+ */
if (aframes > 0) {
aframes--;
- if ((aframes == 0) && (caller != 0)) {
- pcstack[depth++] = caller;
- }
- }
- else {
+ } else {
pcstack[depth++] = state.registers[PC];
}
More information about the svn-src-all
mailing list