tracing: Have __dynamic_array() define a field
authorLai Jiangshan <laijs@cn.fujitsu.com>
Tue, 15 Dec 2009 07:39:34 +0000 (15:39 +0800)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 6 Jan 2010 16:30:02 +0000 (11:30 -0500)
This is part of a patch set that removes the show_format method
in the ftrace event macros.

This patch set requires that all fields are added to the
ftrace_event_call->fields. This patch changes __dynamic_array()
to call trace_define_field() to include fields that use __dynamic_array().

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B273D36.8090100@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_export.c

index d4fa5dc1ee4e0763a54224654129ded7c9ec48f1..9978a4f40090db459fb79a020d41bcf098c14505 100644 (file)
@@ -175,7 +175,12 @@ ftrace_format_##name(struct ftrace_event_call *unused,                     \
                return ret;
 
 #undef __dynamic_array
-#define __dynamic_array(type, item)
+#define __dynamic_array(type, item)                                    \
+       ret = trace_define_field(event_call, #type, #item,              \
+                                offsetof(typeof(field), item),         \
+                                0, is_signed_type(type), FILTER_OTHER);\
+       if (ret)                                                        \
+               return ret;
 
 #undef FTRACE_ENTRY
 #define FTRACE_ENTRY(name, struct_name, id, tstruct, print)            \