diff options
author | steved <steved@rawhat.boston.devel.redhat.com> | 2008-10-28 16:14:44 -0400 |
---|---|---|
committer | steved <steved@rawhat.boston.devel.redhat.com> | 2008-10-28 16:14:44 -0400 |
commit | 4f7073158a89cc040c93cd477353d061038cf43c (patch) | |
tree | 10180a1547deb64c8bbd589d052377f1d38d332b /tracemarks | |
parent | 0c9cf2ad9774790ba2856e82d66af2be370e3271 (diff) | |
download | systemtap-4f7073158a89cc040c93cd477353d061038cf43c.tar.gz systemtap-4f7073158a89cc040c93cd477353d061038cf43c.tar.xz systemtap-4f7073158a89cc040c93cd477353d061038cf43c.zip |
Added linux-2.6-lttng-nfs-tracepoints.patch
Diffstat (limited to 'tracemarks')
-rw-r--r-- | tracemarks/kernel-patches/linux-2.6-lttng-nfs-tracepoints.patch | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/tracemarks/kernel-patches/linux-2.6-lttng-nfs-tracepoints.patch b/tracemarks/kernel-patches/linux-2.6-lttng-nfs-tracepoints.patch new file mode 100644 index 0000000..878de7d --- /dev/null +++ b/tracemarks/kernel-patches/linux-2.6-lttng-nfs-tracepoints.patch @@ -0,0 +1,156 @@ +diff -up linux-2.6-lttng/fs/nfs/dir.c.orig linux-2.6-lttng/fs/nfs/dir.c +--- linux-2.6-lttng/fs/nfs/dir.c.orig 2008-10-07 13:18:58.943505000 -0400 ++++ linux-2.6-lttng/fs/nfs/dir.c 2008-10-28 15:06:19.220840000 -0400 +@@ -34,6 +34,7 @@ + #include <linux/namei.h> + #include <linux/mount.h> + #include <linux/sched.h> ++#include <trace/nfs.h> + + #include "nfs4_fs.h" + #include "delegation.h" +@@ -773,6 +774,7 @@ static int nfs_lookup_revalidate(struct + struct nfs_fh fhandle; + struct nfs_fattr fattr; + ++ trace_nfs_lookup_revalidate_entry(dentry, nd); + parent = dget_parent(dentry); + dir = parent->d_inode; + nfs_inc_stats(dir, NFSIOS_DENTRYREVALIDATE); +@@ -785,6 +787,7 @@ static int nfs_lookup_revalidate(struct + } + + if (is_bad_inode(inode)) { ++ trace_nfs_lookup_revalidate_badinode(dentry); + dfprintk(LOOKUPCACHE, "%s: %s/%s has dud inode\n", + __func__, dentry->d_parent->d_name.name, + dentry->d_name.name); +@@ -815,6 +818,7 @@ static int nfs_lookup_revalidate(struct + dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is valid\n", + __func__, dentry->d_parent->d_name.name, + dentry->d_name.name); ++ trace_nfs_lookup_revalidate_out_valid(dentry); + return 1; + out_zap_parent: + nfs_zap_caches(dir); +@@ -833,6 +837,7 @@ out_zap_parent: + dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", + __func__, dentry->d_parent->d_name.name, + dentry->d_name.name); ++ trace_nfs_lookup_revalidate_out_bad(dentry); + return 0; + } + +@@ -902,6 +907,7 @@ static struct dentry *nfs_lookup(struct + struct nfs_fh fhandle; + struct nfs_fattr fattr; + ++ trace_nfs_lookup_entry(dir, dentry, nd); + dfprintk(VFS, "NFS: lookup(%s/%s)\n", + dentry->d_parent->d_name.name, dentry->d_name.name); + nfs_inc_stats(dir, NFSIOS_VFSLOOKUP); +@@ -949,6 +955,7 @@ no_entry: + out_unblock_sillyrename: + nfs_unblock_sillyrename(parent); + out: ++ trace_nfs_lookup_exit(res); + return res; + } + +diff -up /dev/null linux-2.6-lttng/include/trace/nfs.h +--- /dev/null 2008-10-15 10:12:43.964438468 -0400 ++++ linux-2.6-lttng/include/trace/nfs.h 2008-10-28 15:06:51.163407000 -0400 +@@ -0,0 +1,30 @@ ++#ifndef _TRACE_NFS_H ++#define _TRACE_NFS_H ++ ++#include <linux/buffer_head.h> ++#include <linux/tracepoint.h> ++ ++DEFINE_TRACE(nfs_lookup_entry, ++ TPPROTO(struct inode *dir, struct dentry *dentry, struct nameidata *nd), ++ TPARGS(dir, dentry, nd)); ++ ++DEFINE_TRACE(nfs_lookup_exit, ++ TPPROTO(struct dentry *res), ++ TPARGS(res)); ++ ++DEFINE_TRACE(nfs_lookup_revalidate_entry, ++ TPPROTO(struct dentry *dentry, struct nameidata *nd), ++ TPARGS(dentry, nd)); ++ ++DEFINE_TRACE(nfs_lookup_revalidate_out_valid, ++ TPPROTO(struct dentry *dentry), ++ TPARGS(dentry)); ++ ++DEFINE_TRACE(nfs_lookup_revalidate_out_bad, ++ TPPROTO(struct dentry *dentry), ++ TPARGS(dentry)); ++ ++DEFINE_TRACE(nfs_lookup_revalidate_badinode, ++ TPPROTO(struct dentry *dentry), ++ TPARGS(dentry)); ++#endif +diff -up linux-2.6-lttng/ltt/probes/Makefile.orig linux-2.6-lttng/ltt/probes/Makefile +--- linux-2.6-lttng/ltt/probes/Makefile.orig 2008-10-07 13:19:18.382937000 -0400 ++++ linux-2.6-lttng/ltt/probes/Makefile 2008-10-28 15:11:28.102685000 -0400 +@@ -9,7 +9,7 @@ CFLAGS_REMOVE_lockdep-trace.o = -pg + endif + + obj-$(CONFIG_LTT_TRACEPROBES) += kernel-trace.o mm-trace.o fs-trace.o \ +- ipc-trace.o lockdep-trace.o rcu-trace.o ++ ipc-trace.o lockdep-trace.o rcu-trace.o nfs-trace.o + ifeq ($(CONFIG_NET),y) + CFLAGS_REMOVE_net-trace.o = -pg + obj-$(CONFIG_TRACEPROBES) += net-trace.o +diff -up /dev/null linux-2.6-lttng/ltt/probes/nfs-trace.c +--- /dev/null 2008-10-15 10:12:43.964438468 -0400 ++++ linux-2.6-lttng/ltt/probes/nfs-trace.c 2008-10-28 15:23:20.970642000 -0400 +@@ -0,0 +1,47 @@ ++/* ++ * ltt/probes/nfs-trace.c ++ * ++ * NFS tracepoint probes. ++ */ ++ ++#include <linux/module.h> ++#include <linux/buffer_head.h> ++#include <trace/nfs.h> ++ ++void probe_nfs_lookup_entry(struct inode *dir, ++ struct dentry * dentry, struct nameidata *nd) ++{ ++ trace_mark_tp(nfs_lookup_entry, nfs_lookup_entry, ++ probe_nfs_lookup_entry, "%p %p %p", dir, dentry, nd); ++} ++void probe_nfs_lookup_exit(struct dentry *res) ++{ ++ trace_mark_tp(nfs_lookup_exit, nfs_lookup_exit, ++ probe_nfs_lookup_exit, "%p", res); ++} ++ ++void probe_nfs_lookup_revalidate_entry(struct dentry *dentry, ++ struct nameidata *nd) ++{ ++ trace_mark_tp(nfs_lookup_revalidate_entry, nfs_lookup_revalidate_entry, ++ probe_nfs_lookup_revalidate_entry, "%p %p", dentry, nd); ++} ++ ++void probe_nfs_lookup_revalidate_badinode(struct dentry *dentry) ++{ ++ trace_mark_tp(nfs_lookup_revalidate_badinode, ++ nfs_lookup_revalidate_badinode, ++ probe_nfs_lookup_revalidate_badinode, "%p", dentry); ++} ++void probe_nfs_lookup_revalidate_out_valid(struct dentry *dentry) ++{ ++ trace_mark_tp(nfs_lookup_revalidate_out_valid, ++ nfs_lookup_revalidate_out_valid, ++ probe_nfs_lookup_revalidate_out_valid, "%p", dentry); ++} ++void probe_nfs_lookup_revalidate_out_bad(struct dentry *dentry) ++{ ++ trace_mark_tp(nfs_lookup_revalidate_out_bad, ++ nfs_lookup_revalidate_out_bad, ++ probe_nfs_lookup_revalidate_out_bad, "%p", dentry); ++} |