Date: Mon, 4 Jun 2018 14:16:01 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r334613 - stable/11/sys/cddl/dev/dtrace/aarch64 Message-ID: <201806041416.w54EG1cO041518@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806041416.w54EG1cO041518>