diff --git a/sys/cddl/dev/dtrace/arm/dtrace_isa.c b/sys/cddl/dev/dtrace/arm/dtrace_isa.c index c054702655ac..8e56a44165d9 100644 --- a/sys/cddl/dev/dtrace/arm/dtrace_isa.c +++ b/sys/cddl/dev/dtrace/arm/dtrace_isa.c @@ -73,7 +73,6 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, int aframes, 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 pcstack_limit, int aframes, 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]; }