summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-09-15 12:46:22 -0700
committerJosh Stone <jistone@redhat.com>2009-09-15 12:56:11 -0700
commitf3e3c3e3863523382df6b7d07b57b16ef43546db (patch)
treede880cfa49bfd43408439ce97e43bcf91d3176ec /doc
parent8150f846586bb04d05f51e4f17e86c00347cb7b6 (diff)
downloadsystemtap-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.tex13
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