Re: [PATCH] doc: Add stapsdt provider documentation

Eugene Loh <[email protected]>
Newsgroups dev.linux.lists.dtrace
Message-ID <[email protected]>
On 11/18/25 07:43, Alan Maguire wrote:

> On 18/11/2025 04:30, [email protected] wrote:
>> From: Eugene Loh <[email protected]>
>>
>> Signed-off-by: Eugene Loh <[email protected]>
> looks great, a few small suggestions below, but
>
> Reviewed-by: Alan Maguire <[email protected]>

Thanks, but...

>> diff --git a/doc/userguide/reference/dtrace_providers_stapsdt.md b/doc/userguide/reference/dtrace_providers_stapsdt.md
>> +    STAP_PROBE3(myprovider, myprobe, argc, argv[0], 18);
>> +    if (myprovider_myprobe_semaphore)
>> +        printf("the probe is enabled\n");
>> +    else
>> +        printf("the probe is not enabled\n");
> I found the example a bit confusing. I would have thought:

(fwiw.  I think it's cool you can check it anyhow, but yeah your example 
makes more sense.)

>> +Notice that the instrumented source code includes the header file
>> +`<sys/sdt.h>`.  On Oracle Linux, this file is installed
>> +by the RPM package `systemtap-sdt-devel`, but the package also
>> +installs `/usr/bin/dtrace`.  So be sure to have `/usr/sbin`
>> +in front of `/usr/bin` in your path, or explicitly specify
>> +`/usr/sbin/dtrace` whenever you want to use `dtrace`.
>> +
> Would be good to mention that a double underscore "__" gets converted to
> a dash (-) in provider/probe names too.

... but what does this have to do with stapsdt?  I thought that was a 
general DTrace thing that would not need to be called out specially here.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.