svn commit: r334613 - stable/11/sys/cddl/dev/dtrace/aarch64
Mark Johnston
markj at FreeBSD.org
Mon Jun 4 14:16:02 UTC 2018
Author: markj
Date: Mon Jun 4 14:16:01 2018
New Revision: 334613
URL: https://svnweb.freebsd.org/changeset/base/334613
Log:
MFC r333570:
DTrace aarch64: Avoid calling unwind_frame() in the probe context.
Modified:
stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c
==============================================================================
--- stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c Mon Jun 4 14:15:03 2018 (r334612)
+++ stable/11/sys/cddl/dev/dtrace/aarch64/dtrace_isa.c Mon Jun 4 14:16:01 2018 (r334613)
@@ -70,7 +70,7 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in
{
struct unwind_state state;
int scp_offset;
- register_t sp;
+ register_t sp, fp;
int depth;
depth = 0;
@@ -88,11 +88,15 @@ dtrace_getpcstack(pc_t *pcstack, int pcstack_limit, in
state.pc = (uint64_t)dtrace_getpcstack;
while (depth < pcstack_limit) {
- if (unwind_frame(&state))
- break;
-
if (!INKERNEL(state.pc) || !INKERNEL(state.fp))
break;
+
+ fp = state.fp;
+ state.sp = fp + 0x10;
+ /* FP to previous frame (X29) */
+ state.fp = *(register_t *)(fp);
+ /* LR (X30) */
+ state.pc = *(register_t *)(fp + 8) - 4;
/*
* NB: Unlike some other architectures, we don't need to
More information about the svn-src-stable-11
mailing list