[DTrace-devel] [PATCH 15/19] Ignore clauses: some clauses are impossible regardless of uprp

Eugene Loh eugene.loh at oracle.com
Tue Sep 3 19:54:00 UTC 2024


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.

>> 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



More information about the DTrace-devel mailing list