RE: [PATCH v2] tracing: Add __print_dynamic_array() helper
From: Zhuo, Qiuxu
Date: Fri Oct 18 2024 - 11:18:23 EST
> From: Steven Rostedt <rostedt@xxxxxxxxxxx>
> [...]
> Subject: [PATCH v2] tracing: Add __print_dynamic_array() helper
>
> From: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> When printing a dynamic array in a trace event, the method is rather ugly.
> It has the format of:
>
> __print_array(__get_dynamic_array(array),
> __get_dynmaic_array_len(array) / el_size, el_size)
>
> Since dynamic arrays are known to the tracing infrastructure, create a helper
> macro that does the above for you.
>
> __print_dynamic_array(array, el_size)
>
> Which would expand to the same output.
>
> Cc: Avadhut Naik <avadhut.naik@xxxxxxx>
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> ---
> Changes since v1:
> https://lore.kernel.org/20240821134843.5faf9a15@xxxxxxxxxxxxxxxxxx
>
> - Added parenthesis around el_size parameter in macro
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@xxxxxxxxx>
Thanks!
-Qiuxu
[...]