This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][Revised Patch 3/5] New Probe family : probe kprobe.function()


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));
+}
+

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]