summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ChangeLog5
-rwxr-xr-xtestsuite/semok/thirtytwo.stp5
-rw-r--r--testsuite/systemtap.base/utrace_p4.exp4
-rw-r--r--testsuite/systemtap.examples/ChangeLog5
-rw-r--r--testsuite/systemtap.examples/general/para-callgraph.meta16
-rwxr-xr-xtestsuite/systemtap.examples/general/para-callgraph.stp26
-rw-r--r--testsuite/systemtap.examples/index.html6
-rw-r--r--testsuite/systemtap.examples/index.txt17
-rw-r--r--testsuite/systemtap.examples/keyword-index.html12
-rw-r--r--testsuite/systemtap.examples/keyword-index.txt30
-rw-r--r--testsuite/systemtap.examples/subsystem-index.html11
-rw-r--r--testsuite/systemtap.examples/subsystem-index.txt23
12 files changed, 90 insertions, 70 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index c6d86142..9c7f8fec 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-15 David Smith <dsmith@redhat.com>
+
+ * systemtap.base/utrace_p4.exp: Change system-wide probes from
+ 'process("*").begin' to 'process.begin'.
+
2008-08-13 Dave Brolley <brolley@redhat.com>
* lib/systemtap.exp (setup_systemtap_environment): client_path is now
diff --git a/testsuite/semok/thirtytwo.stp b/testsuite/semok/thirtytwo.stp
new file mode 100755
index 00000000..2a69b8cd
--- /dev/null
+++ b/testsuite/semok/thirtytwo.stp
@@ -0,0 +1,5 @@
+#! stap -p2
+
+# PR 6836
+
+probe kernel.function("sys_open").return { log($$return . $$parms) }
diff --git a/testsuite/systemtap.base/utrace_p4.exp b/testsuite/systemtap.base/utrace_p4.exp
index 081fee95..1467d9c8 100644
--- a/testsuite/systemtap.base/utrace_p4.exp
+++ b/testsuite/systemtap.base/utrace_p4.exp
@@ -15,7 +15,7 @@ set syscall_script {"probe process(\"/bin/ls\").syscall { printf(\"|%d\", \$sysc
set syscall_return_script {"probe process(\"/bin/ls\").syscall.return { printf(\"|%d\", \$syscall) }"}
set thread_begin_script {"probe process(\"/bin/ls\").thread.begin { print(\"ls thread.begin\") }"}
set thread_end_script {"probe process(\"/bin/ls\").thread.end { print(\"ls thread.end\") }"}
-set all_begin_script {"probe process(\"*\").begin { print(\"begin\") }"}
+set all_begin_script {"probe process.begin { print(\"begin\") }"}
set pid_begin_script {"probe process(123).begin { print(\"123 begin\") }"}
set pid_end_script {"probe process(123).end { print(\"123 end\") }"}
@@ -134,6 +134,6 @@ set TEST_NAME "UTRACE_P4_07"
if {$utrace_support_found == 0} {
untested "$TEST_NAME : no kernel utrace support found"
} else {
- # Try compiling an begin script using a path of "*"
+ # Try compiling an system-wide begin script
stap_compile $TEST_NAME 1 $all_begin_script
}
diff --git a/testsuite/systemtap.examples/ChangeLog b/testsuite/systemtap.examples/ChangeLog
index 682e44e5..af641ba7 100644
--- a/testsuite/systemtap.examples/ChangeLog
+++ b/testsuite/systemtap.examples/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-15 Frank Ch. Eigler <fche@elastic.org>
+
+ * general/para-callgraph*: Extend.
+ * indexes: Regenerated.
+
2008-08-11 Mark Wielaard <mwielaard@redhat.com>
* check.exp: Make sure that stderr gets redircted so warnings don't
diff --git a/testsuite/systemtap.examples/general/para-callgraph.meta b/testsuite/systemtap.examples/general/para-callgraph.meta
index 3ce4b648..740ed5ce 100644
--- a/testsuite/systemtap.examples/general/para-callgraph.meta
+++ b/testsuite/systemtap.examples/general/para-callgraph.meta
@@ -1,13 +1,7 @@
-title: Tracing Calls for Sections of Code
+title: Callgraph tracing with arguments
name: para-callgraph.stp
-version: 1.0
-author: anonymous
keywords: trace callgraph
-subsystem: kernel
-status: production
-exit: user-controlled
-output: trace
-scope: system-wide
-description: The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.
-test_check: stap -p4 para-callgraph.stp sys_read "*@fs/*.c"
-test_installcheck: stap para-callgraph.stp sys_read "*@fs/*.c" -c "sleep 1"
+subsystem: general
+description: Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.
+test_check: stap -p4 para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")'
+test_installcheck: stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")' -c 'cat /proc/sys/vm/*'
diff --git a/testsuite/systemtap.examples/general/para-callgraph.stp b/testsuite/systemtap.examples/general/para-callgraph.stp
index e28f5d6b..9abb00c2 100755
--- a/testsuite/systemtap.examples/general/para-callgraph.stp
+++ b/testsuite/systemtap.examples/general/para-callgraph.stp
@@ -1,22 +1,24 @@
#! /usr/bin/env stap
-function trace(entry_p) {
- if(tid() in trace)
- printf("%s%s%s\n",thread_indent(entry_p),
- (entry_p>0?"->":"<-"),
- probefunc())
+function trace(entry_p, extra) {
+ %( $# > 1 %? if (tid() in trace) %)
+ printf("%s%s%s %s\n",
+ thread_indent (entry_p),
+ (entry_p>0?"->":"<-"),
+ probefunc (),
+ extra)
}
+
+%( $# > 1 %?
global trace
-probe kernel.function(@1).call {
- if (execname() == "stapio") next # skip our own helper process
+probe $2.call {
trace[tid()] = 1
- trace(1)
}
-probe kernel.function(@1).return {
- trace(-1)
+probe $2.return {
delete trace[tid()]
}
+%)
-probe kernel.function(@2).call { trace(1) }
-probe kernel.function(@2).return { trace(-1) }
+probe $1.call { trace(1, $$parms) }
+probe $1.return { trace(-1, $$return) }
diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html
index 327e9ef9..d6b1c99b 100644
--- a/testsuite/systemtap.examples/index.html
+++ b/testsuite/systemtap.examples/index.html
@@ -47,9 +47,9 @@ subsystems: disk cpu, keywords: disk cpu use graph<br>
<li><a href="general/helloworld.stp">general/helloworld.stp</a> - SystemTap "Hello World" Program<br>
subsystems: none, keywords: simple<br>
<p>A basic "Hello World" program implemented in SystemTap script. It prints out "hello world" message and then immediately exits.</p></li>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
<li><a href="io/disktop.stp">io/disktop.stp</a> - Summarize Disk Read/Write Traffic<br>
subsystems: disk, keywords: disk<br>
<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt
index aed6f457..1372afb0 100644
--- a/testsuite/systemtap.examples/index.txt
+++ b/testsuite/systemtap.examples/index.txt
@@ -16,14 +16,15 @@ subsystems: none, keywords: simple
prints out "hello world" message and then immediately exits.
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
-
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
+
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
io/disktop.stp - Summarize Disk Read/Write Traffic
diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html
index 5d1c79e0..2825bc2e 100644
--- a/testsuite/systemtap.examples/keyword-index.html
+++ b/testsuite/systemtap.examples/keyword-index.html
@@ -49,9 +49,9 @@ subsystems: io, keywords: io backtrace<br>
</ul>
<h3><a name="CALLGRAPH">CALLGRAPH</a></h3>
<ul>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
</ul>
<h3><a name="CPU">CPU</a></h3>
<ul>
@@ -214,9 +214,9 @@ subsystems: syscall, keywords: syscall read write time io<br>
</ul>
<h3><a name="TRACE">TRACE</a></h3>
<ul>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
</ul>
<h3><a name="TRAFFIC">TRAFFIC</a></h3>
<ul>
diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt
index d2e20148..22065e76 100644
--- a/testsuite/systemtap.examples/keyword-index.txt
+++ b/testsuite/systemtap.examples/keyword-index.txt
@@ -13,14 +13,15 @@ subsystems: io, keywords: io backtrace
= CALLGRAPH =
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
= CPU =
@@ -395,14 +396,15 @@ subsystems: syscall, keywords: syscall read write time io
= TRACE =
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
= TRAFFIC =
diff --git a/testsuite/systemtap.examples/subsystem-index.html b/testsuite/systemtap.examples/subsystem-index.html
index 9bdec0c8..0f2517ce 100644
--- a/testsuite/systemtap.examples/subsystem-index.html
+++ b/testsuite/systemtap.examples/subsystem-index.html
@@ -40,7 +40,7 @@
</ul>
<h2>Examples by Subsystem</h2>
-<p><tt><a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#IO">IO</a> <a href="#KERNEL">KERNEL</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#NONE">NONE</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SYSCALL">SYSCALL</a> </tt></p>
+<p><tt><a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#GENERAL">GENERAL</a> <a href="#IO">IO</a> <a href="#KERNEL">KERNEL</a> <a href="#LOCKING">LOCKING</a> <a href="#NETWORK">NETWORK</a> <a href="#NONE">NONE</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SYSCALL">SYSCALL</a> </tt></p>
<h3><a name="CPU">CPU</a></h3>
<ul>
<li><a href="general/graphs.stp">general/graphs.stp</a> - Graphing Disk and CPU Utilization<br>
@@ -56,6 +56,12 @@ subsystems: disk cpu, keywords: disk cpu use graph<br>
subsystems: disk, keywords: disk<br>
<p>Get the status of reading/writing disk every 5 seconds, output top ten entries during that period.</p></li>
</ul>
+<h3><a name="GENERAL">GENERAL</a></h3>
+<ul>
+<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Callgraph tracing with arguments<br>
+subsystems: general, keywords: trace callgraph<br>
+<p>Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.</p></li>
+</ul>
<h3><a name="IO">IO</a></h3>
<ul>
<li><a href="io/io_submit.stp">io/io_submit.stp</a> - Tally Reschedule Reason During AIO io_submit Call<br>
@@ -73,9 +79,6 @@ subsystems: io, keywords: io<br>
</ul>
<h3><a name="KERNEL">KERNEL</a></h3>
<ul>
-<li><a href="general/para-callgraph.stp">general/para-callgraph.stp</a> - Tracing Calls for Sections of Code<br>
-subsystems: kernel, keywords: trace callgraph<br>
-<p>The script takes two arguments: the first argument is the function to starts/stops the per thread call graph traces and the second argument is the list of functions to generate trace information on. The script prints out a timestap for the thread, the function name and pid, followed by entry or exit symboly and function name.</p></li>
<li><a href="process/pf2.stp">process/pf2.stp</a> - Profile kernel functions<br>
subsystems: kernel, keywords: profiling<br>
<p>The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples.</p></li>
diff --git a/testsuite/systemtap.examples/subsystem-index.txt b/testsuite/systemtap.examples/subsystem-index.txt
index 98e75e98..d34ac64c 100644
--- a/testsuite/systemtap.examples/subsystem-index.txt
+++ b/testsuite/systemtap.examples/subsystem-index.txt
@@ -28,6 +28,19 @@ subsystems: disk, keywords: disk
ten entries during that period.
+= GENERAL =
+
+general/para-callgraph.stp - Callgraph tracing with arguments
+subsystems: general, keywords: trace callgraph
+
+ Print a timed per-thread callgraph, complete with function parameters
+ and return values. The first parameter names the function probe
+ points to trace. The optional second parameter names the probe
+ points for trigger functions, which acts to enable tracing for only
+ those functions that occur while the current thread is nested within
+ the trigger.
+
+
= IO =
io/io_submit.stp - Tally Reschedule Reason During AIO io_submit Call
@@ -61,16 +74,6 @@ subsystems: io, keywords: io
= KERNEL =
-general/para-callgraph.stp - Tracing Calls for Sections of Code
-subsystems: kernel, keywords: trace callgraph
-
- The script takes two arguments: the first argument is the function to
- starts/stops the per thread call graph traces and the second argument
- is the list of functions to generate trace information on. The script
- prints out a timestap for the thread, the function name and pid,
- followed by entry or exit symboly and function name.
-
-
process/pf2.stp - Profile kernel functions
subsystems: kernel, keywords: profiling