[PATCH 04/10] tracing: __dynamic_array() also defines fields

From: Lai Jiangshan
Date: Wed Dec 09 2009 - 02:17:48 EST



dynamic array is also added to struct ftrace_event_call->fields.

Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
---
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c
index 458e5bf..511bc36 100644
--- a/kernel/trace/trace_export.c
+++ b/kernel/trace/trace_export.c
@@ -174,7 +174,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) \


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/