summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfche <fche>2005-08-03 16:54:12 +0000
committerfche <fche>2005-08-03 16:54:12 +0000
commit27cffb521607b81eec660ab9f5b8b607d014c692 (patch)
tree152a7b326e849ee89ab6f1b81ad5d098b0620df3
parentd8aeeb5dff71172116b09141e0443cdf023d51de (diff)
downloadsystemtap-steved-27cffb521607b81eec660ab9f5b8b607d014c692.tar.gz
systemtap-steved-27cffb521607b81eec660ab9f5b8b607d014c692.tar.xz
systemtap-steved-27cffb521607b81eec660ab9f5b8b607d014c692.zip
2005-08-03 Frank Ch. Eigler <fche@elastic.org>
* README: Be more specific about prerequisites. * tapset/builtin_string.stp: New builtin. * testsuite/buildok/seven.stp, semko/eighteen.stp: New tests.
-rw-r--r--ChangeLog6
-rw-r--r--README7
-rw-r--r--stap.121
-rw-r--r--tapset/builtin_string.stp7
-rwxr-xr-xtestsuite/buildok/seven.stp6
-rwxr-xr-xtestsuite/semko/eighteen.stp5
6 files changed, 47 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index ecb99666..f029081a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-03 Frank Ch. Eigler <fche@elastic.org>
+
+ * README: Be more specific about prerequisites.
+ * tapset/builtin_string.stp: New builtin.
+ * testsuite/buildok/seven.stp, semko/eighteen.stp: New tests.
+
2005-08-03 Roland McGrath <roland@redhat.com>
* configure.ac, systemtap.spec.in: Version 0.2.1.
diff --git a/README b/README
index cb5bfd3f..e1d7c268 100644
--- a/README
+++ b/README
@@ -10,8 +10,9 @@ See the INSTALL file for generic build instructions.
Prerequisites:
- linux kernel 2.6.11+ with kprobes
-- kernel module build environment
-- C compiler
-- elfutils with libdwfl
+- kernel module build environment (kernel-devel or kernel-smp-devel rpm)
+- kernel debugging information (kernel-debuginfo rpm)
+- C compiler (same as what kernel was compiled with)
+- elfutils with libdwfl (from fedora rawhide)
- root privileges
diff --git a/stap.1 b/stap.1
index 78d6d763..f313790f 100644
--- a/stap.1
+++ b/stap.1
@@ -209,8 +209,11 @@ instructions, and any auxiliary definitions for use by other embedded
code. The other place where embedded code is permitted is as a
function body.
-.SS BUILT-IN FUNCTIONS
-
+.SS BUILT-INS
+A set of builtin functions and probe aliases are provided by the
+scripts installed under the
+.IR /usr/share/systemtap/tapset
+directory.
.SH PROCESSING
The translator begins pass 1 by parsing the given input script,
@@ -287,6 +290,20 @@ kernel into temporary files, until the user sends an interrupt signal.
Finally, it unloads the module, and cleans up.
.SH EXAMPLES
+To trace entry and exit from a function, use a pair of probes:
+.RS
+.br
+probe kernel.function("foo") { log ("enter") }
+probe kernel.function("foo").return { log ("exit") }
+.RE
+
+To list the probeable functions in the kernel, use
+.RS
+.br
+stap -p2 -e 'probe kernel.function("*") {}'
+.RE
+
+
.SH SAFETY AND SECURITY
Systemtap is an administrative tool at this time. It exposes kernel
diff --git a/tapset/builtin_string.stp b/tapset/builtin_string.stp
new file mode 100644
index 00000000..d068febb
--- /dev/null
+++ b/tapset/builtin_string.stp
@@ -0,0 +1,7 @@
+function _string (num) %{
+ sprintf (THIS->__retvalue, "%lld", (long long) THIS->num);
+%}
+
+function string (num) {
+ return "" . _string (num + 0)
+}
diff --git a/testsuite/buildok/seven.stp b/testsuite/buildok/seven.stp
new file mode 100755
index 00000000..236222df
--- /dev/null
+++ b/testsuite/buildok/seven.stp
@@ -0,0 +1,6 @@
+#! stap -p4
+
+probe kernel.function("scheduler_tick") {
+ log ("scheduler_tick (" . string ($user_ticks) . ", " .
+ string ($sys_ticks) . ")")
+}
diff --git a/testsuite/semko/eighteen.stp b/testsuite/semko/eighteen.stp
new file mode 100755
index 00000000..d7ad325b
--- /dev/null
+++ b/testsuite/semko/eighteen.stp
@@ -0,0 +1,5 @@
+#! stap -p2
+
+probe kernel.function("schedule") {
+ log ($no_such_variable_anywhere)
+}