diff options
author | Steve Dickson <steved@redhat.com> | 2011-03-17 14:45:31 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2011-03-17 14:45:31 -0400 |
commit | ed1bd250c4143f25b4f9913f4da7b88e46913bb9 (patch) | |
tree | 08666b50304284914297d828f28b3437976f78ab /nfs | |
parent | d13bc40cb3ee1904866e4e0c660162706e5f4d2b (diff) | |
download | systemtap-ed1bd250c4143f25b4f9913f4da7b88e46913bb9.tar.gz systemtap-ed1bd250c4143f25b4f9913f4da7b88e46913bb9.tar.xz systemtap-ed1bd250c4143f25b4f9913f4da7b88e46913bb9.zip |
Added a couple more probs
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'nfs')
-rw-r--r-- | nfs/nfs_writes.stp | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/nfs/nfs_writes.stp b/nfs/nfs_writes.stp new file mode 100644 index 0000000..27ddc40 --- /dev/null +++ b/nfs/nfs_writes.stp @@ -0,0 +1,76 @@ +global nfs_file_write_start_time, file_write_time, file_write_longest + +probe module("nfs").function("nfs_file_write") +{ + nfs_file_write_start_time = gettimeofday_us() +} +probe module("nfs").function("nfs_file_write").return +{ + file_write_time <<< gettimeofday_us() - nfs_file_write_start_time + if (@max(file_write_time) > file_write_longest) + printf ("%s: %s time avg %d max %d\n", execname(), probefunc(), + @avg(file_write_time), @max(file_write_time)) + file_write_longest = @max(file_write_time) +} + +global nfs_write_begin_start_time, write_bg_time, write_bg_longest + +probe module("nfs").function("nfs_write_begin") +{ + nfs_write_begin_start_time = gettimeofday_us() +} +probe module("nfs").function("nfs_write_begin").return +{ + write_bg_time <<< gettimeofday_us() - nfs_write_begin_start_time + if (@max(write_bg_time) > write_bg_longest) + printf ("%s: %s time avg %d max %d\n", execname(), probefunc(), + @avg(write_bg_time), @max(write_bg_time)) + write_bg_longest = @max(write_bg_time) +} + +global nfs_flush_incompatible_start_time, flush_ttime, longest_flush + +probe module("nfs").function("nfs_flush_incompatible") +{ + nfs_flush_incompatible_start_time = gettimeofday_us() +} +probe module("nfs").function("nfs_flush_incompatible").return +{ + flush_ttime <<< gettimeofday_us() - nfs_flush_incompatible_start_time + if (@max(flush_ttime) > longest_flush) + printf ("%s: %s time avg %d max %d\n", execname(), probefunc(), + @avg(flush_ttime), @max(flush_ttime)); + longest_flush = @max(flush_ttime) +} +global nfs_wb_page_start_time, wb_page_time, wb_page_longest + +probe module("nfs").function("nfs_wb_page") +{ + nfs_wb_page_start_time = gettimeofday_us() +} +probe module("nfs").function("nfs_wb_page").return +{ + wb_page_time <<< gettimeofday_us() - nfs_wb_page_start_time + if (@max(wb_page_time) > wb_page_longest) + printf ("%s: %s time avg %d max %d\n", execname(), probefunc(), + @avg(wb_page_time), @max(wb_page_time)); + wb_page_longest = @max(wb_page_time) +} + +global nfs_commit_inode_start_time, commit_time, commit_longest + +probe module("nfs").function("nfs_commit_inode") +{ + nfs_commit_inode_start_time = gettimeofday_us() +} +probe module("nfs").function("nfs_commit_inode").return +{ + commit_time <<< gettimeofday_us() - nfs_commit_inode_start_time + if (@max(commit_time) > commit_longest) + printf ("%s: %s time avg %d max %d\n", execname(), probefunc(), + @avg(commit_time), @max(commit_time)); + commit_longest = @max(commit_time) +} + +probe begin { log("starting nfs_writes probe") } +probe end { log("ending nfs_writes probe") } |