aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2009-08-13 16:35:01 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2009-08-26 18:46:40 -0400
commitd93f12f3f417e49a175800da85c6fcb2a5096e03 (patch)
tree5fbefeafd27b78be0cd9bca3b9b59b3258ae2ab8 /kernel/trace
parentbd1a5c849bdcc5c89e4a6a18216cd2b9a7a8a78f (diff)
tracing: Introduce TRACE_FIELD_ZERO() macro
Use TRACE_FIELD_ZERO(type, item) instead of TRACE_FIELD_ZERO_CHAR(item). This also includes a typo fix of TRACE_ZERO_CHAR() macro. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Avi Kivity <avi@redhat.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Frank Ch. Eigler <fche@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jason Baron <jbaron@redhat.com> Cc: Jim Keniston <jkenisto@us.ibm.com> Cc: K.Prasad <prasad@linux.vnet.ibm.com> Cc: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Cc: Przemysław Pawełczyk <przemyslaw@pawelczyk.it> Cc: Roland McGrath <roland@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Tom Zanussi <tzanussi@gmail.com> Cc: Vegard Nossum <vegard.nossum@gmail.com> LKML-Reference: <20090813203501.31965.30172.stgit@localhost.localdomain> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_event_types.h4
-rw-r--r--kernel/trace/trace_export.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/kernel/trace/trace_event_types.h b/kernel/trace/trace_event_types.h
index 6db005e12487..e74f0906ab1a 100644
--- a/kernel/trace/trace_event_types.h
+++ b/kernel/trace/trace_event_types.h
@@ -109,7 +109,7 @@ TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore,
109 TRACE_STRUCT( 109 TRACE_STRUCT(
110 TRACE_FIELD(unsigned long, ip, ip) 110 TRACE_FIELD(unsigned long, ip, ip)
111 TRACE_FIELD(char *, fmt, fmt) 111 TRACE_FIELD(char *, fmt, fmt)
112 TRACE_FIELD_ZERO_CHAR(buf) 112 TRACE_FIELD_ZERO(char, buf)
113 ), 113 ),
114 TP_RAW_FMT("%08lx (%d) fmt:%p %s") 114 TP_RAW_FMT("%08lx (%d) fmt:%p %s")
115); 115);
@@ -117,7 +117,7 @@ TRACE_EVENT_FORMAT(bprint, TRACE_BPRINT, bprint_entry, ignore,
117TRACE_EVENT_FORMAT(print, TRACE_PRINT, print_entry, ignore, 117TRACE_EVENT_FORMAT(print, TRACE_PRINT, print_entry, ignore,
118 TRACE_STRUCT( 118 TRACE_STRUCT(
119 TRACE_FIELD(unsigned long, ip, ip) 119 TRACE_FIELD(unsigned long, ip, ip)
120 TRACE_FIELD_ZERO_CHAR(buf) 120 TRACE_FIELD_ZERO(char, buf)
121 ), 121 ),
122 TP_RAW_FMT("%08lx (%d) fmt:%p %s") 122 TP_RAW_FMT("%08lx (%d) fmt:%p %s")
123); 123);
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 9cbe7f1930ea..f75faeccf68e 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -42,9 +42,9 @@ extern void __bad_type_size(void);
42 if (!ret) \ 42 if (!ret) \
43 return 0; 43 return 0;
44 44
45#undef TRACE_FIELD_ZERO_CHAR 45#undef TRACE_FIELD_ZERO
46#define TRACE_FIELD_ZERO_CHAR(item) \ 46#define TRACE_FIELD_ZERO(type, item) \
47 ret = trace_seq_printf(s, "\tfield:char " #item ";\t" \ 47 ret = trace_seq_printf(s, "\tfield:" #type " " #item ";\t" \
48 "offset:%u;\tsize:0;\n", \ 48 "offset:%u;\tsize:0;\n", \
49 (unsigned int)offsetof(typeof(field), item)); \ 49 (unsigned int)offsetof(typeof(field), item)); \
50 if (!ret) \ 50 if (!ret) \
@@ -92,9 +92,6 @@ ftrace_format_##call(struct ftrace_event_call *unused, \
92 92
93#include "trace_event_types.h" 93#include "trace_event_types.h"
94 94
95#undef TRACE_ZERO_CHAR
96#define TRACE_ZERO_CHAR(arg)
97
98#undef TRACE_FIELD 95#undef TRACE_FIELD
99#define TRACE_FIELD(type, item, assign)\ 96#define TRACE_FIELD(type, item, assign)\
100 entry->item = assign; 97 entry->item = assign;
@@ -107,6 +104,9 @@ ftrace_format_##call(struct ftrace_event_call *unused, \
107#define TRACE_FIELD_SIGN(type, item, assign, is_signed) \ 104#define TRACE_FIELD_SIGN(type, item, assign, is_signed) \
108 TRACE_FIELD(type, item, assign) 105 TRACE_FIELD(type, item, assign)
109 106
107#undef TRACE_FIELD_ZERO
108#define TRACE_FIELD_ZERO(type, item)
109
110#undef TP_CMD 110#undef TP_CMD
111#define TP_CMD(cmd...) cmd 111#define TP_CMD(cmd...) cmd
112 112
@@ -180,8 +180,8 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
180 if (ret) \ 180 if (ret) \
181 return ret; 181 return ret;
182 182
183#undef TRACE_FIELD_ZERO_CHAR 183#undef TRACE_FIELD_ZERO
184#define TRACE_FIELD_ZERO_CHAR(item) 184#define TRACE_FIELD_ZERO(type, item)
185 185
186#undef TRACE_EVENT_FORMAT 186#undef TRACE_EVENT_FORMAT
187#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \ 187#define TRACE_EVENT_FORMAT(call, proto, args, fmt, tstruct, tpfmt) \