summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/kprobes.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.base/kprobes.stp')
-rw-r--r--testsuite/systemtap.base/kprobes.stp25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/kprobes.stp b/testsuite/systemtap.base/kprobes.stp
new file mode 100644
index 00000000..884b321c
--- /dev/null
+++ b/testsuite/systemtap.base/kprobes.stp
@@ -0,0 +1,25 @@
+/*
+ * kprobes.stp
+ * Probe to test the functionality of kprobe-based probes
+ * (Dwarfless Probing)
+ */
+global hit_str
+
+probe begin
+{
+ println("systemtap starting probe");
+ hit_str = ""
+}
+
+probe kprobe.function("vfs_read")
+{
+ hit_str = "probe point hit"
+ exit();
+}
+
+probe end
+{
+ println("systemtap ending probe");
+ println(hit_str);
+ delete hit_str;
+}