[DTrace-devel] [PATCH 08/17] dtprobed: fix probe name debug output

Kris Van Hees kris.van.hees at oracle.com
Sat Jun 7 06:15:01 UTC 2025


Debug output while reading dof_parsed_t structures was printing the
probe names as provider->provider.name and probe->probe.name, but
probe.name is a 0-separated concatenation of the probe name elements.
It only printed the module name.  Corrected to print the full probe
name.

Also moved it to the proper place (when a new probe is read rather
than for every tracepoint).

Signed-off-by: Kris Van Hees <kris.van.hees at oracle.com>
Reviewed-by: Nick Alcock <nick.alcock at oracle.com>
Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
---
 dtprobed/dtprobed.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/dtprobed/dtprobed.c b/dtprobed/dtprobed.c
index dfdce02c..de15e546 100644
--- a/dtprobed/dtprobed.c
+++ b/dtprobed/dtprobed.c
@@ -802,6 +802,18 @@ process_dof(pid_t pid, int out, int in, dev_t dev, ino_t inum, dev_t exec_dev,
 			if (!probe || probe->type != DIT_PROBE)
 				goto err;
 
+			if (_dtrace_debug) {
+				const char *mod, *fun, *prb;
+
+				mod = probe->probe.name;
+				fun = mod + strlen(mod) + 1;
+				prb = fun + strlen(fun) + 1;
+				fuse_log(FUSE_LOG_DEBUG,
+					 "Parser read: adding %s:%s:%s:%s to stash\n",
+					 provider->provider.name,
+					 mod, fun, prb);
+			}
+
 			if (dof_stash_push_parsed(&accum, probe) < 0)
 				goto oom;
 
@@ -814,9 +826,6 @@ process_dof(pid_t pid, int out, int in, dev_t dev, ino_t inum, dev_t exec_dev,
 				    tp->type == DIT_PROBE || tp->type == DIT_EOF)
 					goto err;
 
-				fuse_log(FUSE_LOG_DEBUG, "Parser read: adding %s:%s to stash\n",
-					 provider->provider.name, probe->probe.name);
-
 				if (dof_stash_push_parsed(&accum, tp) < 0)
 					goto oom;
 
-- 
2.45.2




More information about the DTrace-devel mailing list