[DTrace-devel] [PATCH 2/2] doc: Update the sdt provider documentation

eugene.loh at oracle.com eugene.loh at oracle.com
Mon Dec 8 05:41:14 UTC 2025


From: Eugene Loh <eugene.loh at oracle.com>

The documentation had been describing the legacy provider, in which sdt
probes were DTrace-specific instrumentation points in the kernel to
support other providers.  In the current implementation, the sdt
provider simply exposes Linux kernel tracepoints.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 doc/userguide/index.md                        |  3 --
 .../reference/dtrace_providers_sdt.md         | 42 ++++---------------
 2 files changed, 8 insertions(+), 37 deletions(-)

diff --git a/doc/userguide/index.md b/doc/userguide/index.md
index 3e057d4de..7d6b1caec 100644
--- a/doc/userguide/index.md
+++ b/doc/userguide/index.md
@@ -255,9 +255,6 @@
         -   [sched Examples](reference/dtrace_providers_sched.md#dt_ref_schedexamples_prov)
         -   [sched Stability](reference/dtrace_providers_sched.md#dt_ref_schedstab_prov)
     -   [SDT Provider](reference/dtrace_providers_sdt.md#dt_ref_sdt_prov)
-        -   [Creating sdt Probes](reference/dtrace_providers_sdt.md#dt_ref_sdtcreatep_prov)
-            -   [Declaring Probes](reference/dtrace_providers_sdt.md#dt_ref_sdtdeclp_prov)
-            -   [sdt Probe Arguments](reference/dtrace_providers_sdt.md#dt_ref_sdtparg_prov)
         -   [sdt Stability](reference/dtrace_providers_sdt.md#dt_ref_sdtstab_prov)
     -   [Stapsdt Provider](reference/dtrace_providers_stapsdt.md)
         -   [stapsdt Probes](reference/dtrace_providers_stapsdt.md#dt_ref_stapsdtprobes_prov)
diff --git a/doc/userguide/reference/dtrace_providers_sdt.md b/doc/userguide/reference/dtrace_providers_sdt.md
index b4490401a..735b7b2c9 100644
--- a/doc/userguide/reference/dtrace_providers_sdt.md
+++ b/doc/userguide/reference/dtrace_providers_sdt.md
@@ -1,46 +1,20 @@
 
 # SDT Provider <a id="dt_ref_sdt_prov">
 
-The Statically Defined Tracing \(SDT\) provider \(`sdt`\) creates probes at sites that a software programmer has formally designated. Thus, the SDT provider is chiefly of interest only to developers of new providers. Most users access SDT only indirectly by using other providers.
+The Statically Defined Tracing \(SDT\) provider \(`sdt`\) gives DTrace users
+access to the tracepoints that have been inserted into the Linux kernel source
+code and are exposed by the kernel tracing system
+to designate semantically meaningful points of execution.
 
-The SDT mechanism enables programmers to consciously choose locations of interest to users of DTrace and to convey some semantic knowledge about each location through the probe name.
-
-Importantly, SDT can act as a metaprovider by registering probes so that they appear to come from other providers, such as `io`, `lockstat`, `proc`, and `sched`.
-
-Both the name stability and the data stability of the probes are Private, which reflects the kernel's implementation and should not be interpreted as a commitment to preserve these interfaces.
+The tracepoint arguments are converted.  To access the raw arguments,
+use the [rawtp](../reference/dtrace_provider_rawtp.md) provider.
 
 **Parent topic:**[DTrace Provider Reference](../reference/dtrace_providers.md)
 
-## Creating sdt Probes <a id="dt_ref_sdtcreatep_prov">
-
-If you are a device driver developer, you might be interested in creating `sdt` probes for a Linux driver that you are working on. The disabled probe effect of SDT is only the cost of several no-operation machine instructions. You are therefore encouraged to add `sdt` probes to device driver code as needed. Unless these probes negatively affect performance, you can leave them in shipped code.
-
-DTrace also provides a mechanism for application developers to define user-space static probes.
-
-### Declaring Probes <a id="dt_ref_sdtdeclp_prov">
-
-The `sdt` probes are declared by using the `DTRACE_PROBE` macro from `<linux/sdt.h>`.
-
-The module name and function name of an SDT-based probe correspond to the kernel module name and function name where the probe is declared. DTrace includes the kernel module name and function name as part of the tuple used to identify the probe in the probe description, so you don't need to explicitly include this information when devising the probe name. You can still specify the module and function name when referring to the probe in a DTrace program to prevent namespace collisions. Use the `dtrace -l -m *mymodule*` command to list the probes that *mymodule* has installed and the full names that are seen by DTrace users.
-
-The name of the probe depends on the name that's provided in the `DTRACE_PROBE` macro. If the name doesn't contain two consecutive underscores \(`__`\), the name of the probe is as written in the macro. If the name contains two consecutive underscores, the probe name converts the consecutive underscores to a single dash \(`-`\). For example, if a `DTRACE_PROBE` macro specifies `transaction__start`, the SDT probe is named `transaction-start`. This substitution enables C code to provide macro names that aren't valid C identifiers without specifying a string.
-
-SDT can also act as a metaprovider by registering probes so that they appear to come from other providers, such as `io`, `proc`, and `sched`, which don't have dedicated modules of their own. For example, `kernel/exit.c` contains calls to the `DTRACE_PROC` macro, which are defined as follows in `<linux/sdt.h>`:
-
-```
-# define DTRACE_PROC(name) \
-         DTRACE_PROBE(__proc_##name);
-```
-
-Probes that use such macros appear to come from a provider other than `sdt`. The leading double underscore, provider name, and trailing underscore in the `name` argument are used to match the provider and aren't included in the probe name.
-
-### sdt Probe Arguments <a id="dt_ref_sdtparg_prov">
-
-The arguments for each `sdt` probe are the arguments that are specified in the kernel source code in the corresponding `DTRACE_PROBE` macro reference. When declaring `sdt` probes, you can minimize their disabled probe effect by not dereferencing pointers and by not loading from global variables in the probe arguments. Both pointer dereferencing and global variable loading can be done safely in D functions that enable probes, so DTrace users can request these functions only when they're needed.
-
 ## sdt Stability <a id="dt_ref_sdtstab_prov">
 
-The `sdt` provider uses DTrace's stability mechanism to describe its stabilities. These values are listed in the following table.
+The `sdt` provider uses DTrace's stability mechanism to describe its stabilities.
+These values are listed in the following table.
 
 | Element   | Name Stability | Data Stability | Dependency Class |
 | :---      | :---           | :---           | :---             |
-- 
2.47.3




More information about the DTrace-devel mailing list