tracing: __dynamic_array() also defines fields
PATCH 4/10 tracing: __dynamic_array() also defines fields
dynamic array is also added to struct ftrace_event_call->fields.
FTRACE_ENTRY(bprint) and FTRACE_ENTRY(print) use this __dynamic_array().
Preparing patch for new way of printing format files which uses defined fields to print formats. So it requires all fields are added to struct ftrace_event_call->fields.
---
kernel/trace/trace_export.c +6 -1
@@ -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) \
[tip:tracing/core] tracing: Have __dynamic_array() define a field
Commit-ID: 809826a389040e0ad9d646b587bccc0e34691afd Gitweb: http://git.kernel.org/tip/809826a389040e0ad9d646b587bccc0e34691afd Author: Lai Jiangshan <[email protected]> AuthorDate: Tue, 15 Dec 2009 15:39:34 +0800 Committer: Steven Rostedt <[email protected]> CommitDate: Wed, 6 Jan 2010 11:30:02 -0500
tracing: Have __dynamic_array() define a field
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().
LKML-Reference: <[email protected]>
--- kernel/trace/trace_export.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
kernel/trace/trace_export.c +6 -1
@@ -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) \