summaryrefslogtreecommitdiffstats
path: root/tapset/nfs.stp
diff options
context:
space:
mode:
authorwenji <wenji>2007-08-22 03:41:17 +0000
committerwenji <wenji>2007-08-22 03:41:17 +0000
commit48480f3fc6b045e5697d304196b96de45da660ad (patch)
treea11d5c8e2592db92a5a58c0fe8b47761b8111076 /tapset/nfs.stp
parentaf2fbb023a76ad397ae3bd9158c6d4ac7fa02c47 (diff)
downloadsystemtap-steved-48480f3fc6b045e5697d304196b96de45da660ad.tar.gz
systemtap-steved-48480f3fc6b045e5697d304196b96de45da660ad.tar.xz
systemtap-steved-48480f3fc6b045e5697d304196b96de45da660ad.zip
2007-08-22 Wenji Huang <wenji.huang@oracle.com>
* nfs.stp (__iov_length): Updated, Temporary here. * nfs_proc.stp (__i2n_ip_proto): Add type cast to sockaddr_in. (nfs.proc?.*): Modify evaluating count and offset. (nfs.proc?.read.return): Delete evaluating size and units. (nfs.proc?.write.return): Modify evaluating size. (nfs.proc?.create): Modify evaluating filename and filelen. (nfs.proc?.rename): Fix typo.
Diffstat (limited to 'tapset/nfs.stp')
-rw-r--r--tapset/nfs.stp13
1 files changed, 11 insertions, 2 deletions
diff --git a/tapset/nfs.stp b/tapset/nfs.stp
index 670a6650..3d4c6e42 100644
--- a/tapset/nfs.stp
+++ b/tapset/nfs.stp
@@ -254,8 +254,17 @@ function __file_parentname:string (file:long) %{ /* pure */
%}
function __iov_length:long(iov:long, nr_segs:long) %{ /* pure */
- size_t count = iov_length((const struct iovec *)(long)THIS->iov, (unsigned long)THIS->nr_segs);
- THIS->__retvalue = (long)count;
+ unsigned long seg;
+ size_t ret = 0;
+ const struct iovec *iov = (const struct iovec *)(long)THIS->iov;
+ unsigned long nr_segs = (unsigned long)THIS->nr_segs;
+
+ for (seg = 0; seg < nr_segs; seg++)
+ ret += kread(&(iov[seg].iov_len));
+
+ THIS->__retvalue = (long)ret;
+ CATCH_DEREF_FAULT();
+
%}
probe nfs.fop.entries = nfs.fop.llseek,