summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/kfunct.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.base/kfunct.stp')
-rw-r--r--testsuite/systemtap.base/kfunct.stp24
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/kfunct.stp b/testsuite/systemtap.base/kfunct.stp
new file mode 100644
index 00000000..15be51bd
--- /dev/null
+++ b/testsuite/systemtap.base/kfunct.stp
@@ -0,0 +1,24 @@
+/*
+ * kfunct.stp
+ *
+ * Very simple function to test that systemtap can generate a kernel module,
+ * install it, and get some output.
+ */
+
+global count
+
+probe begin
+{
+ log("systemtap starting probe")
+}
+
+probe kernel.function("schedule")
+{
+ ++count;
+}
+
+probe end
+{
+ log("systemtap ending probe")
+ log("count = " . sprint(count));
+}