[DTrace-devel] [PATCH 15/19] Ignore clauses: some clauses are impossible regardless of uprp
Kris Van Hees
kris.van.hees at oracle.com
Tue Sep 3 20:10:09 UTC 2024
On Tue, Sep 03, 2024 at 03:54:00PM -0400, Eugene Loh via DTrace-devel wrote:
> On 8/29/24 16:31, Sam James wrote:
>
> > "eugene.loh--- via DTrace-devel" <dtrace-devel at oss.oracle.com> writes:
> >
> > > From: Eugene Loh <eugene.loh at oracle.com>
> > Not that it really matters here, but I wonder why not an enum?
>
> Yeah, good question. No particular good answer, I suppose. If someone
> wants it, I suppose I can revise the patch. I would say that this would not
> be the most striking use of #define for enumerating values. E.g.,
> DIF_SUBR_*, DOF_SECT_*, DTRACEFLT_*, DTRACEOPT_*, DTRACE_STABILITY_*,
> DTRACE_CLASS_*, DTRACE_CONST_*, DT_IDENT_*, DT_LINK_*, DT_PRAGMA_*,
> DTRACE_CONSUME_*, DTRACE_STATUS_*, DTRACE_TRACEMEM_*, DTRACE_AGGWALK_*, and
> DTRACE_OBJ_*. All give symbolic names to sequences of integers using
> #define. There is strong precedence for the practice.
I'd say that is merely because that is what the original developers of DTrace
used. We certainly do not need to follow their practice. But either way, I
don't have a real preference here.
Further review comments on this patch to come (soonish).
> > > diff --git a/libdtrace/dt_prov_uprobe.c b/libdtrace/dt_prov_uprobe.c
> > > @@ -232,6 +233,10 @@ grow_strtab(dtrace_hdl_t *dtp)
> > > +#define USDT_FLAG_UNINITIALIZED 0
> > > +#define USDT_FLAG_POSSIBLE 1
> > > +#define USDT_FLAG_IGNORE 2
>
> _______________________________________________
> DTrace-devel mailing list
> DTrace-devel at oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/dtrace-devel
More information about the DTrace-devel
mailing list