diff options
author | Steve Dickson <steved@redhat.com> | 2011-03-17 15:16:34 -0400 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2011-03-17 15:16:34 -0400 |
commit | fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43 (patch) | |
tree | 21c199757b2120ceda2917abb4411efee3badab4 /nfs | |
parent | ed1bd250c4143f25b4f9913f4da7b88e46913bb9 (diff) | |
download | systemtap-fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43.tar.gz systemtap-fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43.tar.xz systemtap-fcdb3fb0a6ed486e996ec87c9a01b2e435bd9a43.zip |
Added top reads
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'nfs')
-rw-r--r-- | nfs/nfs_topreads.stp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/nfs/nfs_topreads.stp b/nfs/nfs_topreads.stp new file mode 100644 index 0000000..8e8fff2 --- /dev/null +++ b/nfs/nfs_topreads.stp @@ -0,0 +1,22 @@ +#!/usr/bin/env stap + +global starts, reads + +probe begin { + printf("Collecting top NFS reads...\n") +} + +probe module("nfs").function("*@fs/nfs/read.c") +{ + starts[probefunc()] = gettimeofday_us() +} +probe module("nfs").function("*@fs/nfs/read.c").return +{ + reads[probefunc()] = gettimeofday_us() - starts[probefunc()] +} + +probe end { + printf("Collating data...\n"); + foreach (name in reads- limit 20) + printf("%10d %s\n", reads[name], name) +} |