Re: [PATCH 1/2] tracing/events: add missing type info of dynamicarrays

From: Frederic Weisbecker
Date: Fri Jul 17 2009 - 00:44:41 EST


On Thu, Jul 16, 2009 at 10:53:34AM +0800, Li Zefan wrote:
> From: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
>
> The format file doesn't contain enough information for
> __dynamic_array/__string. The type name is missing.
>
> Before:
> # cat format:
> name: irq_handler_entry
> ...
> field:__data_loc name; offset:16; size:2;
>
> After:
> # cat format:
> name: irq_handler_entry
> ...
> field:__data_loc char[] name; offset:16; size:2;
>
> Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
> Signed-off-by: Li Zefan <lizf@xxxxxxxxxxxxxx>


Looks good to me, but I'd prefer to wait for Steve Ack, since he wasn't
sure...

Thanks.


> ---
> include/trace/ftrace.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
> index 1867553..cc78943 100644
> --- a/include/trace/ftrace.h
> +++ b/include/trace/ftrace.h
> @@ -120,7 +120,7 @@
>
> #undef __dynamic_array
> #define __dynamic_array(type, item, len) \
> - ret = trace_seq_printf(s, "\tfield:__data_loc " #item ";\t" \
> + ret = trace_seq_printf(s, "\tfield:__data_loc " #type "[] " #item ";\t"\
> "offset:%u;\tsize:%u;\n", \
> (unsigned int)offsetof(typeof(field), \
> __data_loc_##item), \
> @@ -279,7 +279,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \
>
> #undef __dynamic_array
> #define __dynamic_array(type, item, len) \
> - ret = trace_define_field(event_call, "__data_loc" "[" #type "]", #item,\
> + ret = trace_define_field(event_call, "__data_loc " #type "[]", #item, \
> offsetof(typeof(field), __data_loc_##item), \
> sizeof(field.__data_loc_##item), 0);
>
> -- 1.6.3

--
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/