summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2010-05-18 11:13:45 -0400
committerSteve Dickson <steved@redhat.com>2010-05-18 11:13:45 -0400
commit3880985314cfcf0a82aff8312055909169448574 (patch)
treedd38124606bf3eeba7587b20c8efa152f4a783bf
parent7768e217abbb8918dab268ab149375d6161a42ba (diff)
downloadsystemtap-3880985314cfcf0a82aff8312055909169448574.tar.gz
systemtap-3880985314cfcf0a82aff8312055909169448574.tar.xz
systemtap-3880985314cfcf0a82aff8312055909169448574.zip
Added a bunch of new probes
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--fuse/fuse.stp12
-rwxr-xr-xgss/rpc-gss.stp23
-rw-r--r--nfsd/nfsd-timer.stp25
-rw-r--r--nfsd/nfsd_offsets.stp31
-rw-r--r--nfsd/nfsd_writes.stp8
5 files changed, 99 insertions, 0 deletions
diff --git a/fuse/fuse.stp b/fuse/fuse.stp
new file mode 100644
index 0000000..b93e0f1
--- /dev/null
+++ b/fuse/fuse.stp
@@ -0,0 +1,12 @@
+global next_pos
+
+probe module("fuse").function("fuse_file_aio_write")
+{
+ if (($pos - next_pos) != 4096)
+ printf("fuse_file_aio_write: offset %d last %d count %d\n", $pos, next_pos, $count);
+ next_pos = $pos;
+}
+
+probe begin { log("starting fuse probe") }
+
+probe end { log("ending fuse probe") }
diff --git a/gss/rpc-gss.stp b/gss/rpc-gss.stp
new file mode 100755
index 0000000..91b2430
--- /dev/null
+++ b/gss/rpc-gss.stp
@@ -0,0 +1,23 @@
+#!/usr/bin/env stap
+
+probe module("sunrpc").function("rpcauth_create") ?
+{
+ printf("rpcauth_create: %d\n", $pseudoflavor);
+}
+probe module("rpcsec_gss_krb5").function("*@net/sunrpc/auth_gss/*")
+{
+ printf("%s\n", probefunc())
+}
+probe module("auth_rpcgss").function("*@net/sunrpc/auth_gss/*")
+{
+ printf("%s\n", probefunc())
+}
+
+probe begin {
+ printf("Beginning RPC trace...\n")
+}
+
+probe end {
+ printf("Ending RPC trace...\n")
+}
+
diff --git a/nfsd/nfsd-timer.stp b/nfsd/nfsd-timer.stp
new file mode 100644
index 0000000..6eccfa3
--- /dev/null
+++ b/nfsd/nfsd-timer.stp
@@ -0,0 +1,25 @@
+global time
+global threshold=2 /* milliseconds */
+global nesting
+probe nfsd.proc.entries {
+ tid=tid()
+ n=nesting[tid]++
+ time[tid,n] = gettimeofday_ms()
+}
+probe nfsd.proc.return {
+ tid=tid()
+ n = (nesting[tid] = nesting[tid]-1)
+ if (n < 0) {
+ nesting[tid]=0; next
+ } // missed entry event
+ if (! ([tid,n] in time)) next // missed entry event
+ dt = gettimeofday_ms()-time[tid,n]
+ delete time[tid,n]
+ if (dt>threshold) {
+ printf("%s(%d) %s took too long (%d > %d)\n",
+ execname(), tid, name, dt, threshold)
+ }
+}
+
+probe begin { log("starting nfsd-timer probe") }
+probe end { log("ending nfsd-timer probe") }
diff --git a/nfsd/nfsd_offsets.stp b/nfsd/nfsd_offsets.stp
new file mode 100644
index 0000000..4c95469
--- /dev/null
+++ b/nfsd/nfsd_offsets.stp
@@ -0,0 +1,31 @@
+global write_offset, commit_offset
+
+probe nfsd.proc.write {
+
+ if (write_offset) {
+ if ((offset - write_offset) != 0x80000)
+ printf("%s: offset 0x%x > 0x%x\n", name,
+ offset, (offset - write_offset));
+ }
+ write_offset = offset;
+}
+
+probe nfsd.proc.commit {
+ /*
+ if (($offset - commit_offset) != 0x80000)
+ printf("nfsd_commit: offset 0x%x > 0x%x\n", $offset, ($offset - commit_offset));
+ printf("%s: %s\n", name, argstr);
+ printf("%s: offset %ld count 0x%x\n", name, long(offset), count);
+ */
+ commit_offset = offset;
+}
+/*
+probe nfs.fop.aio_write.return {
+ printf("%s: \n", name);
+}
+*/
+
+probe begin { log("starting nfsd-offset probe") }
+
+probe end { log("ending nfsd-offset probe") }
+
diff --git a/nfsd/nfsd_writes.stp b/nfsd/nfsd_writes.stp
new file mode 100644
index 0000000..627d3ee
--- /dev/null
+++ b/nfsd/nfsd_writes.stp
@@ -0,0 +1,8 @@
+probe module("nfsd").function("nfsd_vfs_write")
+{
+ printf("nfsd_vfs_write: file %p: %s\n", $file, file2ops($file));
+}
+
+probe begin { log("starting nfsd_writes probe") }
+
+probe end { log("ending nfsd_writes probe") }