diff options
author | Josh Stone <jistone@redhat.com> | 2009-09-15 12:46:22 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-09-15 12:56:11 -0700 |
commit | f3e3c3e3863523382df6b7d07b57b16ef43546db (patch) | |
tree | de880cfa49bfd43408439ce97e43bcf91d3176ec /doc | |
parent | 8150f846586bb04d05f51e4f17e86c00347cb7b6 (diff) | |
download | systemtap-steved-f3e3c3e3863523382df6b7d07b57b16ef43546db.tar.gz systemtap-steved-f3e3c3e3863523382df6b7d07b57b16ef43546db.tar.xz systemtap-steved-f3e3c3e3863523382df6b7d07b57b16ef43546db.zip |
Fix some probe examples in the language reference
* doc/langref.tex (section{Components of a SystemTap script}): Use
.call/.return for the example of tracing function entry/exit. Also
mention "-l" for listing probeable functions.
(subsection{Embedded C functions}): Close the examples with '%}'.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/langref.tex | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/doc/langref.tex b/doc/langref.tex index aa583c2e..e460defd 100644 --- a/doc/langref.tex +++ b/doc/langref.tex @@ -327,18 +327,17 @@ two probes. \begin{vindent} \begin{verbatim} -probe kernel.function("sys_mkdir") { log ("enter") } +probe kernel.function("sys_mkdir").call { log ("enter") } probe kernel.function("sys_mkdir").return { log ("exit") } \end{verbatim} \end{vindent} -To list the probe-able functions in the kernel, use the last-pass option -to the translator. The output needs to be filtered because each inlined function -instance is listed separately. The following statement is an example. +To list the probe-able functions in the kernel, use the listing option +(\texttt{\textbf{-l}}). For example: \begin{vindent} \begin{verbatim} -# stap -p2 -e 'probe kernel.function("*") {}' | sort | uniq +# stap -l 'kernel.function("*")' | sort \end{verbatim} \end{vindent} @@ -601,11 +600,11 @@ are examples. \begin{verbatim} function add_one (val) %{ THIS->__retvalue = THIS->val + 1; -} +%} function add_one_str (val) %{ strlcpy (THIS->__retvalue, THIS->val, MAXSTRINGLEN); strlcat (THIS->__retvalue, "one", MAXSTRINGLEN); -} +%} \end{verbatim} \end{vindent} The function argument and return value types must be inferred by the translator |