summaryrefslogtreecommitdiffstats
path: root/nfsd/nfsd_cacheio.stp
diff options
context:
space:
mode:
Diffstat (limited to 'nfsd/nfsd_cacheio.stp')
-rw-r--r--nfsd/nfsd_cacheio.stp147
1 files changed, 147 insertions, 0 deletions
diff --git a/nfsd/nfsd_cacheio.stp b/nfsd/nfsd_cacheio.stp
new file mode 100644
index 0000000..3dc0a8d
--- /dev/null
+++ b/nfsd/nfsd_cacheio.stp
@@ -0,0 +1,147 @@
+#!/usr/bin/env stap
+
+probe module("nfsd").function("exp_pseudoroot")
+{
+ printf("exp_pseudoroot: rqstp %p fhp %p\n", $rqstp, $fhp);
+}
+probe module("nfsd").function("exp_pseudoroot").return
+{
+ printf("exp_pseudoroot: %s\n", nfsderror($return));
+}
+probe module("sunrpc").function("cache_write")
+{
+ if (!isinstr("rpc.idmapd", file2name($filp))) {
+ printf("cache_write(%s): cnt %d %s\n", execname(),
+ $count, file2name($filp));
+ }
+ //printf("cache_write(%s): filp %p cnt %d\n", execname(), $filp, $count);
+ //printf(" : name %s\n", file2name($filp));
+}
+probe module("sunrpc").function("cache_write").return
+{
+ if ($return < 0) {
+ printf("cache_write: error %s\n", errno_str($return));
+ } else {
+ printf("cache_write: cnt %d\n", $return);
+ }
+}
+probe module("nfsd").function("svc_export_lookup")
+{
+ printf(" svc_export_lookup: %p\n", $exp);
+}
+probe module("nfsd").function("svc_export_lookup").return
+{
+ if ($return > 0) {
+ printf(" svc_export_lookup: %s\n", svc_export_dump($return));
+ } else {
+ printf(" svc_export_lookup: return %p\n", $return);
+ }
+}
+probe module("nfsd").function("svc_export_parse")
+{
+ printf(" svc_export_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n",
+ svc_export_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("svc_export_parse").return
+{
+ if ($return < 0)
+ printf(" svc_export_parse: error %s\n", errno_str($return));
+}
+probe module("nfsd").function("exp_get_by_name")
+{
+ printf("exp_get_by_name: clp %p mnt %p dentry %p reqp %p\n",
+ $clp, $mnt, $dentry, $reqp);
+}
+probe module("nfsd").function("exp_get_by_name").return
+{
+ printf("exp_get_by_name: return %p\n", $return);
+}
+probe module("nfsd").function("exp_export")
+{
+ printf("exp_export: %p\n", $nxp);
+}
+probe module("nfsd").function("exp_export").return
+{
+ printf("exp_export: return %p\n", $return);
+}
+/*
+probe module("sunrpc").function("cache_read")
+{
+ printf("cache_read(%s): %s\n", execname(), file2name($filp));
+ //printf("cache_write(%s): filp %p cnt %d\n", execname(), $filp, $count);
+ //printf(" : name %s\n", file2name($filp));
+}
+probe module("sunrpc").function("cache_read").return
+{
+ if ($return < 0)
+ printf("cache_read: error %s\n", errno_str($return));
+}
+*/
+probe module("nfsd").function("svc_export_parse")
+{
+ printf(" svc_export_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n",
+ svc_export_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("svc_export_parse").return
+{
+ if ($return < 0)
+ printf(" svc_export_parse: error %s\n", errno_str($return));
+}
+probe module("sunrpc").function("ip_map_parse")
+{
+ printf(" ip_map_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n", ip_map_data(kernel_string($mesg)));
+}
+probe module("sunrpc").function("ip_map_parse").return
+{
+ if ($return < 0)
+ printf(" ip_map_parse: error %s\n", errno_str($return));
+}
+probe module("nfsd").function("expkey_parse")
+{
+ printf(" expkey_parse: cd %p(%s) mlen %d\n",
+ $cd, kernel_string($cd->name), $mlen);
+ printf(" %s\n", expkey_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("expkey_parse").return
+{
+ if ($return < 0)
+ printf(" expkey_parse: error %s\n", errno_str($return));
+}
+/*
+probe module("nfsd").function("idtoname_parse")
+{
+ printf(" idtoname_parse: cd %p(%s) buflen %d\n",
+ $cd, kernel_string($cd->name), $buflen);
+ printf(" %s\n", idtoname_data(kernel_string($buf)));
+}
+probe module("nfsd").function("idtoname_parse").return
+{
+ if ($return < 0)
+ printf(" idtoname_parse: error %s\n", errno_str($return));
+}
+*/
+probe module("nfsd").function("expkey_request")
+{
+ printf(" expkey_request: cd %p(%s)\n",
+ $cd, kernel_string($cd->name));
+ //print_stack(backtrace());
+ //printf(" %s\n", expkey_data(kernel_string($mesg)));
+}
+probe module("nfsd").function("check_export")
+{
+ printf(" check_export: inode %p flags 0x%x uuid %p\n",
+ $inode, $flags, $uuid);
+}
+probe module("nfsd").function("check_export").return
+{
+ if ($return < 0)
+ printf(" check_export: error %s\n", errno_str($return));
+}
+probe begin { log("starting cachio probe") }
+probe end { log("ending cachio probe") }