summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-11-09 14:59:45 -0500
committerDave Brolley <brolley@redhat.com>2009-11-09 14:59:45 -0500
commit52cd76fae6eee285a4d8345ee595f0b8a2907d7b (patch)
treec25ea6497334a08c1762b25b72565dd4b8a8baf8 /testsuite
parent64211010978d0e35c80ec7c119f1986a48f97543 (diff)
parentdd905cf4dd14d5d53d0bc3696acaba04bda57bb5 (diff)
downloadsystemtap-steved-52cd76fae6eee285a4d8345ee595f0b8a2907d7b.tar.gz
systemtap-steved-52cd76fae6eee285a4d8345ee595f0b8a2907d7b.tar.xz
systemtap-steved-52cd76fae6eee285a4d8345ee595f0b8a2907d7b.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/buildok/irq.stp7
-rw-r--r--testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp31
2 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/buildok/irq.stp b/testsuite/buildok/irq.stp
new file mode 100644
index 00000000..b1a141dc
--- /dev/null
+++ b/testsuite/buildok/irq.stp
@@ -0,0 +1,7 @@
+#! stap -p4
+
+// Tests if all probes in irq tapset are resolvable
+
+probe workqueue.* {}
+probe irq_handler.* {}
+probe softirq.* {}
diff --git a/testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp b/testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp
new file mode 100644
index 00000000..3bcfd5e1
--- /dev/null
+++ b/testsuite/systemtap.examples/interrupt/interrupts-by-dev.stp
@@ -0,0 +1,31 @@
+#! /usr/bin/env stap
+/*
+ * Copyright (C) 2009 IBM Corp.
+ * This file is part of systemtap, and is free software. You can
+ * redistribute it and/or modify it under the terms of the GNU General
+ * Public License (GPL); either version 2, or (at your option) any
+ * later version.
+ *
+ * Version 1.0 prerna@linux.vnet.ibm.com 2009-10-28
+ *
+ * Name:
+ * interrupts-by-dev.stp
+ *
+ * Description:
+ * Script to profile interrupts received by each device per 100 ms.
+ *
+ *
+ */
+
+global devices
+
+probe irq_handler.entry {
+ devices[dev_name]++;
+}
+
+probe timer.ms(100) {
+ printf("\t DEVICE \t NUMBER OF INTERRUPTS \n");
+ foreach ( devname in devices )
+ printf(" %20s : %5d\n",kernel_string(devname),devices[devname]);
+ delete devices
+}