From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 4/5] ocfs2: Add ocfs2_trace.h.
Date: Wed, 10 Nov 2010 10:52:22 +0800 [thread overview]
Message-ID: <1289357543-2538-4-git-send-email-tao.ma@oracle.com> (raw)
In-Reply-To: <4CDA08B6.2070002@oracle.com>
About one year ago, Wengang Wang tried some first steps
to add tracepoints to ocfs2. But at that time we don't
have ocfs2 1.6 introduced, so we delay this work until now
after ocfs2 1.6 and UEK(Unbreakable Enterprise Kernel) are
released.
Wengang's original patch is here:
http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005512.html
But as Steven Rostedt indicated in his article
http://lwn.net/Articles/383362/, we'd better have our trace
files resides in fs/ocfs2, so I rewrited the patch using the
method Steven mentioned in that article.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
fs/ocfs2/ocfs2_trace.h | 16 ++++++++++++++++
fs/ocfs2/super.c | 3 +++
2 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 fs/ocfs2/ocfs2_trace.h
diff --git a/fs/ocfs2/ocfs2_trace.h b/fs/ocfs2/ocfs2_trace.h
new file mode 100644
index 0000000..8d4e49a
--- /dev/null
+++ b/fs/ocfs2/ocfs2_trace.h
@@ -0,0 +1,16 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM ocfs2
+
+#if !defined(_TRACE_OCFS2_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_OCFS2_H
+
+#include <linux/tracepoint.h>
+
+
+#endif /* _TRACE_OCFS2_H */
+
+/* This part must be outside protection */
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH .
+#define TRACE_INCLUDE_FILE ocfs2_trace
+#include <trace/define_trace.h>
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 21eb934..d592a6e 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -43,6 +43,9 @@
#include <linux/quotaops.h>
#include <linux/smp_lock.h>
+#define CREATE_TRACE_POINTS
+#include "ocfs2_trace.h"
+
#define MLOG_MASK_PREFIX ML_SUPER
#include <cluster/masklog.h>
--
1.7.1.GIT
next prev parent reply other threads:[~2010-11-10 2:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 2:51 [Ocfs2-devel] [PATCH 0/5] The first try of adding trace event to ocfs2 Tao Ma
2010-11-10 2:52 ` [Ocfs2-devel] [PATCH 1/5] ocfs2: Remove unused truncate function from alloc.c Tao Ma
2010-11-10 9:41 ` Joel Becker
2010-11-10 2:52 ` [Ocfs2-devel] [PATCH 2/5] ocfs2: Remove ENTRY from masklog Tao Ma
2010-11-10 9:43 ` Joel Becker
2010-11-10 14:19 ` Tao Ma
2010-11-10 2:52 ` [Ocfs2-devel] [PATCH 3/5] ocfs2: Remove EXIT " Tao Ma
2010-11-10 9:45 ` Joel Becker
2010-11-10 14:22 ` Tao Ma
2010-11-10 2:52 ` Tao Ma [this message]
2010-11-10 9:48 ` [Ocfs2-devel] [PATCH 4/5] ocfs2: Add ocfs2_trace.h Joel Becker
2010-11-10 14:33 ` Tao Ma
2010-11-10 22:19 ` Joel Becker
2010-11-10 2:52 ` [Ocfs2-devel] [PATCH 5/5] ocfs2: Remove mlog(0) from fs/ocfs2/alloc.c Tao Ma
2010-11-10 9:50 ` Joel Becker
2010-11-10 14:39 ` Tao Ma
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=1289357543-2538-4-git-send-email-tao.ma@oracle.com \
--to=tao.ma@oracle.com \
--cc=ocfs2-devel@oss.oracle.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;
as well as URLs for NNTP newsgroup(s).