Skip to content

Commit

Permalink
ocfs2: Add ocfs2_trace.h.
Browse files Browse the repository at this point in the history
About one year ago, Wengang Wang tried some first steps
to add tracepoints to ocfs2. Hiss 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 <boyu.mt@taobao.com>
  • Loading branch information
Wengang Wang authored and Tao Ma committed Feb 21, 2011
1 parent c1e8d35 commit 80a9a84
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fs/ocfs2/ocfs2_trace.h
Original file line number Diff line number Diff line change
@@ -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>
3 changes: 3 additions & 0 deletions fs/ocfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
#include <linux/seq_file.h>
#include <linux/quotaops.h>

#define CREATE_TRACE_POINTS
#include "ocfs2_trace.h"

#define MLOG_MASK_PREFIX ML_SUPER
#include <cluster/masklog.h>

Expand Down

0 comments on commit 80a9a84

Please sign in to comment.