summaryrefslogtreecommitdiffstats
path: root/stap_tutorial-1.0/examples/top-ext3calls.stp
diff options
context:
space:
mode:
Diffstat (limited to 'stap_tutorial-1.0/examples/top-ext3calls.stp')
-rwxr-xr-xstap_tutorial-1.0/examples/top-ext3calls.stp19
1 files changed, 19 insertions, 0 deletions
diff --git a/stap_tutorial-1.0/examples/top-ext3calls.stp b/stap_tutorial-1.0/examples/top-ext3calls.stp
new file mode 100755
index 0000000..039e6a1
--- /dev/null
+++ b/stap_tutorial-1.0/examples/top-ext3calls.stp
@@ -0,0 +1,19 @@
+#!/usr/bin/env stap
+
+global ext3calls
+
+probe begin {
+ printf("Collecting data...\n")
+}
+
+probe kernel.function("*@fs/ext3") ?,
+ module("ext3").function("*@fs/ext3/*") ?
+{
+ ext3calls[probefunc()]++
+}
+
+probe end {
+ foreach (name in ext3calls- limit 20)
+ printf("%10d %s\n", ext3calls[name], name)
+}
+