diff options
author | Steve Dickson <steved@redhat.com> | 2010-05-18 11:11:04 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2010-05-18 11:11:04 -0400 |
commit | 7768e217abbb8918dab268ab149375d6161a42ba (patch) | |
tree | ee0827bb41a1d0e35e80e25049c7fbf49a8ad409 | |
parent | b1abc38ebb67fc1ce4cc53bba265f3eaa8a2f999 (diff) | |
download | systemtap-7768e217abbb8918dab268ab149375d6161a42ba.tar.gz systemtap-7768e217abbb8918dab268ab149375d6161a42ba.tar.xz systemtap-7768e217abbb8918dab268ab149375d6161a42ba.zip |
Added file2ops:string
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | tapset/fs.stp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tapset/fs.stp b/tapset/fs.stp index f8122bf..94c39ff 100644 --- a/tapset/fs.stp +++ b/tapset/fs.stp @@ -39,3 +39,23 @@ function dentry2name:string(dentry_:long) CATCH_DEREF_FAULT(); %} + +function file2ops:string(filep:long) +%{ + char *start = NULL, buf[MAXSTRINGLEN]; + struct file *file = (struct file *)(long) kread(&(THIS->filep)); + struct file_operations *f_ops; + + if (file) { + f_ops = (struct file_operations *)(long) kread(&(file->f_op)); + + snprintf(THIS->__retvalue, MAXSTRINGLEN, "aio_write: %p", + f_ops->aio_write); + /* + snprintf(THIS->__retvalue, MAXSTRINGLEN, "writev: %s", + symname(f_ops->writev)); + */ + } + + CATCH_DEREF_FAULT(); +%} |