summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStan Cox <scox@redhat.com>2008-06-23 16:02:09 -0400
committerStan Cox <scox@redhat.com>2008-06-23 16:02:09 -0400
commit99a5f9cff817559055ffec853ad1d6d91ad21098 (patch)
tree523b3a09ac5bb97dd192578c609dd3514de08b4c
parent30fa13cdf6b8225d590642226e1255d3f574ef8a (diff)
downloadsystemtap-steved-99a5f9cff817559055ffec853ad1d6d91ad21098.tar.gz
systemtap-steved-99a5f9cff817559055ffec853ad1d6d91ad21098.tar.xz
systemtap-steved-99a5f9cff817559055ffec853ad1d6d91ad21098.zip
Update documentation for .statement wildcard.
-rw-r--r--ChangeLog3
-rw-r--r--NEWS4
-rw-r--r--doc/langref.tex8
-rw-r--r--stapprobes.5.in4
-rw-r--r--testsuite/systemtap.base/stmt_rel.exp1
-rw-r--r--testsuite/systemtap.base/stmt_rel.stp19
6 files changed, 25 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 055d47f9..6d2581ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
2008-06-23 Stan Cox <scox@redhat.com>
+ * NEWS: Updated .statement line number wildcard and line number range.
+ * stapprobes.5.in: Likewise.
+ * doc/langref.tex: Likewise.
* tapsets.cxx (enum line_t): Add RANGE and WILDCARD.
(iterate_over_srcfile_lines): Change lineno parm to lines[].
Support RANGE and WILDCARD.
diff --git a/NEWS b/NEWS
index d08e33f4..434c9c71 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
* What's new in version 0.7
+- .statement("func@file:*") and .statement("func@file:M-N") probes are now
+ supported to allow matching a range of lines in a function. This allows
+ tracing the execution of a function.
+
- Scripts relying on probe point wildcards like "syscall.*" that expand
to distinct kprobes are processed significantly faster than before.
diff --git a/doc/langref.tex b/doc/langref.tex
index 28a9f1b6..e2c630d4 100644
--- a/doc/langref.tex
+++ b/doc/langref.tex
@@ -751,10 +751,12 @@ In most cases, the path should be relative to the top of the
linux source directory, although an absolute path may be necessary for some kernels.
If a relative pathname doesn't work, try absolute.
\item The third part is optional if the file name part was given. It identifies
-the line number in the source file, preceded by a '':'' or ''+''.
+the line number in the source file, preceded by a ``:'' or ``+''.
The line number is assumed to be an
-absolute line number if preceded by a '':'', or relative to the entry of
-function if preceded by a ''+''.
+absolute line number if preceded by a ``:'', or relative to the entry of
+the function if preceded by a ``+''.
+All the lines in the function can be matched with ``:*''.
+A range of lines x through y can be matched with ``:x-y''.
\end{enumerate}
Alternately, specify PATTERN as a numeric constant to indicate a relative
diff --git a/stapprobes.5.in b/stapprobes.5.in
index 025aa2a8..5d400cb6 100644
--- a/stapprobes.5.in
+++ b/stapprobes.5.in
@@ -259,7 +259,9 @@ Finally, the third part is optional if the file name part was given,
and identifies the line number in the source file preceded by a ":"
or a "+". The line number is assumed to be an
absolute line number if preceded by a ":", or relative to the entry of
-function if preceded by a "+".
+the function if preceded by a "+".
+All the lines in the function can be matched with ":*".
+A range of lines x through y can be matched with ":x-y".
.PP
As an alternative, PATTERN may be a numeric constant, indicating an
(module-relative or kernel-_stext-relative) address. In guru mode
diff --git a/testsuite/systemtap.base/stmt_rel.exp b/testsuite/systemtap.base/stmt_rel.exp
index a13631e6..25156d9b 100644
--- a/testsuite/systemtap.base/stmt_rel.exp
+++ b/testsuite/systemtap.base/stmt_rel.exp
@@ -3,7 +3,6 @@
set test "stmt_rel"
set ::result_string {PASS bio_init
PASS line number
-PASS address
PASS wildcard
}
diff --git a/testsuite/systemtap.base/stmt_rel.stp b/testsuite/systemtap.base/stmt_rel.stp
index 43c38594..13066161 100644
--- a/testsuite/systemtap.base/stmt_rel.stp
+++ b/testsuite/systemtap.base/stmt_rel.stp
@@ -1,13 +1,13 @@
-global stack2, stack2pp, stack2func, stack3, stack3pp, stack3func
+global stack2pp, stack2func, stack3pp, stack3func
global wildcardpp, wild_count
probe kernel.statement("bio_init@fs/bio.c+2") {
- stack2 = tokenize(backtrace(), " ")
+ # stack2 = tokenize(backtrace(), " ")
stack2func = probefunc()
stack2pp = pp()
}
probe kernel.statement("bio_init@fs/bio.c+3") {
- stack3 = tokenize(backtrace(), " " )
+ # stack3 = tokenize(backtrace(), " " )
stack3func = probefunc()
stack3pp = pp()
}
@@ -46,13 +46,14 @@ probe kernel.statement("bio_put@fs/bio.c:*") {
printf ("FAIL line number %d %d\n", stack2line, stack3line)
}
+ # This test does not take optimized code into account
# Was address for bio_init probe +2 < address for bio_init probe +3?
- if (stack2 < stack3) {
- printf ("PASS address\n")
- }
- else {
- printf ("FAIL address %s %s\n", stack2, stack3)
- }
+ # if (stack2 < stack3) {
+ # printf ("PASS address\n")
+ # }
+ # else {
+ # printf ("FAIL address %s %s\n", stack2, stack3)
+ # }
# Did wildcard probe hit at least 5 different statements?
foreach ([i] in wildcardpp) {