[DTrace-devel] [PATCH 2/4] Fix comment in SDT provider about the probes we skip

Eugene Loh eugene.loh at oracle.com
Sat May 30 16:17:07 PDT 2020


On 05/29/2020 09:18 PM, Kris Van Hees wrote:

> On Fri, May 29, 2020 at 08:10:38PM -0400, eugene.loh at oracle.com wrote:
>> diff --git a/libdtrace/dt_prov_sdt.c b/libdtrace/dt_prov_sdt.c
>> @@ -224,10 +224,11 @@ done:
>>   /*
>> - * The PROBE_LIST file lists all tracepoints in a <group>:<name> format.  When
>> - * kprobes are registered on the system, they will appear in this list also as
>> - * kprobes:<name>.  We need to ignore them because DTrace already accounts for
>> - * them as FBT probes.
>> + * The PROBE_LIST file lists all tracepoints in a <group>:<name> format.
>> + * We need to ignore these groups:
>> + *   - GROUP_FMT (created by other DTrace processes)
> This actually refers to kprobes and uprobes created by *any* dtrace process,
> especially our own because we do not want to register the same probe under two
> different providers.

Okay, but the reason it's phrased this way is because it's in 
populate(), which runs before we create any probes.  So, we simply will 
not see our own probes.  It seems to me that we can:

*)  Leave my language as is.
*)  Add a remark to explain why it is other processes that matter (that 
is, ours have not yet been created).
*)  Remove the word "other", thereby using (unnecessarily) general (less 
informative) language.

Pick whichever one you want.  I'll do it.

>> + *   - kprobes and uprobes (created by other users)
> No need to mention "(created by other users)" because even if DTrace created
> any we would need to ignore them.

?  Under what scenario would DTrace create any?  And why would we not 
explain why we're omitting these?  Isn't this really the same issue as 
above?

>> + *   - syscalls (handled by a different provider)
>>    */
>>   static int populate(dtrace_hdl_t *dtp)
>>   {



More information about the DTrace-devel mailing list