summaryrefslogtreecommitdiffstats
path: root/testsuite/semok/one.stp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok/one.stp')
-rwxr-xr-xtestsuite/semok/one.stp25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/semok/one.stp b/testsuite/semok/one.stp
new file mode 100755
index 00000000..fb7483e2
--- /dev/null
+++ b/testsuite/semok/one.stp
@@ -0,0 +1,25 @@
+#! semtest
+
+# these will ultimately be somehow associated with "providers"
+# and have a syntax of their own
+global kernel_jiffies, kernel_current_comm;
+
+function kernel_netlink(a, b) {
+ # this should be a builtin function
+ return 0
+}
+
+function stamp (syscall)
+{
+ kernel_netlink (4, kernel_jiffies . " " .
+ kernel_current_comm . " " . syscall);
+ return 0
+}
+
+# probe kernel:syscall:read = kernel:function("sys_read");
+
+
+probe kernel:syscall:read
+{
+ stamp ("read");
+}