Commit 80a9a84da381087ed89f5fdfc40a513cf9768ac4

Authored by Wengang Wang
Committed by Tao Ma
1 parent c1e8d35ef5

ocfs2: Add ocfs2_trace.h.

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>

Showing 2 changed files with 19 additions and 0 deletions Side-by-side Diff

fs/ocfs2/ocfs2_trace.h
  1 +#undef TRACE_SYSTEM
  2 +#define TRACE_SYSTEM ocfs2
  3 +
  4 +#if !defined(_TRACE_OCFS2_H) || defined(TRACE_HEADER_MULTI_READ)
  5 +#define _TRACE_OCFS2_H
  6 +
  7 +#include <linux/tracepoint.h>
  8 +
  9 +
  10 +#endif /* _TRACE_OCFS2_H */
  11 +
  12 +/* This part must be outside protection */
  13 +#undef TRACE_INCLUDE_PATH
  14 +#define TRACE_INCLUDE_PATH .
  15 +#define TRACE_INCLUDE_FILE ocfs2_trace
  16 +#include <trace/define_trace.h>
... ... @@ -42,6 +42,9 @@
42 42 #include <linux/seq_file.h>
43 43 #include <linux/quotaops.h>
44 44  
  45 +#define CREATE_TRACE_POINTS
  46 +#include "ocfs2_trace.h"
  47 +
45 48 #define MLOG_MASK_PREFIX ML_SUPER
46 49 #include <cluster/masklog.h>
47 50