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.
Signed-off-by Lai Jiangshan <[email protected]>
---
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) \
Quoted 1 line · Lai Jiangshan
dynamic array is also added to struct
ftrace_event_call->fields.
Could you add to the change log which events use it. I see bprint and print. But this change log is still lacking. It should explain what features this fixes.
But as for the patch itself:
Acked-by Steven Rostedt <[email protected]>
Thanks,
-- Steve
Quoted 23 lines
Signed-off-by Lai Jiangshan <[email protected]>---
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) \