This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC][Revised Patch 3/5] New Probe family : probe kprobe.function()
- From: Prerna Saxena <prerna at linux dot vnet dot ibm dot com>
- To: systemtap at sourceware dot org
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>
- Date: Sun, 19 Apr 2009 23:34:24 +0530
- Subject: Re: [RFC][Revised Patch 3/5] New Probe family : probe kprobe.function()
- References: <49EB61E1.6060302@linux.vnet.ibm.com>
Additions to testsuite to test probe "kprobe"
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
Index: git-19-apr/testsuite/systemtap.base/kprobes.exp
===================================================================
--- /dev/null
+++ git-19-apr/testsuite/systemtap.base/kprobes.exp
@@ -0,0 +1,2 @@
+set test "kprobes"
+stap_run $srcdir/$subdir/$test.stp
Index: git-19-apr/testsuite/systemtap.base/kprobes.stp
===================================================================
--- /dev/null
+++ git-19-apr/testsuite/systemtap.base/kprobes.stp
@@ -0,0 +1,27 @@
+/*
+ * kprobes.stp
+ *
+ * Probe to test the functionality of kprobe-based probes
+ *
+ * (Dwarfless probing)
+ *
+ */
+global count
+
+probe begin
+{
+ println("systemtap starting probe")
+}
+
+probe kprobe.function("sys_open")
+{
+ printf("\n Probe point hit");
+ exit();
+}
+
+probe end
+{
+ println("systemtap ending probe")
+ println("count = " . sprint(count));
+}
+