diff options
author | markj <markj@FreeBSD.org> | 2015-04-18 20:31:59 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2015-04-18 20:31:59 +0000 |
commit | abc3d74a358a4dfe2bfea30b59df735f616a75a8 (patch) | |
tree | acf2035c89d5db405ec12e74634a8b49d8b7d142 /share | |
parent | 22312966effcdb0de8b734f30aa3438a628ba497 (diff) | |
download | FreeBSD-src-abc3d74a358a4dfe2bfea30b59df735f616a75a8.zip FreeBSD-src-abc3d74a358a4dfe2bfea30b59df735f616a75a8.tar.gz |
SDT(9): add a section on SDT providers, mentioning the "sdt" provider.
Add examples demonstrating how one can list available providers and the
DTrace probes provided by a provider.
Differential Revision: https://reviews.freebsd.org/D2166
Reviewed by: rpaulo
MFC after: 2 weeks
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/SDT.9 | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/share/man/man9/SDT.9 b/share/man/man9/SDT.9 index 9016b42..33d6aa7 100644 --- a/share/man/man9/SDT.9 +++ b/share/man/man9/SDT.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 8, 2015 +.Dd April 18, 2015 .Dt SDT 9 .Os .Sh NAME @@ -194,7 +194,37 @@ macros are used to create trace points. They are meant to be added to executable code and can be used to instrument the code in which they are called. +.Sh PROVIDERS +A number of kernel DTrace providers are available. +In general, these providers define stable interfaces and should be treated as +such: existing D scripts may be broken if a probe is renamed or its arguments +are modified. +However, it is often useful to define ad-hoc +.Nm +probes for debugging a subsystem or driver. +Similarly, a developer may wish to provide a group of +.Nm +probes without committing to their future stability. +Such probes should be added to the +.Ql sdt +provider instead of defining a new provider. .Sh EXAMPLES +The DTrace providers available on the current system can be listed with +.Bd -literal -offset indent +dtrace -l | sed 1d | awk '{print $2}' | sort -u +.Ed +.Pp +A detailed list of the probes offered by a given provider can be obtained by +specifying the provider using the +.Fl P +flag. +For example, to view the probes and argument types for the +.Ql sched +provider, run +.Bd -literal -offset indent +dtrace -lv -P sched +.Ed +.Pp The following probe definition will create a DTrace probe called .Ql icmp:::receive-unreachable , which would hypothetically be triggered when the kernel receives an ICMP packet |