From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
To: gdb-patches@sourceware.org
Subject: [PATCH V2 8/9] Documentation for DTrace USDT probes.
Date: Fri, 10 Oct 2014 17:18:00 -0000 [thread overview]
Message-ID: <1412961772-16249-9-git-send-email-jose.marchesi@oracle.com> (raw)
In-Reply-To: <1412961772-16249-1-git-send-email-jose.marchesi@oracle.com>
This patch modifies the `Static Probe Points' section on the GDB
manual in order to cover the support for DTrace USDT probes, in
addition to SystemTap SDT probes.
gdb/doc/ChangeLog:
2014-10-10 Jose E. Marchesi <jose.marchesi@oracle.com>
* gdb.texinfo (Static Probe Points): Add cindex `static probe
point, DTrace'.
(Static Probe Points): Modified to cover DTrace probes in addition
to SystemTap probes. Also modified to cover the `enable probe'
and `disable probe' commands.
---
gdb/doc/ChangeLog | 8 +++++++
gdb/doc/gdb.texinfo | 58 +++++++++++++++++++++++++++++++++------------------
2 files changed, 46 insertions(+), 20 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index a9c70b0..8cf550a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -4932,34 +4932,49 @@ that can no longer be recreated.
@subsection Static Probe Points
@cindex static probe point, SystemTap
+@cindex static probe point, DTrace
@value{GDBN} supports @dfn{SDT} probes in the code. @acronym{SDT} stands
for Statically Defined Tracing, and the probes are designed to have a tiny
-runtime code and data footprint, and no dynamic relocations. They are
-usable from assembly, C and C@t{++} languages. See
-@uref{http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation}
-for a good reference on how the @acronym{SDT} probes are implemented.
+runtime code and data footprint, and no dynamic relocations.
+
+Currently, the following types of probes are supported on
+ELF-compatible systems:
-Currently, @code{SystemTap} (@uref{http://sourceware.org/systemtap/})
-@acronym{SDT} probes are supported on ELF-compatible systems. See
+@itemize @bullet
+@item @code{SystemTap} (@uref{http://sourceware.org/systemtap/})
+@acronym{SDT} probes@footnote{See
@uref{http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps}
-for more information on how to add @code{SystemTap} @acronym{SDT} probes
-in your applications.
+for more information on how to add @code{SystemTap} @acronym{SDT}
+probes in your applications.}. @code{SystemTap} probes are usable
+from assembly, C and C@t{++} languages@footnote{See
+@uref{http://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation}
+for a good reference on how the @acronym{SDT} probes are implemented.}.
+@item @code{DTrace} (@uref{http://oss.oracle.com/projects/DTrace})
+@acronym{USDT} probes. @code{DTrace} probes are usable from C and
+C@t{++} languages.
+@end itemize
@cindex semaphores on static probe points
-Some probes have an associated semaphore variable; for instance, this
-happens automatically if you defined your probe using a DTrace-style
-@file{.d} file. If your probe has a semaphore, @value{GDBN} will
-automatically enable it when you specify a breakpoint using the
-@samp{-probe-stap} notation. But, if you put a breakpoint at a probe's
-location by some other method (e.g., @code{break file:line}), then
-@value{GDBN} will not automatically set the semaphore.
+Some @code{SystemTap} probes have an associated semaphore variable;
+for instance, this happens automatically if you defined your probe
+using a DTrace-style @file{.d} file. If your probe has a semaphore,
+@value{GDBN} will automatically enable it when you specify a
+breakpoint using the @samp{-probe-stap} notation. But, if you put a
+breakpoint at a probe's location by some other method (e.g.,
+@code{break file:line}), then @value{GDBN} will not automatically set
+the semaphore. @code{DTrace} probes do not support the notion of
+semaphores.
You can examine the available static static probes using @code{info
probes}, with optional arguments:
@table @code
@kindex info probes
-@item info probes stap @r{[}@var{provider} @r{[}@var{name} @r{[}@var{objfile}@r{]}@r{]}@r{]}
+@item info probes @r{[}@var{type}@r{]} @r{[}@var{provider} @r{[}@var{name} @r{[}@var{objfile}@r{]}@r{]}@r{]}
+If given, @var{type} is either @code{stap} for listing
+@code{SystemTap} probes or @code{dtrace} for listing @code{DTrace}
+probes. If omitted all probes are listed regardless of their types.
+
If given, @var{provider} is a regular expression used to match against provider
names when selecting which probes to list. If omitted, probes by all
probes from all providers are listed.
@@ -4979,8 +4994,8 @@ List the available static probes, from all types.
@cindex enabling and disabling probes
Some probe points can be enabled and/or disabled. The effects
associated to enabling or disabling a probe depend on the type of
-probe being handled. @code{SystemTap} probes do not support these
-notions.
+probe being handled. Some @code{DTrace} probes can be enabled or
+disabled, but @code{SystemTap} probes do not support these notions.
You can enable (or disable) one or more probes using the following
commands, with optional arguments:
@@ -5011,8 +5026,11 @@ A probe may specify up to twelve arguments. These are available at the
point at which the probe is defined---that is, when the current PC is
at the probe's location. The arguments are available using the
convenience variables (@pxref{Convenience Vars})
-@code{$_probe_arg0}@dots{}@code{$_probe_arg11}. Each probe argument is
-an integer of the appropriate size; types are not preserved. The
+@code{$_probe_arg0}@dots{}@code{$_probe_arg11}. In @code{SystemTap}
+probes each probe argument is an integer of the appropriate size;
+types are not preserved. In @code{DTrace} probes types are preserved
+provided that they are recognized as such by @value{GDBN}; otherwise
+the value of the probe argument will be a long integer. The
convenience variable @code{$_probe_argc} holds the number of arguments
at the current probe point.
--
1.7.10.4
next prev parent reply other threads:[~2014-10-10 17:18 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-10 17:18 [PATCH V2 0/9] Add support for DTrace USDT probes to gdb Jose E. Marchesi
2014-10-10 17:18 ` Jose E. Marchesi [this message]
2014-10-10 18:18 ` [PATCH V2 8/9] Documentation for DTrace USDT probes Eli Zaretskii
2014-10-10 17:18 ` [PATCH V2 2/9] Move `compute_probe_arg' and `compile_probe_arg' to probe.c Jose E. Marchesi
2014-10-10 17:18 ` [PATCH V2 4/9] New gdbarch functions: dtrace_parse_probe_argument, dtrace_probe_is_enabled, dtrace_enable_probe, dtrace_disable_probe Jose E. Marchesi
2014-10-10 17:18 ` [PATCH V2 6/9] Support for DTrace USDT probes in x86_64 targets Jose E. Marchesi
2014-10-16 22:07 ` Pedro Alves
2014-10-16 22:07 ` Pedro Alves
2014-10-17 12:35 ` Jose E. Marchesi
2014-10-17 12:42 ` Pedro Alves
2014-10-17 12:47 ` Jose E. Marchesi
2014-10-17 12:53 ` Pedro Alves
2014-10-17 19:48 ` Jose E. Marchesi
2014-10-16 22:17 ` Pedro Alves
2014-10-10 17:18 ` [PATCH V2 1/9] Adapt `info probes' to support printing probes of different types Jose E. Marchesi
2014-10-10 17:18 ` [PATCH V2 5/9] New probe type: DTrace USDT probes Jose E. Marchesi
2014-10-14 19:01 ` Sergio Durigan Junior
2014-10-15 13:28 ` Jose E. Marchesi
2014-10-10 17:18 ` [PATCH V2 9/9] Announce the DTrace USDT probes support in NEWS Jose E. Marchesi
2014-10-10 18:16 ` Eli Zaretskii
2014-10-10 17:18 ` [PATCH V2 7/9] Simple testsuite for DTrace USDT probes Jose E. Marchesi
2014-10-16 22:36 ` Pedro Alves
2014-10-17 12:01 ` Jose E. Marchesi
2014-10-17 12:18 ` Pedro Alves
2014-10-10 17:18 ` [PATCH V2 3/9] New commands `enable probe' and `disable probe' Jose E. Marchesi
2014-10-10 18:15 ` Eli Zaretskii
2014-10-10 22:03 ` Doug Evans
2014-10-11 6:35 ` Jose E. Marchesi
2014-10-13 16:41 ` Doug Evans
2014-10-14 19:02 ` Sergio Durigan Junior
2014-10-17 0:07 ` Doug Evans
2014-10-17 0:36 ` Pedro Alves
2014-10-17 0:43 ` Pedro Alves
2014-10-17 2:31 ` Sergio Durigan Junior
2014-10-17 11:23 ` Pedro Alves
2014-10-17 0:55 ` Sergio Durigan Junior
2014-10-17 5:52 ` Jose E. Marchesi
2014-10-11 17:04 ` Sergio Durigan Junior
2014-10-14 18:53 ` Sergio Durigan Junior
2014-10-15 13:28 ` Jose E. Marchesi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1412961772-16249-9-git-send-email-jose.marchesi@oracle.com \
--to=jose.marchesi@oracle.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox