From owner-dev-commits-src-all@freebsd.org Wed Mar 31 16:07:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BA85E57CE7A; Wed, 31 Mar 2021 16:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F9WRQ4yfwz3n0L; Wed, 31 Mar 2021 16:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DA151C628; Wed, 31 Mar 2021 16:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 12VG7EAg097841; Wed, 31 Mar 2021 16:07:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12VG7EV3097839; Wed, 31 Mar 2021 16:07:14 GMT (envelope-from git) Date: Wed, 31 Mar 2021 16:07:14 GMT Message-Id: <202103311607.12VG7EV3097839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 7745d7159777 - releng/13.0 - Tune DTrace 'aframes' for the FBT and profile providers on arm64. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 7745d71597771f193b1bfb0b4d8842cea16ef6d4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2021 16:07:14 -0000 The branch releng/13.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7745d71597771f193b1bfb0b4d8842cea16ef6d4 commit 7745d71597771f193b1bfb0b4d8842cea16ef6d4 Author: Robert Watson AuthorDate: 2021-03-21 00:01:54 +0000 Commit: Ed Maste 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