aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2025-09-26 20:23:49 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2025-09-27 04:00:59 +0000
commit5e395c34402dc3fd5c786168442290a63ff54596 (patch)
tree59b5d4bd3551a8893940bc44390bb15504720c4c
parent7e4c451c12aeb26cc1179221b8230c491b17cf00 (diff)
vfs: stop using SDT_PROBES_ENABLED in inlined ops
No point after hot patching was introduced.
-rw-r--r--sys/tools/vnode_if.awk13
1 files 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));");