git: 903d29469ecb - main - vnode_if: Remove some branching around SDT probes in VOP wrappers
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 May 2025 14:39:56 UTC
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=903d29469ecb4212c2eed382dc0c5d4536d413b0 commit 903d29469ecb4212c2eed382dc0c5d4536d413b0 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-05-22 14:37:49 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-05-22 14:37:49 +0000 vnode_if: Remove some branching around SDT probes in VOP wrappers Now that SDT is implemented using hot-patching, SDT_PROBE* no longer introduces a branch instruction, so the SDT_PROBES_ENABLED() check in each VOP_*_APV() is not really worth preserving. Reviewed by: olce, kib Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50423 --- sys/tools/vnode_if.awk | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index 2326d0e28956..d23c2af9bd9a 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -401,13 +401,9 @@ while ((getline < srcfile) > 0) { add_pre(name); for (i = 0; i < numargs; ++i) add_debug_code(name, args[i], "Entry", "\t"); - printc("\tif (!SDT_PROBES_ENABLED()) {"); - printc("\t\trc = vop->"name"(a);") - printc("\t} else {") - printc("\t\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);"); - printc("\t\trc = vop->"name"(a);") - printc("\t\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);"); - printc("\t}") + printc("\tSDT_PROBE2(vfs, vop, " name ", entry, a->a_" args[0] ", a);"); + printc("\trc = vop->"name"(a);") + printc("\tSDT_PROBE3(vfs, vop, " name ", return, a->a_" args[0] ", a, rc);"); printc("\tif (rc == 0) {"); for (i = 0; i < numargs; ++i) add_debug_code(name, args[i], "OK", "\t\t");