[DTrace-devel] [PATCH] Allow arbitrary tracefs mount points
Eugene Loh
eugene.loh at oracle.com
Thu Nov 7 01:14:16 UTC 2024
The whole thing with dtp->dt_tracefs_file is... interesting. We store a
temporary string in dtp-> just (if I understand correctly) to simplify
its free. It's kind of a cool trick but also kind of ugly. We'll see
what Kris says.
In dt_prov_dtrace.c attach():
*) We should convert "len=snprintf(NULL, 0, ...); snprintf(fn, len,
...)" into asprintf() for the format file name. I realize that in some
sense that is "beyond the scope of this patch," but it seems like we've
used a couple of patches recently an an opportunity to fix this sort of
thing.
*) Using the variable uprobe_events first for "uprobe_events" and later
for "events" seems confusing. At the very least, how about naming
uprobe_events to be something more generic.
Those two comments also apply to dt_prov_fbt.c kprobe_attach().
And...
On 11/6/24 11:46, Nick Alcock wrote:
> So as of kernel 6.3 (upstream commit 2455f0e124d317dd08d337a75), the
> canonical tracefs location has moved to /sys/kernel/tracing. Unfortunately
> this requires an explicit mount, and a great many installations have not
> done this and perhaps never will. So if the debugfs is mounted on
> /sys/kernel/debug, it automatically makes /sys/kernel/debug/tracing appear
> as it used to, as another tracefs mount. And of course there's nothing
> special about the "canonical location": it's up to the admin, who might
> choose to remount the thing anywhere at all.
Anywhere at all? But the scripts in test/ only look in two places.
Speaking of which, could runtest.sh look for TRACEFS and then make that
available to any test script that needs it?
More information about the DTrace-devel
mailing list