Date: Sat, 27 Sep 2025 04:01:13 GMT From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 5e395c34402d - main - vfs: stop using SDT_PROBES_ENABLED in inlined ops Message-ID: <202509270401.58R41Dna014934@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5e395c34402dc3fd5c786168442290a63ff54596 commit 5e395c34402dc3fd5c786168442290a63ff54596 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2025-09-26 20:23:49 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2025-09-27 04:00:59 +0000 vfs: stop using SDT_PROBES_ENABLED in inlined ops No point after hot patching was introduced. --- sys/tools/vnode_if.awk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/tools/vnode_if.awk b/sys/tools/vnode_if.awk index 74b11e6cb27d..8e39cc2da3da 100644 --- a/sys/tools/vnode_if.awk +++ b/sys/tools/vnode_if.awk @@ -324,6 +324,10 @@ while ((getline < srcfile) > 0) { printh("extern struct vnodeop_desc " name "_desc;"); printh(""); + printh("SDT_PROBE_DECLARE(vfs, vop, " name ", entry);\n"); + printh("SDT_PROBE_DECLARE(vfs, vop, " name ", return);\n"); + printh(""); + # Print out function prototypes. printh("int " uname "_AP(struct " name "_args *);"); printh("int " uname "_APV(const struct vop_vector *vop, struct " name "_args *);"); @@ -341,10 +345,11 @@ while ((getline < srcfile) > 0) { printh("\ta.a_" args[i] " = " args[i] ";"); if (can_inline(name)) { printh("\n#if !defined(INVARIANTS) && !defined(KTR)"); - printh("\tif (!SDT_PROBES_ENABLED())"); - printh("\t\treturn (" args[0]"->v_op->"name"(&a));"); - printh("\telse"); - printh("\t\treturn (" uname "_APV("args[0]"->v_op, &a));"); + printh("\tint rc;") + printh("\tSDT_PROBE2(vfs, vop, " name ", entry, a.a_" args[0] ", &a);"); + printh("\trc = " args[0]"->v_op->"name"(&a);"); + printh("\tSDT_PROBE3(vfs, vop, " name ", return, a.a_" args[0] ", &a, rc);"); + printh("\treturn (rc);") printh("#else"); } printh("\treturn (" uname "_APV("args[0]"->v_op, &a));");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509270401.58R41Dna014934>