diff options
-rw-r--r-- | nfs/nfs_dio.stp | 13 | ||||
-rw-r--r-- | nfs/nfs_readpages.stp | 7 |
2 files changed, 17 insertions, 3 deletions
diff --git a/nfs/nfs_dio.stp b/nfs/nfs_dio.stp new file mode 100644 index 0000000..84141d1 --- /dev/null +++ b/nfs/nfs_dio.stp @@ -0,0 +1,13 @@ +/* +probe module("nfs").function("nfs_direct_write") +{ + printf(" nfs_direct_write: count %d \n", $count); +} +*/ +probe module("nfs").statement("*@fs/nfs/direct.c:1000") +{ + printf(" nfs_direct_write: count %d \n", $count); +} + +probe begin { log("starting NFS probe") } +probe end { log("ending NFS probe") } diff --git a/nfs/nfs_readpages.stp b/nfs/nfs_readpages.stp index 852953c..7788573 100644 --- a/nfs/nfs_readpages.stp +++ b/nfs/nfs_readpages.stp @@ -1,15 +1,16 @@ -global read_pages_start_time, read_pages_time, read_pages_longest +global read_pages_start_time, read_pages_time, read_pages_longest,num_pages probe module("nfs").function("nfs_readpages") { + num_pages = $nr_pages read_pages_start_time = gettimeofday_us() } probe module("nfs").function("nfs_readpages").return { read_pages_time <<< gettimeofday_us() - read_pages_start_time if (@max(read_pages_time) > read_pages_longest) { - printf ("%s: %s time avg %d max %d\n", execname(), probefunc(), - @avg(read_pages_time), @max(read_pages_time)) + printf ("%s: %s time avg %d max %d pages %d\n", execname(), probefunc(), + @avg(read_pages_time), @max(read_pages_time), num_pages) } read_pages_longest = @max(read_pages_time) } |