diff options
Diffstat (limited to 'testsuite/buildok')
-rwxr-xr-x | testsuite/buildok/one.stp | 16 | ||||
-rwxr-xr-x | testsuite/buildok/two.stp | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/testsuite/buildok/one.stp b/testsuite/buildok/one.stp new file mode 100755 index 00000000..1f4f8f9b --- /dev/null +++ b/testsuite/buildok/one.stp @@ -0,0 +1,16 @@ +#! stap -p4 + +global foo, bar + +probe begin +{ + x = 10 + foo["hello"] = 25 + foo["hello"]++ + ++foo["hello"] + x = foo["hello"] + foo["yo"] *= bar[x, foo["hello"], "goodbye"]++; + printk("hello from systemtap") +} + + diff --git a/testsuite/buildok/two.stp b/testsuite/buildok/two.stp new file mode 100755 index 00000000..83a4705c --- /dev/null +++ b/testsuite/buildok/two.stp @@ -0,0 +1,16 @@ +#! stap -p4 + +%{ +#include <linux/version.h> +%} + +function get_release () %{ +strncpy(THIS->__retvalue, UTS_RELEASE, MAXSTRINGLEN); +%} + +probe begin +{ + printk("hello from systemtap, kernel version " . get_release()) +} + + |