[DTrace-devel] [PATCH v3] Allow arbitrary tracefs mount points
Nick Alcock
nick.alcock at oracle.com
Thu Nov 14 12:53:05 UTC 2024
On 12 Nov 2024, Eugene Loh via DTrace-devel told this:
> Reviewed-by: Eugene Loh <eugene.loh at oracle.com>
>
> though:
>
> *) There are cases -- e.g., uprobe_create(), uprobe_detach(), and dt_prov_dtrace.c's attach() -- where indentation is being changed
> gratuitously on some declaration lines.
Dunno how -- I only change that when I have to. Fixed.
> *) It still seems to me that there are ten sites where we call
> dt_tracefs_open(), only to turn the int fd into a FILE *f, which is
> what we really want. How to simplify those ten sites is a little
> tricky due to the variations among them, but I sent Nick an idea using
> a preprocessor macro. Whether that idea is an improvement is a matter
> of opinion, I suppose.
I find it more or less unreadable :( I think a little function is
probably the right approach: the caller can pass the open() mode they
want and this gets converted to a suitable stdio mode (easy enough,
if O_RDONLY is set, it's "r").
I'll give that a try, 'cos you're right that it would be a distinct
readability improvement in those areas.
--
NULL && (void)
More information about the DTrace-devel
mailing list