This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 3/3] systemtap: marker tapset build test
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: systemtap-ml <systemtap at sources dot redhat dot com>
- Cc: ltt-dev at lists dot casi dot polymtl dot ca, Hideo AOKI <haoki at redhat dot com>, Takahiro Yasui <tyasui at redhat dot com>
- Date: Fri, 12 Sep 2008 18:20:27 -0400
- Subject: [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]))
+ }
+}
+