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]

[PATCH 3/3] systemtap: marker tapset build test


Hi,

This patch adds a sample build test script for marker tapset
to tastsuite.

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com

---
 testsuite/buildok/marker-tapset-probes.stp |   53 +++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

Index: systemtap/testsuite/buildok/marker-tapset-probes.stp
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ systemtap/testsuite/buildok/marker-tapset-probes.stp	2008-09-04 22:27:26.000000000 -0400
@@ -0,0 +1,53 @@
+#!/usr/bin/stap
+#
+# sample script for kernel marker
+#
+
+#------------------------------------------------------------
+# Counter
+#------------------------------------------------------------
+
+global num
+
+#------------------------------------------------------------
+# Probes
+#------------------------------------------------------------
+
+#
+# Interrupts
+#
+probe marker.irq.*.* {
+	num[$name] <<< 1
+}
+
+#
+# Scheduler
+#
+probe marker.scheduler.* {
+	num[$name] <<< 1
+}
+
+#
+# Process
+#
+
+probe marker.process.* {
+	num[$name] <<< 1
+}
+
+#------------------------------------------------------------
+# begin/end
+#------------------------------------------------------------
+
+probe begin {
+	printf("[STP] --- start ---\n")
+}
+
+probe end {
+	printf("[STP] --- end ---\n")
+
+	foreach (n+ in num) {
+		printf("%s is hit %d times\n", n, @count(num[n]))
+	}
+}
+

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