diff options
author | fche <fche> | 2005-08-03 16:54:12 +0000 |
---|---|---|
committer | fche <fche> | 2005-08-03 16:54:12 +0000 |
commit | 27cffb521607b81eec660ab9f5b8b607d014c692 (patch) | |
tree | 152a7b326e849ee89ab6f1b81ad5d098b0620df3 | |
parent | d8aeeb5dff71172116b09141e0443cdf023d51de (diff) | |
download | systemtap-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-- | ChangeLog | 6 | ||||
-rw-r--r-- | README | 7 | ||||
-rw-r--r-- | stap.1 | 21 | ||||
-rw-r--r-- | tapset/builtin_string.stp | 7 | ||||
-rwxr-xr-x | testsuite/buildok/seven.stp | 6 | ||||
-rwxr-xr-x | testsuite/semko/eighteen.stp | 5 |
6 files changed, 47 insertions, 5 deletions
@@ -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. @@ -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 @@ -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) +} |