Re: [PATCH 3/4] tracing: Add trace_array_puts() to write into instance

From: Ross Zwisler
Date: Thu Jan 12 2023 - 18:26:39 EST


On Wed, Jan 11, 2023 at 09:56:39AM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
>
> Add a generic trace_array_puts() that can be used to "trace_puts()" into
> an allocated trace_array instance. This is just another variant of
> trace_array_printk().
>
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> ---
> include/linux/trace.h | 13 +++++++++++++
> kernel/trace/trace.c | 27 +++++++++++++++++----------
> 2 files changed, 30 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/trace.h b/include/linux/trace.h
> index 80ffda871749..afe61949e83a 100644
> --- a/include/linux/trace.h
> +++ b/include/linux/trace.h
> @@ -33,6 +33,19 @@ struct trace_array;
> int register_ftrace_export(struct trace_export *export);
> int unregister_ftrace_export(struct trace_export *export);
>
> +/**
> + * trace_array_puts - write a constant string into the trace buffer.
> + * @tr: The trace array to write to
> + * @ip: The address of the caller

@ip is not an arg to trace_array_puts(), an can be dropped from the comment.

Other than that, you can add:

Reviewed-by: Ross Zwisler <zwisler@xxxxxxxxxx>