Re: [PATCH] doc: Add stapsdt provider documentation
Kris Van Hees <[email protected]>
| Newsgroups | dev.linux.lists.dtrace |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Nov 18, 2025 at 07:15:16PM -0500, Eugene Loh wrote: > 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. I agree - this is standard in DTrace so I don't think it needs to be pointed out. Is it done that way in systemtap as well? If so, no need to mention it. If systemtap does *not* do that, I would mention it here because that would be a deviation from systemtap.