Date: Wed, 31 Mar 2021 16:07:14 GMT From: Ed Maste <emaste@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7745d7159777 - releng/13.0 - Tune DTrace 'aframes' for the FBT and profile providers on arm64. Message-ID: <202103311607.12VG7EV3097839@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch releng/13.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7745d71597771f193b1bfb0b4d8842cea16ef6d4 commit 7745d71597771f193b1bfb0b4d8842cea16ef6d4 Author: Robert Watson <rwatson@FreeBSD.org> AuthorDate: 2021-03-21 00:01:54 +0000 Commit: Ed Maste <emaste@FreeBSD.org> CommitDate: 2021-03-31 16:03:53 +0000 Tune DTrace 'aframes' for the FBT and profile providers on arm64. In both cases, too few frames were trimmed, leading to exception handling or DTrace internals being exposed in stack traces exposed by D's stack() primitive. Reviewed by: emaste, andrew Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D29356 (cherry picked from commit 599fb1d198ec6792ba062114d2589ca9f01a3568) (cherry picked from commit fcc700abe4fa85b0f0ec9d953436725533cecc17) --- sys/cddl/dev/fbt/aarch64/fbt_isa.c | 5 +++-- sys/cddl/dev/profile/profile.c | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c index f15bc12291d3..6bc351ad74f6 100644 --- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c +++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c @@ -44,6 +44,7 @@ #define FBT_PATCHVAL (AARCH64_BRK | AARCH64_BRK_IMM16_VAL) #define FBT_ENTRY "entry" #define FBT_RETURN "return" +#define FBT_AFRAMES 4 int fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval) @@ -141,7 +142,7 @@ fbt_provide_module_function(linker_file_t lf, int symindx, fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); fbt->fbtp_name = name; fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_ENTRY, 3, fbt); + name, FBT_ENTRY, FBT_AFRAMES, fbt); fbt->fbtp_patchpoint = instr; fbt->fbtp_ctl = lf; fbt->fbtp_loadcnt = lf->loadcnt; @@ -183,7 +184,7 @@ again: fbt->fbtp_name = name; if (retfbt == NULL) { fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_RETURN, 3, fbt); + name, FBT_RETURN, FBT_AFRAMES, fbt); } else { retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id; diff --git a/sys/cddl/dev/profile/profile.c b/sys/cddl/dev/profile/profile.c index 4fc9f6f22eef..ca373f50a1a0 100644 --- a/sys/cddl/dev/profile/profile.c +++ b/sys/cddl/dev/profile/profile.c @@ -140,8 +140,7 @@ struct profile_probe_percpu; #endif #ifdef __aarch64__ -/* TODO: verify */ -#define PROF_ARTIFICIAL_FRAMES 10 +#define PROF_ARTIFICIAL_FRAMES 12 #endif #ifdef __riscv
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103311607.12VG7EV3097839>