From: Steve Dickson <SteveD@redhat.com>
To: Linux NFSv4 mailing list <nfsv4@linux-nfs.org>,
Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Cc: SystemTAP <systemtap@redhat.com>
Subject: [PATCH 4/5] NFS: Convert trace points to trace markers
Date: Fri, 16 Jan 2009 11:32:14 -0500 [thread overview]
Message-ID: <4970B68E.4090602@RedHat.com> (raw)
In-Reply-To: <4970B451.4080201@RedHat.com>
This the magic that converts the trace points into trace marks
so systemtap scripts can read the data. There is a good chance
these interfaces could change, but it should not effect the
trace points define in the code.
Signed-off-by: Steve Dickson <steved@redhat.com>
--- linux/kernel/trace/Makefile.orig 2009-01-14 15:54:20.000000000 -0500
+++ linux/kernel/trace/Makefile 2009-01-15 12:23:11.000000000 -0500
@@ -18,7 +18,7 @@ endif
obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o
obj-$(CONFIG_RING_BUFFER) += ring_buffer.o
-obj-$(CONFIG_TRACING) += trace.o
+obj-$(CONFIG_TRACING) += trace.o trace_nfs.o
obj-$(CONFIG_CONTEXT_SWITCH_TRACER) += trace_sched_switch.o
obj-$(CONFIG_SYSPROF_TRACER) += trace_sysprof.o
obj-$(CONFIG_FUNCTION_TRACER) += trace_functions.o
--- /dev/null 2009-01-08 09:11:53.943261863 -0500
+++ linux/kernel/trace/trace_nfs.c 2009-01-15 12:23:11.000000000 -0500
@@ -0,0 +1,135 @@
+/*
+ * kernel/trace/nfs-trace.c
+ *
+ * NFS tracepoint probes.
+ */
+
+#include <linux/autoconf.h>
+#include <linux/module.h>
+#include <linux/marker.h>
+
+#include <linux/sunrpc/sched.h>
+#include <linux/sunrpc/xdr.h>
+#include <linux/sunrpc/xprt.h>
+
+#include <trace/nfs.h>
+
+/*
+ * NFS mount probs
+ */
+void probe_nfs_mount(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *raw_data, struct vfsmount *mnt)
+{
+ trace_mark(nfs_mount, "%p %x %p %p %p",
+ fs_type, flags, dev_name, raw_data, mnt);
+}
+void probe_nfs_mount_data_null(struct nfs_mount_data *data, int err)
+{
+ trace_mark(nfs_mount_data_null, "%p %d", data, err);
+}
+void probe_nfs_mount_data_invalvers(struct nfs_mount_data *data, int err)
+{
+ trace_mark(nfs_mount_data_invalvers, "%p %d", data, err);
+}
+void probe_nfs_mount_data_invalsec(struct nfs_mount_data *data, int err)
+{
+ trace_mark(nfs_mount_data_invalsec, "%p %d", data, err);
+}
+void probe_nfs_mount_data_nomem(struct nfs_mount_data *data, int err)
+{
+ trace_mark(nfs_mount_data_nomem, "%p %d", data, err);
+}
+void probe_nfs_mount_data_noaddr(struct nfs_mount_data *data, int err)
+{
+ trace_mark(nfs_mount_data_noaddr, "%p %d", data, err);
+}
+void probe_nfs_mount_data_badfh(struct nfs_mount_data *data, int err)
+{
+ trace_mark(nfs_mount_data_badfh, "%p %d", data, err);
+}
+void probe_nfs_mount_init_clnt(struct nfs_client *clp, int error) {
+
+ trace_mark(nfs_mount_init_clnt, "%p %d", clp, error);
+}
+void probe_nfs_mount_get_root(struct super_block *sb,
+ struct nfs_server *server, struct nfs_fh *mntfh)
+{
+ trace_mark(nfs_mount_get_root, "%p %p %p", sb, server, mntfh);
+}
+void probe_nfs__mount_get_root_fhget(struct super_block *sb,
+ struct nfs_server *server, int error)
+{
+ trace_mark(nfs__mount_get_root_fhget, "%p %p %d", sb, server, error);
+}
+void probe_nfs__mount_get_root_dummy_root(struct super_block *sb,
+ struct nfs_server *server, int error)
+{
+ trace_mark(nfs__mount_get_root_dummy_root, "%p %p %d", sb, server, error);
+}
+void probe_nfs__mount_get_root_alias(struct super_block *sb,
+ struct nfs_server *server, int error)
+{
+ trace_mark(nfs__mount_get_root_alias, "%p %p %d", sb, server, error);
+}
+
+void probe_nfs_create_rpc_client(struct nfs_client *clp,
+ const struct rpc_timeout *timeo, rpc_authflavor_t flavor,
+ int flags)
+{
+ trace_mark(nfs_create_rpc_client, "%p %p %d %d",
+ clp, timeo, flavor, flags);
+}
+void probe_nfs_create_rpc_client_proto(struct nfs_client *clp, int error)
+{
+
+ trace_mark(nfs_create_rpc_client_proto, "%p %d", clp, error);
+}
+void probe_nfs_start_lockd(struct nfs_server *server, int error)
+{
+ trace_mark(nfs_start_lockd, "%p %d", server, error);
+}
+void probe_nfs_init_server_rpcclient(struct nfs_server *server,
+ const struct rpc_timeout *timeo,
+ rpc_authflavor_t flavor)
+{
+ trace_mark(nfs_init_server_rpcclient, "%p %p %d", server, timeo, flavor);
+}
+void probe_nfs_init_server_rpcclient_clone(
+ struct nfs_server *server, int error)
+{
+ trace_mark(nfs_init_server_rpcclient_clone, "%p %d", server, error);
+}
+void probe_nfs_init_server_rpcclient_auth(
+ struct nfs_server *server, int error)
+{
+ trace_mark(nfs_init_server_rpcclient_auth, "%p %d", server, error);
+}
+void probe_nfs_mount_init_srv(
+ struct nfs_server *server, int error)
+{
+ trace_mark(nfs_mount_init_srv, "%p %d", server, error);
+}
+
+void probe_nfs_probe_fsinfo(struct nfs_server *server,
+ struct nfs_fh *mntfh, struct nfs_fattr *fattr)
+{
+ trace_mark(nfs_probe_fsinfo, "%p %p %p", server, mntfh, fattr);
+}
+void probe_nfs_probe_fsinfo_setcaps(struct nfs_server *server,
+ struct nfs_fh *mntfh, int error)
+{
+ trace_mark(nfs_probe_fsinfo_setcaps, "%p %p %d", server, mntfh, error);
+}
+void probe_nfs_probe_fsinfo_fsinfo(struct nfs_server *server, int error)
+{
+ trace_mark(nfs_probe_fsinfo_fsinfo, "%p %d", server, error);
+}
+void probe_nfs_create_server(struct nfs_server *server,
+ struct nfs_fh *mntfh, int error)
+{
+ trace_mark(nfs_create_server, "%p %p %d", server, mntfh, error);
+}
+void probe_nfs_mount_sget(struct nfs_server *server, int error)
+{
+ trace_mark(nfs_mount_sget, "%p %d", server, error);
+}
--- /dev/null 2009-01-08 09:11:53.943261863 -0500
+++ linux/include/trace/nfs.h 2009-01-15 12:30:45.000000000 -0500
@@ -0,0 +1,99 @@
+#ifndef _TRACE_NFS_H
+#define _TRACE_NFS_H
+#include <linux/init.h>
+#include <linux/kernel.h>
+
+#include <linux/buffer_head.h>
+#include <linux/tracepoint.h>
+
+#include <linux/nfs_mount.h>
+#include <linux/nfs4.h>
+#include <linux/nfs_xdr.h>
+#include <linux/nfs_fs_sb.h>
+#include <linux/sunrpc/auth.h>
+
+#include <linux/posix_acl.h>
+/*
+ * NFS mounting trace points
+ */
+DECLARE_TRACE(nfs_mount,
+ TPPROTO(struct file_system_type *fs_type, int flags,
+ const char *dev_name, void *raw_data, struct vfsmount *mnt),
+ TPARGS(fs_type, flags, dev_name, raw_data, mnt));
+
+DECLARE_TRACE(nfs_mount_data_null,
+ TPPROTO(struct nfs_mount_data *data, int err), TPARGS(data, err));
+DECLARE_TRACE(nfs_mount_data_invalvers,
+ TPPROTO(struct nfs_mount_data *data, int err), TPARGS(data, err));
+DECLARE_TRACE(nfs_mount_data_invalsec,
+ TPPROTO(struct nfs_mount_data *data, int err), TPARGS(data, err));
+DECLARE_TRACE(nfs_mount_data_nomem,
+ TPPROTO(struct nfs_mount_data *data, int err), TPARGS(data, err));
+DECLARE_TRACE(nfs_mount_data_noaddr,
+ TPPROTO(struct nfs_mount_data *data, int err), TPARGS(data, err));
+DECLARE_TRACE(nfs_mount_data_badfh,
+ TPPROTO(struct nfs_mount_data *data, int err), TPARGS(data, err));
+
+DECLARE_TRACE(nfs_mount_get_root,
+ TPPROTO(struct super_block *sb, struct nfs_server *server,
+ struct nfs_fh *mntfh),
+ TPARGS(sb, server, mntfh));
+DECLARE_TRACE(nfs_mount_getroot,
+ TPPROTO(struct super_block *sb, struct nfs_server *server,
+ int error),
+ TPARGS(sb, server, error));
+DECLARE_TRACE(nfs_mount_get_root_fhget,
+ TPPROTO(struct super_block *sb, struct nfs_server *server,
+ int error),
+ TPARGS(sb, server, error));
+DECLARE_TRACE(nfs_mount_get_root_alias,
+ TPPROTO(struct super_block *sb, struct nfs_server *server,
+ int error),
+ TPARGS(sb, server, error));
+DECLARE_TRACE(nfs_mount_get_root_dummy_root,
+ TPPROTO(struct super_block *sb, struct nfs_server *server,
+ int error),
+ TPARGS(sb, server, error));
+
+DECLARE_TRACE(nfs_create_rpc_client,
+ TPPROTO(struct nfs_client *clp, const struct rpc_timeout *timeo,
+ rpc_authflavor_t flavor, int flags),
+ TPARGS(clp, timeo, flavor, flags));
+
+DECLARE_TRACE(nfs_create_rpc_client_proto,
+ TPPROTO(struct nfs_client *clp, int error),
+ TPARGS(clp,error));
+//DECLARE_TRACE(nfs_create_rpc_client_client, TPPROTO(int error), TPARGS(error));
+DECLARE_TRACE(nfs_mount_init_clnt,
+ TPPROTO(struct nfs_client *clp, int error), TPARGS(clp, error));
+DECLARE_TRACE(nfs_mount_init_srv,
+ TPPROTO(struct nfs_server *server, int error), TPARGS(server, error));
+
+DECLARE_TRACE(nfs_mount_sget,
+ TPPROTO(struct nfs_server *server, int error), TPARGS(server, error));
+
+DECLARE_TRACE(nfs_init_server_rpcclient,
+ TPPROTO(struct nfs_server *server, const struct rpc_timeout *timeo,
+ rpc_authflavor_t flavor),
+ TPARGS(server, timeo, flavor));
+DECLARE_TRACE(nfs_init_server_rpcclient_clone,
+ TPPROTO(struct nfs_server *server, int error), TPARGS(server, error));
+DECLARE_TRACE(nfs_init_server_rpcclient_auth,
+ TPPROTO(struct nfs_server *server, int error), TPARGS(server, error));
+
+DECLARE_TRACE(nfs_start_lockd,
+ TPPROTO(struct nfs_server *server, int error), TPARGS(server, error));
+
+DECLARE_TRACE(nfs_probe_fsinfo,
+ TPPROTO(struct nfs_server *server, struct nfs_fh *mntfh,
+ struct nfs_fattr *fattr),
+ TPARGS(server, mntfh, fattr));
+DECLARE_TRACE(nfs_probe_fsinfo_fsinfo,
+ TPPROTO(struct nfs_server *server, int error), TPARGS(server, error));
+DECLARE_TRACE(nfs_probe_fsinfo_setcaps,
+ TPPROTO(struct nfs_server *server, int error), TPARGS(server, error));
+
+DECLARE_TRACE(nfs_create_server,
+ TPPROTO(struct nfs_server *server, struct nfs_fh *mntfh, int error),
+ TPARGS(server, mntfh, error));
+#endif
next prev parent reply other threads:[~2009-01-16 16:32 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-16 16:22 [RFC][PATCH 0/5] NFS: trace points added to mounting path Steve Dickson
2009-01-16 16:30 ` [PATCH 3/5] NFS: Adding trace points to nfs/client.c Steve Dickson
2009-01-16 16:32 ` Steve Dickson [this message]
2009-01-16 16:33 ` [PATCH 5/5] NFS: Systemtap script Steve Dickson
[not found] ` <4970B451.4080201-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-16 16:25 ` [PATCH 1/5] NFS: Adding trace points to fs/nfs/getroot.c Steve Dickson
2009-01-16 16:28 ` [PATCH 2/5] NFS: Adding trace points to fs/nfs/super.c Steve Dickson
2009-01-16 18:52 ` [RFC][PATCH 0/5] NFS: trace points added to mounting path Chuck Lever
2009-01-21 17:13 ` Steve Dickson
[not found] ` <497757D1.7090908-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-21 18:01 ` Chuck Lever
2009-01-21 19:29 ` Trond Myklebust
2009-01-21 19:58 ` Steve Dickson
2009-01-21 20:23 ` Trond Myklebust
2009-01-22 13:07 ` Steve Dickson
[not found] ` <49786F9F.7030400-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-22 15:30 ` Trond Myklebust
2009-01-22 15:49 ` Steve Dickson
2009-01-22 17:47 ` Arnaldo Carvalho de Melo
2009-01-21 19:37 ` Steve Dickson
2009-01-21 20:19 ` Chuck Lever
2009-01-21 22:36 ` Greg Banks
[not found] ` <4977A385.8000406-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-21 22:47 ` Arnaldo Carvalho de Melo
2009-01-21 22:57 ` Trond Myklebust
2009-01-21 23:06 ` Arnaldo Carvalho de Melo
2009-01-21 22:56 ` Trond Myklebust
2009-01-21 23:11 ` Greg Banks
2009-01-21 23:47 ` Trond Myklebust
2009-01-22 0:53 ` Frank Ch. Eigler
2009-01-22 2:04 ` Greg Banks
[not found] ` <4977D431.1020906-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-22 15:27 ` Steve Dickson
[not found] ` <49789073.1080200-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-22 22:43 ` Greg Banks
2009-01-21 22:56 ` J. Bruce Fields
2009-01-21 23:05 ` Muntz, Daniel
2009-01-22 15:59 ` Steve Dickson
2009-01-22 16:45 ` J. Bruce Fields
2009-01-22 22:54 ` Greg Banks
[not found] ` <4978F91C.4090208-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-23 18:09 ` J. Bruce Fields
2009-01-23 22:18 ` Greg Banks
2009-01-23 18:17 ` Chuck Lever
2009-01-22 13:55 ` Steve Dickson
2009-01-22 22:31 ` Greg Banks
2009-01-21 21:26 ` Greg Banks
2009-01-22 15:19 ` Steve Dickson
2009-01-23 18:28 ` Chuck Lever
2009-01-23 22:21 ` Greg Banks
2009-01-16 23:44 ` Greg Banks
[not found] ` <49711BDF.3010605-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-17 16:15 ` Frank Ch. Eigler
[not found] ` <4972A8F5.7070806@opengridcomputing.com>
2009-01-18 17:47 ` Frank Ch. Eigler
[not found] ` <y0mmydpucww.fsf-vo4H8ooykKW2oG+2xah3EoGKTjYczspe@public.gmane.org>
2009-01-18 23:12 ` Greg Banks
[not found] ` <4973B777.2000102-cP1dWloDopni96+mSzHFpQC/G2K4zDHf@public.gmane.org>
2009-01-19 15:41 ` Frank Ch. Eigler
2009-01-19 23:13 ` Greg Banks
2009-01-19 14:27 ` Jeff Moyer
[not found] ` <x49ab9ntlpp.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2009-01-19 19:49 ` Jason Baron
2009-01-19 22:58 ` Greg Banks
2009-01-21 10:13 ` K.Prasad
2009-01-21 16:39 ` Steve Dickson
[not found] ` <49774FDC.5090307-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2009-01-21 17:04 ` Arnaldo Carvalho de Melo
2009-01-21 19:59 ` Steve Dickson
[not found] ` <20090121170401.GD4394-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2009-01-21 20:39 ` Christoph Hellwig
2009-01-18 16:40 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4970B68E.4090602@RedHat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=systemtap@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox